NVML API Reference Guide (PDF) - vR520 (older) - Last updated October 4, 2022 - Send Feedback

2.28.3. GPM Functions

[NVML GPM]

Functions

nvmlReturn_t nvmlGpmMetricsGet ( nvmlGpmMetricsGet_t* metricsGet )
nvmlReturn_t nvmlGpmQueryDeviceSupport ( nvmlDevice_t device, nvmlGpmSupport_t* gpmSupport )
nvmlReturn_t nvmlGpmSampleAlloc ( nvmlGpmSample_t* gpmSample )
nvmlReturn_t nvmlGpmSampleFree ( nvmlGpmSample_t gpmSample )
nvmlReturn_t nvmlGpmSampleGet ( nvmlDevice_t device, nvmlGpmSample_t gpmSample )

Functions

nvmlReturn_t nvmlGpmMetricsGet ( nvmlGpmMetricsGet_t* metricsGet )
Parameters
metricsGet
IN/OUT: populated nvmlGpmMetricsGet_t struct
Returns

  • NVML_SUCCESS on success
  • Nonzero NVML_ERROR_? enum on error

Description

Calculate GPM metrics from two samples.

HOPPER_OR_NEWER%

nvmlReturn_t nvmlGpmQueryDeviceSupport ( nvmlDevice_t device, nvmlGpmSupport_t* gpmSupport )
Parameters
device
NVML device to query for
gpmSupport
Structure to indicate GPM support. 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 nvmlGpmSampleAlloc ( nvmlGpmSample_t* gpmSample )
Parameters
gpmSample
Where the allocated sample will be stored
Returns

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

HOPPER_OR_NEWER%

nvmlReturn_t nvmlGpmSampleFree ( nvmlGpmSample_t gpmSample )
Parameters
gpmSample
Sample to free
Returns

Description

Free an allocated sample buffer that was allocated with nvmlGpmSampleAlloc()

HOPPER_OR_NEWER%

nvmlReturn_t nvmlGpmSampleGet ( nvmlDevice_t device, nvmlGpmSample_t gpmSample )
Parameters
device
Device to get samples for
gpmSample
Buffer to read samples into
Returns

  • NVML_SUCCESS on success
  • Nonzero NVML_ERROR_? enum on error

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

HOPPER_OR_NEWER%


NVML API Reference Guide (PDF) - vR520 (older) - Last updated October 4, 2022 - Send Feedback