For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Python class
DeviceSpec
DeviceSpecβ
class max.driver.DeviceSpec(id, device_type='cpu')
Bases: object
A device specification containing an ID and device type.
-
Parameters:
accelerator()β
static accelerator(id=0)
Creates an accelerator (GPU) device specification.
-
Parameters:
-
id (int)
cpu()β
static cpu(id=-1)
Creates a CPU device specification.
-
Parameters:
-
id (int)
device_typeβ
device_type: Literal['cpu', 'gpu'] = 'cpu'
The device type, either cpu or gpu.
idβ
id: int
The device identifier.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!