ml.utils.device.cpu

CPU device type.

class ml.utils.device.cpu.cpu_device[source]

Bases: base_device

Mixin to support CPU training.

classmethod has_device() bool[source]

Detects whether or not the device is available.

Returns:

If the device is available

get_torch_compile_backend() str | Callable[source]

Returns the backend to use for Torch compile.

Returns:

The backend