NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.0 Release
For Test and Development only
GPU access API: Library

Detailed Description

Modules

 GPU access API: Library (safety subset)
 

Functions

NvError NvRmGpuLibAttachDevice (NvRmGpuLib *hLib, int deviceIndex)
 Attaches and powers up a GPU. More...
 
NvError NvRmGpuLibDetachDevice (NvRmGpuLib *hLib, int deviceIndex)
 Powers down and detaches a GPU. More...
 

Function Documentation

◆ NvRmGpuLibAttachDevice()

NvError NvRmGpuLibAttachDevice ( NvRmGpuLib hLib,
int  deviceIndex 
)

Attaches and powers up a GPU.

Parameters
[in]hLibLibrary handle
[in]deviceIndexGPU device index. See NvRmGpuLibListDevices().
Returns
The usual error code
Return values
NvSuccessDevice attached successfully
NvError_BadValueBad deviceIndex
NvError_NotSupportedThis device does not support attach/detach functionality
NvError_AccessDeniedInsufficient user privileges
NvError_ResourceErrorDevice attachment failed. Likely, the device failed to boot.
NvError_*Unspecified error. Error code returned for diagnostics.
Remarks
This is privileged functionality for system management purposes. Regular applications should not invoke this function.
Generally, only dGPUs can be attached and detached. The typical use case is zero-power idling (ZPI) for power saving when the dGPU is not required.
See also
NvRmGpuLibDetachDevice()

◆ NvRmGpuLibDetachDevice()

NvError NvRmGpuLibDetachDevice ( NvRmGpuLib hLib,
int  deviceIndex 
)

Powers down and detaches a GPU.

Parameters
[in]hLibLibrary handle
[in]deviceIndexGPU device index. See NvRmGpuLibListDevices().
Returns
The usual error code
Return values
NvSuccessDevice detached successfully
NvError_BadValueBad deviceIndex
NvError_NotSupportedThis device does not support attach/detach functionality
NvError_AccessDeniedInsufficient use privileges
NvError_ResourceErrorDevice attachment failed. Likely, the device failed to boot.
NvError_*Unspecified error. Error code returned for diagnostics.
Remarks
This is privileged functionality for system management purposes. Regular applications should not invoke this function.
Generally, only dGPUs can be attached and detached. The typical use case is zero-power idling (ZPI) for power saving when the dGPU is not required.
See also
NvRmGpuLibAttachDevice()