cuda.bindings.nvml.device_get_supported_vgpus#

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

Retrieve the supported vGPU types on a physical GPU (device).

An array of supported vGPU types for the physical GPU indicated by device is returned in the caller-supplied buffer pointed at by vgpu_type_ids. The element count of nvmlVgpuTypeId_t array is passed in vgpu_count, and vgpu_count is used to return the number of vGPU types written to the buffer. If the supplied buffer is not large enough to accommodate the vGPU type array, the function returns NVML_ERROR_INSUFFICIENT_SIZE, with the element count of nvmlVgpuTypeId_t array required in vgpu_count. To query the number of vGPU types supported for the GPU, call this function with *vgpu_count = 0. The code will return NVML_ERROR_INSUFFICIENT_SIZE, or NVML_SUCCESS if no vGPU types are supported.

Parameters:

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

Returns:

Pointer to caller-supplied array in which to return

list of vGPU types.

Return type:

unsigned int

See also

nvmlDeviceGetSupportedVgpus