Skip to main content

get_hardware_info

Function get_hardware_info 

Source
pub fn get_hardware_info(py: Python<'_>) -> PyResult<Py<PyDict>>
Expand description

Get hardware acceleration capabilities

Returns a Python dict mixing boolean capability flags (e.g. avx2, neon, parallel_support) with the integer CPU core count under the num_cpus key. A plain HashMap<String, bool> cannot represent this mixed shape, so we build a PyDict directly (matching the heterogeneous dict pattern already used by get_params in the linear module) rather than lossily coercing the core count into a boolean.