Python module
max.driver
Devicesβ
Accelerator | Creates an accelerator device with the specified ID and memory limit. |
|---|---|
CPU | Creates a CPU device. |
Device | Represents a compute device available for tensor operations. |
DeviceEvent | Provides access to an event object. |
DeviceSpec | A device specification containing an ID and device type. |
DeviceStream | Provides access to a stream of execution on a device. |
Buffersβ
Buffer | Device-resident buffer representation. |
|---|---|
DevicePinnedBuffer | Creates a pinned host memory allocation tied to the given device. |
DLPackArray |
load_max_buffer | Experimental method for loading serialized MAX buffers. |
|---|
Device discoveryβ
accelerator_api | Returns the API used to program the accelerator. |
|---|---|
accelerator_architecture_name | Returns the architecture name of the accelerator device. |
accelerator_count | accelerator_count() -> int |
devices_exist | Returns True if all specified devices exist. |
enable_all_peer_access | enable_all_peer_access() -> None |
load_devices | Initializes and returns a list of Device objects from a sequence of DeviceSpec objects. |
scan_available_devices | Returns all available accelerators, or a CPU device if none are available. |
Virtual devicesβ
calculate_virtual_device_count | Calculates the minimum virtual device count needed for the given device specs. |
|---|---|
calculate_virtual_device_count_from_cli | Calculates the minimum virtual device count from raw CLI inputs (before parsing). |
get_virtual_device_api | get_virtual_device_api() -> str |
get_virtual_device_count | get_virtual_device_count() -> int |
get_virtual_device_target_arch | get_virtual_device_target_arch() -> str |
is_virtual_device_mode | is_virtual_device_mode() -> bool |
set_virtual_device_api | str) -> None |
set_virtual_device_count | int) -> None |
set_virtual_device_target_arch | str) -> None |
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!