Documentation
¶
Overview ¶
Package lib implements the NVIDIA Management Library (NVML) interface. See https://docs.nvidia.com/deploy/nvml-api/nvml-api-reference.html#nvml-api-reference for more details.
Index ¶
- Constants
- type Library
- type Op
- type OpOption
- func WithDevice(dev device.Device) OpOption
- func WithDeviceGetCurrentClocksEventReasonsForAllDevs(f func() (uint64, nvml.Return)) OpOption
- func WithDeviceGetRemappedRowsForAllDevs(...) OpOption
- func WithInitReturn(initReturn nvml.Return) OpOption
- func WithNVML(nvmlLib nvml.Interface) OpOption
- func WithPropertyExtractor(propertyExtractor nvinfo.PropertyExtractor) OpOption
Constants ¶
const ( EnvMockAllSuccess = "GPUD_NVML_MOCK_ALL_SUCCESS" EnvInjectRemapedRowsPending = "GPUD_NVML_INJECT_REMAPPED_ROWS_PENDING" EnvInjectClockEventsHwSlowdown = "GPUD_NVML_INJECT_CLOCK_EVENTS_HW_SLOWDOWN" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Library ¶
type Library interface {
NVML() nvml.Interface
Device() device.Interface
Info() nvinfo.Interface
Shutdown() nvml.Return
}
func NewDefault ¶
func NewDefault() Library
type OpOption ¶
type OpOption func(*Op)
func WithDevice ¶
func WithDeviceGetCurrentClocksEventReasonsForAllDevs ¶
Specifies the function for all devices to get the current clocks event reasons of the device. Otherwise, defaults to the function returned by device.GetCurrentClocksEventReasons(). ref. https://docs.nvidia.com/deploy/nvml-api/group__nvmlDeviceQueries.html#group__nvmlDeviceQueries_1g7e505374454a0d4fc7339b6c885656d6
func WithDeviceGetRemappedRowsForAllDevs ¶
func WithDeviceGetRemappedRowsForAllDevs(f func() (corrRows int, uncRows int, isPending bool, failureOccurred bool, ret nvml.Return)) OpOption
Specifies the function for all devices to get the remapped rows of the device. Otherwise, defaults to the function returned by device.GetRemappedRows(). ref. https://docs.nvidia.com/deploy/nvml-api/group__nvmlDeviceQueries.html#group__nvmlDeviceQueries_1g055e7c34f7f15b6ae9aac1dabd60870d
func WithInitReturn ¶
Specifies the return value of the NVML library's Init() function. Otherwise, defaults to the return value of the NVML library's Init() function.
func WithNVML ¶
Specifies the NVML library instance. Otherwise, defaults to the NVML library instance returned by nvml.New().
func WithPropertyExtractor ¶
func WithPropertyExtractor(propertyExtractor nvinfo.PropertyExtractor) OpOption
Specifies the property extractor for the NVML library.