cuda.bindings.nvml.device_get_active_vgpus#

cuda.bindings.nvml.device_get_active_vgpus(intptr_t device)#

Retrieve the active vGPU instances on a device.

An array of active vGPU instances is returned in the caller-supplied buffer pointed at by vgpu_instances. The array element count is passed in vgpu_count, and vgpu_count is used to return the number of vGPU instances written to the buffer. If the supplied buffer is not large enough to accommodate the vGPU instance array, the function returns NVML_ERROR_INSUFFICIENT_SIZE, with the element count of nvmlVgpuInstance_t array required in vgpu_count. To query the number of active vGPU instances, call this function with *vgpu_count = 0. The code will return NVML_ERROR_INSUFFICIENT_SIZE, or NVML_SUCCESS if no vGPU Types are supported. For Kepler ™️ or newer fully supported devices.

Parameters:

device (intptr_t) – The identifier of the target device.

Returns:

Pointer to array in which to return list of vGPU

instances.

Return type:

unsigned int

See also

nvmlDeviceGetActiveVgpus