NVIDIA GPU access API
Description: This file contains API for GPU library management, clock controls, sensors, and device events.
Refer to GPU access API for general documentation.
Definition in file nvrm_gpu.h.
Go to the source code of this file.
Data Structures | |
| struct | NvRmGpuLibVersionInfoRec |
| The version information structure returned by NvRmGpuLibGetVersionInfo(). More... | |
| struct | NvRmGpuLibOpenAttrRec |
| Extensible attribute structure for NvRmGpuLibOpen() More... | |
| struct | NvRmGpuLibDeviceListEntryRec |
| Device list entry. More... | |
| struct | NvRmGpuDeviceOpenAttrRec |
| Extensible attribute structure for NvRmGpuDeviceOpen() More... | |
| struct | NvRmGpuClockGetEntryRec |
| Entry for clock get request. More... | |
| struct | NvRmGpuClockSetEntryRec |
| Entry for clock set request. More... | |
| struct | NvRmGpuClockRangeRec |
| Frequency range for clock domain. More... | |
| struct | NvRmGpuClockPointRec |
| Clock voltage/frequency point. More... | |
| struct | NvRmGpuClockDomainInfoRec |
| Clock domain info. More... | |
| struct | NvRmGpuDeviceEventSessionOpenAttrRec |
| Extensible attribute structure for NvRmGpuDeviceEventSessionOpen(). More... | |
| struct | NvRmGpuDeviceEventInfoRec |
| GPU device event. More... | |
Macros | |
| #define | NVRM_GPU_DEFINE_LIB_OPEN_ATTR(x) NvRmGpuLibOpenAttr x = { 0U } |
| Definer macro for NvRmGpuLibOpenAttr. More... | |
| #define | NVRM_GPU_DEVICE_INDEX_DEFAULT (-1) |
| Pseudo-index for the default (primary) device. More... | |
| #define | NVRM_GPU_DEFINE_DEVICE_OPEN_ATTR(x) NvRmGpuDeviceOpenAttr x = { NvRmGpuSyncType_Default, false } |
| Definer macro for NvRmGpuDeviceOpen(). More... | |
| #define | NVRM_GPU_CLOCK_ASYNC_REQ_HANDLE_PRIFMT "p" |
| Format macro for printf for printing NvRmGpuClockAsyncReqHandle. More... | |
| #define | NVRM_GPU_CLOCK_ASYNC_REQ_INVALID_HANDLE (NULL) |
| Invalid handle value. More... | |
| #define | NVRM_GPU_DEFINE_DEVICE_EVENT_SESSION_ATTR(x) NvRmGpuDeviceEventSessionOpenAttr x = { NULL, 0 } |
| Definer macro for NvRmGpuDeviceEventSessionOpenAttr. More... | |
Functions | |
| const NvRmGpuLibVersionInfo * | NvRmGpuLibGetVersionInfo (void) |
| Returns the library version information. More... | |
| NvRmGpuLib * | NvRmGpuLibOpen (const NvRmGpuLibOpenAttr *attr) |
| Opens a new instance of the nvrm_gpu library. More... | |
| NvError | NvRmGpuLibClose (NvRmGpuLib *hLib) |
| Closes the library and releases all resources. More... | |
| const NvRmGpuLibDeviceListEntry * | NvRmGpuLibListDevices (NvRmGpuLib *hLib, size_t *pNumDevices) |
| Returns the list of probed GPUs. More... | |
| NvError | NvRmGpuDeviceOpen (NvRmGpuLib *hLib, int deviceIndex, const NvRmGpuDeviceOpenAttr *attr, NvRmGpuDevice **phDevice) |
| Opens a GPU device. More... | |
| NvError | NvRmGpuDeviceClose (NvRmGpuDevice *hDevice) |
| Closes the GPU device. More... | |
| NvError | NvRmGpuClockGetDomains (NvRmGpuDevice *hDevice, const NvRmGpuClockDomainInfo **infos, size_t *pNumDomains) |
| Returns available GPU clock domains for the device. More... | |
| NvError | NvRmGpuClockGetPoints (NvRmGpuDevice *hDevice, NvRmGpuClockDomain domain, NvRmGpuClockPoint *pClkPoints, size_t *pNumPoints) |
| Retrieves voltage/frequency (VF) points for a given clock domain. For information about VF points, see NvRmGpuClockAsyncReqHandle. More... | |
| NvError | NvRmGpuClockSet (NvRmGpuDevice *hDevice, const NvRmGpuClockSetEntry *pClkSetEntries, size_t numEntries, NvRmGpuClockAsyncReqHandle *phReq) |
| Requests minimum clocks for one or more clock domains. More... | |
| NvError | NvRmGpuClockWaitAsyncReq (NvRmGpuDevice *hDevice, const NvRmGpuClockAsyncReqHandle *phReqs, size_t numEntries, uint32_t timeoutMs) |
| Waits for the completion of one or more asynchronous clock requests. More... | |
| NvError | NvRmGpuClockCloseAsyncReq (NvRmGpuDevice *hDevice, NvRmGpuClockAsyncReqHandle hReq) |
| Closes an asynchronous clock request handle. More... | |
| NvError | NvRmGpuClockWaitAnyEvent (NvRmGpuDevice *hDevice, uint32_t timeoutMs) |
| This function is not implemented and it should be deleted. More... | |
| NvError | NvRmGpuClockGet (NvRmGpuDevice *hDevice, NvRmGpuClockGetEntry *pClkGetEntries, size_t numEntries) |
| Request one or more clock domain frequency state. More... | |
| NvError | NvRmGpuDeviceListVoltageSensors (NvRmGpuDevice *hDevice, const NvRmGpuDeviceVoltage **pSensors, size_t *pNumSensors) |
| Returns the list of available voltage sensors for the device. More... | |
| NvError | NvRmGpuDeviceGetVoltage (NvRmGpuDevice *hDevice, NvRmGpuDeviceVoltage which, uint64_t *pVoltageMicroVolt) |
| Retrieves the voltage sensor reading. More... | |
| NvError | NvRmGpuDeviceListCurrentSensors (NvRmGpuDevice *hDevice, const NvRmGpuDeviceCurrent **pSensors, size_t *pNumSensors) |
| Returns the list of available electric current sensors for the device. More... | |
| NvError | NvRmGpuDeviceGetCurrent (NvRmGpuDevice *hDevice, NvRmGpuDeviceCurrent which, uint64_t *pCurrentMicroAmpere) |
| Retrieves the electric current reading. More... | |
| NvError | NvRmGpuDeviceListPowerSensors (NvRmGpuDevice *hDevice, const NvRmGpuDevicePower **pSensors, size_t *pNumSensors) |
| Returns the list of available power sensors for the device. More... | |
| NvError | NvRmGpuDeviceGetPower (NvRmGpuDevice *hDevice, NvRmGpuDevicePower which, uint64_t *pPowerMicroWatt) |
| Retrieves the power sensor reading. More... | |
| NvError | NvRmGpuDeviceListTemperatureSensors (NvRmGpuDevice *hDevice, const NvRmGpuDeviceTemperature **pSensors, size_t *pNumSensors) |
| Returns the list of available temperature sensors for the device. More... | |
| NvError | NvRmGpuDeviceGetTemperature (NvRmGpuDevice *hDevice, NvRmGpuDeviceTemperature which, int32_t *pTemperatureMilliCelsius) |
| Retrieves the temperature sensor reading. More... | |
| NvError | NvRmGpuDeviceThermalAlertSetLimit (NvRmGpuDevice *hDevice, int32_t temperature_mC) |
| Sets the thermal alert limit. More... | |
| static void | NvRmGpuDeviceEventSessionOpenAttrSetAllEvents (NvRmGpuDeviceEventSessionOpenAttr *attr) |
| Assigns device events attribute structure with a list of all events to listen to. More... | |
| NvError | NvRmGpuDeviceEventSessionOpen (NvRmGpuDevice *hDevice, const NvRmGpuDeviceEventSessionOpenAttr *attr, NvRmGpuDeviceEventSession **phSession) |
| Opens a session to monitor device events. More... | |
| NvError | NvRmGpuDeviceEventSessionRead (NvRmGpuDeviceEventSession *hSession, NvRmGpuDeviceEventInfo *pEventInfo, uint32_t timeoutMs) |
| Read next device event. More... | |
| NvError | NvRmGpuDeviceEventSessionClose (NvRmGpuDeviceEventSession *hSession) |
| Closes the device event session. More... | |