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!