4.29.3. GPM Functions
[NVML GPM]
Functions
- nvmlReturn_t nvmlGpmMetricsGet ( nvmlGpmMetricsGet_t* metricsGet )
- nvmlReturn_t nvmlGpmMigSampleGet ( nvmlDevice_t device, unsigned int gpuInstanceId, nvmlGpmSample_t gpmSample )
- nvmlReturn_t nvmlGpmQueryDeviceSupport ( nvmlDevice_t device, nvmlGpmSupport_t* gpmSupport )
- nvmlReturn_t nvmlGpmQueryIfStreamingEnabled ( nvmlDevice_t device, unsigned int* state )
- nvmlReturn_t nvmlGpmSampleAlloc ( nvmlGpmSample_t* gpmSample )
- nvmlReturn_t nvmlGpmSampleFree ( nvmlGpmSample_t gpmSample )
- nvmlReturn_t nvmlGpmSampleGet ( nvmlDevice_t device, nvmlGpmSample_t gpmSample )
- nvmlReturn_t nvmlGpmSetStreamingEnabled ( nvmlDevice_t device, unsigned int state )
Functions
- nvmlReturn_t nvmlGpmMetricsGet ( nvmlGpmMetricsGet_t* metricsGet )
-
Parameters
- metricsGet
- IN/OUT: populated nvmlGpmMetricsGet_t struct
Description
Calculate GPM metrics from two samples.
For Hopper or newer fully supported devices.
- nvmlReturn_t nvmlGpmMigSampleGet ( nvmlDevice_t device, unsigned int gpuInstanceId, nvmlGpmSample_t gpmSample )
-
Parameters
- device
- Device to get samples for
- gpuInstanceId
- MIG GPU Instance ID
- gpmSample
- Buffer to read samples into
Description
Read a sample of GPM metrics into the provided gpmSample buffer for a MIG GPU Instance.
After two samples are gathered, you can call nvmlGpmMetricGet on those samples to retrive metrics
For Hopper or newer fully supported devices.
- nvmlReturn_t nvmlGpmQueryDeviceSupport ( nvmlDevice_t device, nvmlGpmSupport_t* gpmSupport )
-
Parameters
- device
- NVML device to query for
- gpmSupport
- Structure to indicate GPM support nvmlGpmSupport_t. Indicates GPM support per system for the supplied device
Returns
- NVML_SUCCESS on success
- Nonzero NVML_ERROR_? enum if there is an error in processing the query
Description
Indicate whether the supplied device supports GPM
- nvmlReturn_t nvmlGpmQueryIfStreamingEnabled ( nvmlDevice_t device, unsigned int* state )
-
Parameters
- device
- The identifier of the target device
- state
- Returns GPM stream state NVML_FEATURE_DISABLED or NVML_FEATURE_ENABLED
Returns
- NVML_SUCCESS if current GPM stream state were successfully queried
- NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
- NVML_ERROR_INVALID_ARGUMENT if device is invalid or state is NULL
- NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
Description
Get GPM stream state.
For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.
- nvmlReturn_t nvmlGpmSampleAlloc ( nvmlGpmSample_t* gpmSample )
-
Parameters
- gpmSample
- Where the allocated sample will be stored
Returns
- NVML_SUCCESS on success
- NVML_ERROR_INVALID_ARGUMENT if an invalid pointer is provided
- NVML_ERROR_MEMORY if system memory is insufficient
Description
Allocate a sample buffer to be used with NVML GPM . You will need to allocate at least two of these buffers to use with the NVML GPM feature
For Hopper or newer fully supported devices.
- nvmlReturn_t nvmlGpmSampleFree ( nvmlGpmSample_t gpmSample )
-
Parameters
- gpmSample
- Sample to free
Description
Free an allocated sample buffer that was allocated with nvmlGpmSampleAlloc()
For Hopper or newer fully supported devices.
- nvmlReturn_t nvmlGpmSampleGet ( nvmlDevice_t device, nvmlGpmSample_t gpmSample )
-
Parameters
- device
- Device to get samples for
- gpmSample
- Buffer to read samples into
Description
Read a sample of GPM metrics into the provided gpmSample buffer. After two samples are gathered, you can call nvmlGpmMetricGet on those samples to retrive metrics
For Hopper or newer fully supported devices.
- nvmlReturn_t nvmlGpmSetStreamingEnabled ( nvmlDevice_t device, unsigned int state )
-
Parameters
- device
- The identifier of the target device
- state
- GPM stream state, NVML_FEATURE_DISABLED or NVML_FEATURE_ENABLED
Returns
- NVML_SUCCESS if current GPM stream state is successfully set
- NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
- NVML_ERROR_INVALID_ARGUMENT if device is invalid
- NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
Description
Set GPM stream state.
For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.