nanoml.device module

nanoml.device.get_device() device[source]

Get the device for the current system.

Returns:

torch.device: The device (torch.device(“cuda”), torch.device(“mps”), torch.device(“cpu”))

nanoml.device.get_device_name() str[source]

Get the device name for the current system.

Returns:

str: The device name (e.g. “GeForce RTX 3090” or “Apple M1 Pro”)

nanoml.device.get_device_string() str[source]

Get the device string for the current system.

Returns:

str: The device string (cuda, mps, cpu)