Skip to main content

register_device_constants

Function register_device_constants 

Source
pub fn register_device_constants(m: &Bound<'_, PyModule>) -> PyResult<()>
Expand description

Register device constants and utility functions with the Python module.

This function adds:

  • Device constants (cpu, etc.)
  • Device utility functions (device_count, is_available, etc.)

§Arguments

  • m - Python module to register functions with

§Returns

PyResult<()> indicating success or failure