ml.utils.device.auto
Defines a utility class for automatically detecting the device to use.
This function just goes through a list of devices in order of priority and finds whichever one is available. To disable some device, you can set the associated environment variable, for example:
export DISABLE_METAL=1
export DISABLE_GPU=1
- ml.utils.device.auto.detect_device() base_device [source]