cuda.bindings.nvml.device_get_handle_by_uuid#

cuda.bindings.nvml.device_get_handle_by_uuid(uuid) → intptr_t#

Acquire the handle for a particular device, based on its globally unique immutable UUID (in ASCII format) associated with each device.

For all products. Starting from NVML 5, this API causes NVML to initialize the target GPU NVML may initialize additional GPUs as it searches for the target GPU.

Parameters:

uuid (str) – The UUID of the target GPU or MIG instance.

Returns:

Reference in which to return the device handle or MIG

device handle.

Return type:

intptr_t

Note

In the MPS locality-domain view, this API returns the locality-domain handle whose MPS-provided UUID matches uuid. See MPS Locality Domain Device Enumeration.

See also

nvmlDeviceGetHandleByUUID