cuda.core.system.MigInfo#
- class cuda.core.system.MigInfo(Device device: Device)#
Methods
- __init__(*args, **kwargs)#
- get_all_devices(self) Iterable[Device]#
Get all MIG devices under its parent device.
If the compute instance is destroyed either explicitly or by destroying, resetting or unbinding the parent GPU instance or the GPU device itself the MIG device handle would remain invalid and must be requested again using this API. Handles may be reused and their properties can change in the process.
For Ampere™ or newer fully supported devices.
- get_device_by_index(self, int index: int) Device#
Get MIG device for the given index under its parent device.
If the compute instance is destroyed either explicitly or by destroying, resetting or unbinding the parent GPU instance or the GPU device itself the MIG device handle would remain invalid and must be requested again using this API. Handles may be reused and their properties can change in the process.
For Ampere™ or newer fully supported devices.
- get_device_count(self) int#
Get the maximum number of MIG devices that can exist under this device.
Returns zero if MIG is not supported or enabled.
For Ampere™ or newer fully supported devices.
- Returns:
The number of MIG devices (compute instances) on this GPU.
- Return type:
- get_parent_device(self) Device#
For MIG devices, get the parent GPU device.
For Ampere™ or newer fully supported devices.
- Returns:
The parent GPU device for this MIG device.
- Return type:
Attributes
- is_mig_device#
Whether this device is a MIG (Multi-Instance GPU) device.
A MIG device handle is an NVML abstraction which maps to a MIG compute instance. These overloaded references can be used (with some restrictions) interchangeably with a GPU device handle to execute queries at a per-compute instance granularity.
For Ampere™ or newer fully supported devices.
- mode#
Get current MIG mode for the device.
For Ampere™ or newer fully supported devices.
Changing MIG modes may require device unbind or reset. The “pending” MIG mode refers to the target mode following the next activation trigger.
If the device is not a MIG device, returns False.
- Returns:
True if current MIG mode is enabled.
- Return type:
- pending_mode#
Get pending MIG mode for the device.
For Ampere™ or newer fully supported devices.
Changing MIG modes may require device unbind or reset. The “pending” MIG mode refers to the target mode following the next activation trigger.
If the device is not a MIG device, returns False.
- Returns:
True if pending MIG mode is enabled.
- Return type: