cuda.bindings.nvml.device_get_creatable_vgpus#

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

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

An array of creatable 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. The creatable vGPU types for a device may differ over time, as there may be restrictions on what type of vGPU types can concurrently run on a device. For example, if only one vGPU type is allowed at a time on a device, then the creatable list will be restricted to whatever vGPU type is already running on the device. 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 that can be created 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 creatable.

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

nvmlDeviceGetCreatableVgpus