Documentation
¶
Overview ¶
Package persistencemode tracks the NVIDIA persistence mode.
Index ¶
Constants ¶
const ( // EventNamePersistenceModeDisabled is emitted when persistence mode is detected as disabled. EventNamePersistenceModeDisabled = "persistence_mode_disabled" // EventKeyDeviceUUID stores the device UUID associated with the event. EventKeyDeviceUUID = "device_uuid" // EventKeyDeviceBusID stores the PCI bus ID associated with the event. EventKeyDeviceBusID = "device_bus_id" )
const Name = "accelerator-nvidia-persistence-mode"
Name is the ID of the NVIDIA persistence mode component.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(gpudInstance *components.GPUdInstance) (components.Component, error)
New creates a NVIDIA persistence mode component.
Types ¶
type PersistenceMode ¶ added in v0.9.0
type PersistenceMode struct {
UUID string `json:"uuid"`
BusID string `json:"bus_id"`
Enabled bool `json:"enabled"`
// Supported is true if the persistence mode is supported by the device.
Supported bool `json:"supported"`
}
PersistenceMode is the persistence mode of the device. Implements "DCGM_FR_PERSISTENCE_MODE" in DCGM. ref. https://github.com/NVIDIA/DCGM/blob/903d745504f50153be8293f8566346f9de3b3c93/nvvs/plugin_src/software/Software.cpp#L526-L553
Persistence mode controls whether the NVIDIA driver stays loaded when no active clients are connected to the GPU. ref. https://developer.nvidia.com/management-library-nvml
Once all clients have closed the device file, the GPU state will be unloaded unless persistence mode is enabled. ref. https://docs.nvidia.com/deploy/driver-persistence/index.html
NVIDIA Persistence Daemon provides a more robust implementation of persistence mode on Linux. ref. https://docs.nvidia.com/deploy/driver-persistence/index.html#usage
To enable persistence mode, we need to check if "nvidia-persistenced" is running. Or run "nvidia-smi -pm 1" to enable persistence mode.
func GetPersistenceMode ¶ added in v0.9.0
func GetPersistenceMode(uuid string, dev device.Device) (PersistenceMode, error)
GetPersistenceMode returns the persistence mode for a device.