cuda.bindings.nvml.device_get_mig_device_handle_by_index#

cuda.bindings.nvml.device_get_mig_device_handle_by_index(
intptr_t device,
unsigned int index,
) intptr_t#

Get MIG device handle for the given index under its parent NVML 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. Supported on Linux only.

Parameters:
  • device (intptr_t) – Reference to the parent GPU device handle.

  • index (unsigned int) – Index of the MIG device.

Returns:

Reference to the MIG device handle.

Return type:

intptr_t

See also

nvmlDeviceGetMigDeviceHandleByIndex