GRID Virtualization APIs(3)

NAME
GRID Virtualization APIs -

  Functions

nvmlReturn_t DECLDIR nvmlDeviceGetVirtualizationMode (nvmlDevice_t device, nvmlGpuVirtualizationMode_t *pVirtualMode)
nvmlReturn_t DECLDIR nvmlDeviceGetHostVgpuMode (nvmlDevice_t device, nvmlHostVgpuMode_t *pHostVgpuMode)
nvmlReturn_t DECLDIR nvmlDeviceSetVirtualizationMode (nvmlDevice_t device, nvmlGpuVirtualizationMode_t virtualMode)
nvmlReturn_t DECLDIR nvmlDeviceGetGridLicensableFeatures_v3 (nvmlDevice_t device, nvmlGridLicensableFeatures_t *pGridLicensableFeatures)
nvmlReturn_t DECLDIR nvmlDeviceGetProcessUtilization (nvmlDevice_t device, nvmlProcessUtilizationSample_t *utilization, unsigned int *processSamplesCount, unsigned long long lastSeenTimeStamp)

Detailed Description

This chapter describes operations that are associated with NVIDIA GRID products.

Function Documentation

  nvmlReturn_t DECLDIR nvmlDeviceGetGridLicensableFeatures_v3 (nvmlDevice_t device, nvmlGridLicensableFeatures_t * pGridLicensableFeatures)

Retrieve the GRID licensable features.

Identifies whether the system supports GRID Software Licensing. If it does, return the list of licensable feature(s) and their current license status.

Parameters:
    device Identifier of the target device
    pGridLicensableFeatures Pointer to structure in which GRID licensable features are returned

Returns:

    •   NVML_SUCCESS if licensable features are successfully retrieved

    •   NVML_ERROR_INVALID_ARGUMENT if pGridLicensableFeatures is NULL

    •   NVML_ERROR_UNKNOWN on any unexpected error

  nvmlReturn_t DECLDIR nvmlDeviceGetHostVgpuMode (nvmlDevice_t device, nvmlHostVgpuMode_t * pHostVgpuMode)

Queries if SR-IOV host operation is supported on a vGPU supported device.

Checks whether SR-IOV host capability is supported by the device and the driver, and indicates device is in SR-IOV mode if both of these conditions are true.

Parameters:
    device The identifier of the target device
    pHostVgpuMode Reference in which to return the current vGPU mode

Returns:

    •   NVML_SUCCESS if device's vGPU mode has been successfully retrieved

    •   NVML_ERROR_INVALID_ARGUMENT if device handle is 0 or pVgpuMode is NULL

    •   NVML_ERROR_NOT_SUPPORTED if device doesn't support this feature.

    •   NVML_ERROR_UNKNOWN if any unexpected error occurred

  nvmlReturn_t DECLDIR nvmlDeviceGetProcessUtilization (nvmlDevice_t device, nvmlProcessUtilizationSample_t * utilization, unsigned int * processSamplesCount, unsigned long long lastSeenTimeStamp)

Retrieves the current utilization and process ID

For Maxwell (TM) or newer fully supported devices.

Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, and video decoder for processes running. Utilization values are returned as an array of utilization sample structures in the caller-supplied buffer pointed at by utilization. One utilization sample structure is returned per process running, that had some non-zero utilization during the last sample period. It includes the CPU timestamp at which the samples were recorded. Individual utilization values are returned as 'unsigned int' values.

To read utilization values, first determine the size of buffer required to hold the samples by invoking the function with utilization set to NULL. The caller should allocate a buffer of size processSamplesCount * sizeof(nvmlProcessUtilizationSample_t). Invoke the function again with the allocated buffer passed in utilization, and processSamplesCount set to the number of entries the buffer is sized for.

On successful return, the function updates processSamplesCount with the number of process utilization sample structures that were actually written. This may differ from a previously read value as instances are created or destroyed.

lastSeenTimeStamp represents the CPU timestamp in microseconds at which utilization samples were last read. Set it to 0 to read utilization based on all the samples maintained by the driver's internal sample buffer. Set lastSeenTimeStamp to a timeStamp retrieved from a previous query to read utilization since the previous query.

Note:
    On MIG-enabled GPUs, querying process utilization is not currently supported.

Parameters:
    device The identifier of the target device
    utilization Pointer to caller-supplied buffer in which guest process utilization samples are returned
    processSamplesCount Pointer to caller-supplied array size, and returns number of processes running
    lastSeenTimeStamp Return only samples with timestamp greater than lastSeenTimeStamp.

Returns:

    •   NVML_SUCCESS if utilization has been populated

    •   NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT if device is invalid, utilization is NULL, or samplingPeriodUs is NULL

    •   NVML_ERROR_NOT_SUPPORTED if the device does not support this feature

    •   NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible

    •   NVML_ERROR_UNKNOWN on any unexpected error

  nvmlReturn_t DECLDIR nvmlDeviceGetVirtualizationMode (nvmlDevice_t device, nvmlGpuVirtualizationMode_t * pVirtualMode)

This method is used to get the virtualization mode corresponding to the GPU.

For Kepler (TM) or newer fully supported devices.

Parameters:
    device Identifier of the target device
    pVirtualMode Reference to virtualization mode. One of NVML_GPU_VIRTUALIZATION_?

Returns:

    •   NVML_SUCCESS if pVirtualMode is fetched

    •   NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT if device is invalid or pVirtualMode is NULL

    •   NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible

    •   NVML_ERROR_UNKNOWN on any unexpected error

  nvmlReturn_t DECLDIR nvmlDeviceSetVirtualizationMode (nvmlDevice_t device, nvmlGpuVirtualizationMode_t virtualMode)

This method is used to set the virtualization mode corresponding to the GPU.

For Kepler (TM) or newer fully supported devices.

Parameters:
    device Identifier of the target device
    virtualMode virtualization mode. One of NVML_GPU_VIRTUALIZATION_?

Returns:

    •   NVML_SUCCESS if pVirtualMode is set

    •   NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT if device is invalid or pVirtualMode is NULL

    •   NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible

    •   NVML_ERROR_NOT_SUPPORTED if setting of virtualization mode is not supported.

    •   NVML_ERROR_NO_PERMISSION if setting of virtualization mode is not allowed for this client.

Author

Generated automatically by Doxygen for NVML from the source code.