NVAPI Reference Documentation
NVIDIA
Release 384: June 27
2017

GPU Clock Control Interface

Data Structures

struct  NV_GPU_CLOCK_FREQUENCIES_V1
 
struct  NV_GPU_CLOCK_FREQUENCIES_V2
 

Macros

#define NV_GPU_CLOCK_FREQUENCIES_VER_1   MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V1,1)
 
#define NV_GPU_CLOCK_FREQUENCIES_VER_2   MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V2,2)
 
#define NV_GPU_CLOCK_FREQUENCIES_VER_3   MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V2,3)
 
#define NV_GPU_CLOCK_FREQUENCIES_VER   NV_GPU_CLOCK_FREQUENCIES_VER_3
 

Typedefs

typedef enum _NV_GPU_PUBLIC_CLOCK_ID NV_GPU_PUBLIC_CLOCK_ID
 
typedef enum _NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID
 
typedef NV_GPU_CLOCK_FREQUENCIES_V2 NV_GPU_CLOCK_FREQUENCIES
 

Enumerations

enum  _NV_GPU_PUBLIC_CLOCK_ID {
  NVAPI_GPU_PUBLIC_CLOCK_GRAPHICS = 0, NVAPI_GPU_PUBLIC_CLOCK_MEMORY = 4, NVAPI_GPU_PUBLIC_CLOCK_PROCESSOR = 7, NVAPI_GPU_PUBLIC_CLOCK_VIDEO = 8,
  NVAPI_GPU_PUBLIC_CLOCK_UNDEFINED = NVAPI_MAX_GPU_PUBLIC_CLOCKS
}
 
enum  _NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID { NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_CORE = 0, NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_UNDEFINED = NVAPI_MAX_GPU_PERF_VOLTAGES }
 
enum  NV_GPU_CLOCK_FREQUENCIES_CLOCK_TYPE { NV_GPU_CLOCK_FREQUENCIES_CURRENT_FREQ = 0, NV_GPU_CLOCK_FREQUENCIES_BASE_CLOCK = 1, NV_GPU_CLOCK_FREQUENCIES_BOOST_CLOCK = 2, NV_GPU_CLOCK_FREQUENCIES_CLOCK_TYPE_NUM = 3 }
 

Functions

NVAPI_INTERFACE NvAPI_GPU_GetAllClockFrequencies (__in NvPhysicalGpuHandle hPhysicalGPU, __inout NV_GPU_CLOCK_FREQUENCIES *pClkFreqs)
 
#define NVAPI_MAX_GPU_CLOCKS   32
 
#define NVAPI_MAX_GPU_PUBLIC_CLOCKS   32
 
#define NVAPI_MAX_GPU_PERF_CLOCKS   32
 
#define NVAPI_MAX_GPU_PERF_VOLTAGES   16
 
#define NVAPI_MAX_GPU_PERF_PSTATES   16
 

Detailed Description

The GPU clock control APIs are used to get and set individual clock domains on a per-GPU basis.

Macro Definition Documentation

#define NV_GPU_CLOCK_FREQUENCIES_VER   NV_GPU_CLOCK_FREQUENCIES_VER_3
#define NV_GPU_CLOCK_FREQUENCIES_VER_1   MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V1,1)
#define NV_GPU_CLOCK_FREQUENCIES_VER_2   MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V2,2)
#define NV_GPU_CLOCK_FREQUENCIES_VER_3   MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V2,3)
#define NVAPI_MAX_GPU_CLOCKS   32
#define NVAPI_MAX_GPU_PERF_CLOCKS   32
#define NVAPI_MAX_GPU_PERF_PSTATES   16
#define NVAPI_MAX_GPU_PERF_VOLTAGES   16
#define NVAPI_MAX_GPU_PUBLIC_CLOCKS   32

Typedef Documentation

Enumeration Type Documentation

Enumerator
NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_CORE 
NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_UNDEFINED 
Enumerator
NVAPI_GPU_PUBLIC_CLOCK_GRAPHICS 
NVAPI_GPU_PUBLIC_CLOCK_MEMORY 
NVAPI_GPU_PUBLIC_CLOCK_PROCESSOR 
NVAPI_GPU_PUBLIC_CLOCK_VIDEO 
NVAPI_GPU_PUBLIC_CLOCK_UNDEFINED 

Used in NvAPI_GPU_GetAllClockFrequencies()

Enumerator
NV_GPU_CLOCK_FREQUENCIES_CURRENT_FREQ 
NV_GPU_CLOCK_FREQUENCIES_BASE_CLOCK 
NV_GPU_CLOCK_FREQUENCIES_BOOST_CLOCK 
NV_GPU_CLOCK_FREQUENCIES_CLOCK_TYPE_NUM 

Function Documentation

NVAPI_INTERFACE NvAPI_GPU_GetAllClockFrequencies ( __in NvPhysicalGpuHandle  hPhysicalGPU,
__inout NV_GPU_CLOCK_FREQUENCIES pClkFreqs 
)

This function retrieves the NV_GPU_CLOCK_FREQUENCIES structure for the specified physical GPU.

For each clock domain:

  • bIsPresent is set for each domain that is present on the GPU
  • frequency is the domain's clock freq in kHz

Each domain's info is indexed in the array. For example: clkFreqs.domain[NVAPI_GPU_PUBLIC_CLOCK_MEMORY] holds the info for the MEMORY domain.

SUPPORTED OS: Windows XP and higher

TCC_SUPPORTED

Since
Release: 295
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_INVALID_ARGUMENTpClkFreqs is NULL.


Copyright (c) 2007-2017 NVIDIA Corporation. All rights reserved.

NVIDIA