NVML API Reference Guide (PDF) - vR550 (older) - Last updated March 12, 2024 - Send Feedback

4.13. System Queries

This chapter describes the queries that NVML can perform against the local system. These queries are not device-specific.

Defines

#define NVML_CUDA_DRIVER_VERSION_MAJOR ( v ) ((v)/1000)

Functions

nvmlReturn_t nvmlSystemGetCudaDriverVersion ( int* cudaDriverVersion )
nvmlReturn_t nvmlSystemGetCudaDriverVersion_v2 ( int* cudaDriverVersion )
nvmlReturn_t nvmlSystemGetDriverVersion ( char* version, unsigned int  length )
nvmlReturn_t nvmlSystemGetHicVersion ( unsigned int* hwbcCount, nvmlHwbcEntry_t* hwbcEntries )
nvmlReturn_t nvmlSystemGetNVMLVersion ( char* version, unsigned int  length )
nvmlReturn_t nvmlSystemGetProcessName ( unsigned int  pid, char* name, unsigned int  length )
nvmlReturn_t nvmlSystemGetTopologyGpuSet ( unsigned int  cpuNumber, unsigned int* count, nvmlDevice_t* deviceArray )

Defines

#define NVML_CUDA_DRIVER_VERSION_MAJOR ( v ) ((v)/1000)

Macros for converting the CUDA driver version number to Major and Minor version numbers.

Functions

nvmlReturn_t nvmlSystemGetCudaDriverVersion ( int* cudaDriverVersion )
Parameters
cudaDriverVersion
Reference in which to return the version identifier
Returns

Description

Retrieves the version of the CUDA driver.

For all products.

The CUDA driver version returned will be retreived from the currently installed version of CUDA. If the cuda library is not found, this function will return a known supported version number.

nvmlReturn_t nvmlSystemGetCudaDriverVersion_v2 ( int* cudaDriverVersion )
Parameters
cudaDriverVersion
Reference in which to return the version identifier
Returns

Description

Retrieves the version of the CUDA driver from the shared library.

For all products.

The returned CUDA driver version by calling cuDriverGetVersion()

nvmlReturn_t nvmlSystemGetDriverVersion ( char* version, unsigned int  length )
Parameters
version
Reference in which to return the version identifier
length
The maximum allowed length of the string returned in version
Returns

Description

Retrieves the version of the system's graphics driver.

For all products.

The version identifier is an alphanumeric string. It will not exceed 80 characters in length (including the NULL terminator). See nvmlConstants::NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE.

nvmlReturn_t nvmlSystemGetHicVersion ( unsigned int* hwbcCount, nvmlHwbcEntry_t* hwbcEntries )
Parameters
hwbcCount
Size of hwbcEntries array
hwbcEntries
Array holding information about hwbc
Returns

Description

Retrieves the IDs and firmware versions for any Host Interface Cards (HICs) in the system.

For S-class products.

The hwbcCount argument is expected to be set to the size of the input hwbcEntries array. The HIC must be connected to an S-class system for it to be reported by this function.

nvmlReturn_t nvmlSystemGetNVMLVersion ( char* version, unsigned int  length )
Parameters
version
Reference in which to return the version identifier
length
The maximum allowed length of the string returned in version
Returns

Description

Retrieves the version of the NVML library.

For all products.

The version identifier is an alphanumeric string. It will not exceed 80 characters in length (including the NULL terminator). See nvmlConstants::NVML_SYSTEM_NVML_VERSION_BUFFER_SIZE.

nvmlReturn_t nvmlSystemGetProcessName ( unsigned int  pid, char* name, unsigned int  length )
Parameters
pid
The identifier of the process
name
Reference in which to return the process name
length
The maximum allowed length of the string returned in name
Returns

Description

Gets name of the process with provided process id

For all products.

Returned process name is cropped to provided length. name string is encoded in ANSI.

nvmlReturn_t nvmlSystemGetTopologyGpuSet ( unsigned int  cpuNumber, unsigned int* count, nvmlDevice_t* deviceArray )
Parameters
cpuNumber
The CPU number
count
When zero, is set to the number of matching GPUs such that deviceArray can be malloc'd. When non-zero, deviceArray will be filled with count number of device handles.
deviceArray
An array of device handles for GPUs found with affinity to cpuNumber
Returns

Description

Retrieve the set of GPUs that have a CPU affinity with the given CPU number For all products. Supported on Linux only.


NVML API Reference Guide (PDF) - vR550 (older) - Last updated March 12, 2024 - Send Feedback