Skip to main content

Device

This class represents a specific hardware device configuration, including the device type, quantity, and optional partitioning. It serves as a data structure to define resource requirements for compute tasks, ensuring that device counts meet a minimum threshold.

Attributes

AttributeTypeDescription
quantityintThe number of devices of this type, which must be an integer of at least 1.
device_classDeviceClassThe category or classification of the hardware device being defined.
device`strNone` = null
partition`strNone` = null

Constructor

Signature

def Device(
quantity: int,
device_class: DeviceClass,
device: str | None = None,
partition: str | None = None
) - > null

Parameters

NameTypeDescription
quantityintThe number of devices of this type.
device_classDeviceClassThe classification category of the device.
device`strNone` = None
partition`strNone` = None