nvml

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nvml provides low-level Go bindings for the NVIDIA Management Library (NVML).

This package provides bindings generated from nvml.h using github.com/ebitengine/purego for cgo-free dynamic loading of libnvidia-ml. Functions returning a C status report errors wrapping Result, whose Error method describes the status with nvmlErrorString.

MIG Management

Device Management

Drain states

  • DeviceDiscoverGpus: Request the OS and the NVIDIA kernel driver to rediscover a portion of the PCI subsystem looking for GPUs that were previously removed.

Device Queries

Multi Instance GPU Management

Power Smoothing Information

PRM Access

Device Configuration

CPU and Memory Affinity

vGPU APIs

Power Profile Information

Event Management

Excluded GPU Queries

vGPU Migration

  • GetVgpuCompatibility: Takes a vGPU instance metadata structure read from VgpuInstance.Metadata, and a vGPU metadata structure for a physical GPU read from Device.VgpuMetadata, and returns compatibility information of the vGPU instance and the physical GPU.
  • GetVgpuVersion: Query the ranges of supported vGPU versions.
  • SetVgpuVersion: Override the preset range of vGPU versions supported by the NVIDIA vGPU Manager with a range set by an administrator.

vGPU Management

GPM Management

Initialization

  • Init: Initialize the NVML Library lazily, without allocating any device state.
  • InitWithFlags: Initialize the NVML Library lazily, without allocating any device state, with additional init flags.
  • Shutdown: Shut down and cleanup NVML Library state.

Event Handling Methods

System Queries

Unit Management

  • UnitGetCount: Retrieves the number of units in the system.
  • Unit.Devices: Retrieves the set of GPU devices that are attached to the specified unit.
  • Unit.FanSpeedInfo: Retrieves the fan speed readings for the unit.
  • NewUnitByIndex: Acquire the handle for a particular unit, based on its index.
  • Unit.LedState: Retrieves the LED state associated with this unit.
  • Unit.PsuInfo: Retrieves the PSU stats for the unit.
  • Unit.Temperature: Retrieves the temperature readings for the unit, in degrees C.
  • Unit.Info: Retrieves the static information associated with a unit.
  • Unit.SetLedState: Set the LED state for the unit.

Functions bound at load time

Each function below binds, when the library loads, the first of its symbols that the library exports, newest first, so that it also runs against libraries older than the header. A shim takes the newest prototype and reaches its last symbol, an older version with fewer parameters, as its documentation describes.

Code generated by nvml-survey; DO NOT EDIT.

Example

Example enumerates the GPUs on the system and prints basic telemetry for each. It returns early when the NVML library is not available.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	if err := nvml.Init(); err != nil {
		fmt.Println("NVML unavailable:", err)
		return
	}
	defer nvml.Shutdown()

	count, err := nvml.DeviceGetCount()
	if err != nil {
		fmt.Println("device count:", err)
		return
	}
	for i := uint32(0); i < count; i++ {
		dev, err := nvml.NewDeviceByIndex(i)
		if err != nil {
			continue
		}
		name, _ := dev.Name()
		mem, _ := dev.MemoryInfo()
		util, _ := dev.UtilizationRates()
		fmt.Printf("gpu %d: %s, %d/%d MiB used, %d%% busy\n",
			i, name, mem.Used>>20, mem.Total>>20, util.Gpu)
	}
}

Index

Examples

Constants

View Source
const (
	// N255MaskBitsPerElem is NVML_255_MASK_BITS_PER_ELEM. Number of bits per element.
	N255MaskBitsPerElem = 32
	// N255MaskNumElems is NVML_255_MASK_NUM_ELEMS. Number of elements.
	N255MaskNumElems = 8
	// AdaptiveClockingInfoStatusDisabled is NVML_ADAPTIVE_CLOCKING_INFO_STATUS_DISABLED. Adaptive clocking is disabled.
	AdaptiveClockingInfoStatusDisabled = 0
	// AdaptiveClockingInfoStatusEnabled is NVML_ADAPTIVE_CLOCKING_INFO_STATUS_ENABLED. Adaptive clocking is enabled.
	AdaptiveClockingInfoStatusEnabled = 1
	// ApiVersion is NVML_API_VERSION. NVML API version identifier.
	ApiVersion = 13
	// C2CPowerStateFullPower is NVML_C2C_POWER_STATE_FULL_POWER.
	C2CPowerStateFullPower = 0
	// C2CPowerStateLowPower is NVML_C2C_POWER_STATE_LOW_POWER.
	C2CPowerStateLowPower = 1
	// CcAcceptingClientRequestsFalse is NVML_CC_ACCEPTING_CLIENT_REQUESTS_FALSE. Client requests are not accepted.
	CcAcceptingClientRequestsFalse = 0
	// CcAcceptingClientRequestsTrue is NVML_CC_ACCEPTING_CLIENT_REQUESTS_TRUE. Client requests are accepted.
	CcAcceptingClientRequestsTrue = 1
	// CcCecAttestationReportNotPresent is NVML_CC_CEC_ATTESTATION_REPORT_NOT_PRESENT. CEC attestation report is not present.
	CcCecAttestationReportNotPresent = 0
	// CcCecAttestationReportPresent is NVML_CC_CEC_ATTESTATION_REPORT_PRESENT. CEC attestation report is present.
	CcCecAttestationReportPresent = 1
	// CcGpuAttestationReportSize is NVML_CC_GPU_ATTESTATION_REPORT_SIZE. Size of the attestation report.
	CcGpuAttestationReportSize = 8192
	// CcGpuCecAttestationReportSize is NVML_CC_GPU_CEC_ATTESTATION_REPORT_SIZE. Size of the CEC attestation report.
	CcGpuCecAttestationReportSize = 4096
	// CcGpuCecNonceSize is NVML_CC_GPU_CEC_NONCE_SIZE. Size of the CEC nonce.
	CcGpuCecNonceSize = 32
	// CcKeyRotationThresholdAttackerAdvantageMax is NVML_CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MAX. Maximum attacker advantage for key rotation threshold.
	CcKeyRotationThresholdAttackerAdvantageMax = 65
	// CcKeyRotationThresholdAttackerAdvantageMin is NVML_CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MIN. Minimum attacker advantage for key rotation threshold.
	CcKeyRotationThresholdAttackerAdvantageMin = 50
	// CcSystemCpuCapsAmdSev is NVML_CC_SYSTEM_CPU_CAPS_AMD_SEV. AMD SEV CPU capability.
	CcSystemCpuCapsAmdSev = 1
	// CcSystemCpuCapsAmdSevSnp is NVML_CC_SYSTEM_CPU_CAPS_AMD_SEV_SNP. AMD SEV-SNP CPU capability.
	CcSystemCpuCapsAmdSevSnp = 3
	// CcSystemCpuCapsAmdSevTio is NVML_CC_SYSTEM_CPU_CAPS_AMD_SEV_TIO. AMD SEV-TIO CPU capability.
	CcSystemCpuCapsAmdSevTio = 7
	// CcSystemCpuCapsAmdSnpVtom is NVML_CC_SYSTEM_CPU_CAPS_AMD_SNP_VTOM. AMD SNP-VTOM CPU capability.
	CcSystemCpuCapsAmdSnpVtom = 4
	// CcSystemCpuCapsArmCca is NVML_CC_SYSTEM_CPU_CAPS_ARM_CCA. ARM CCA CPU capability.
	CcSystemCpuCapsArmCca = 5
	// CcSystemCpuCapsIntelTdx is NVML_CC_SYSTEM_CPU_CAPS_INTEL_TDX. Intel TDX CPU capability.
	CcSystemCpuCapsIntelTdx = 2
	// CcSystemCpuCapsIntelTdxConnect is NVML_CC_SYSTEM_CPU_CAPS_INTEL_TDX_CONNECT. Intel TDX Connect CPU capability.
	CcSystemCpuCapsIntelTdxConnect = 6
	// CcSystemCpuCapsNone is NVML_CC_SYSTEM_CPU_CAPS_NONE. No confidential compute CPU capability.
	CcSystemCpuCapsNone = 0
	// CcSystemDevtoolsModeOff is NVML_CC_SYSTEM_DEVTOOLS_MODE_OFF. DevTools mode is off.
	CcSystemDevtoolsModeOff = 0
	// CcSystemDevtoolsModeOn is NVML_CC_SYSTEM_DEVTOOLS_MODE_ON. DevTools mode is on.
	CcSystemDevtoolsModeOn = 1
	// CcSystemEnvironmentProd is NVML_CC_SYSTEM_ENVIRONMENT_PROD. Environment is production.
	CcSystemEnvironmentProd = 2
	// CcSystemEnvironmentSim is NVML_CC_SYSTEM_ENVIRONMENT_SIM. Environment is simulation.
	CcSystemEnvironmentSim = 1
	// CcSystemEnvironmentUnavailable is NVML_CC_SYSTEM_ENVIRONMENT_UNAVAILABLE. Environment is unavailable.
	CcSystemEnvironmentUnavailable = 0
	// CcSystemFeatureBmsaiEnabled is NVML_CC_SYSTEM_FEATURE_BMSAI_ENABLED. Feature is enabled for Baremetal Secure AI.
	CcSystemFeatureBmsaiEnabled = 2
	// CcSystemFeatureDisabled is NVML_CC_SYSTEM_FEATURE_DISABLED. Feature is disabled.
	CcSystemFeatureDisabled = 0
	// CcSystemFeatureEnabled is NVML_CC_SYSTEM_FEATURE_ENABLED. Feature is enabled.
	CcSystemFeatureEnabled = 1
	// CcSystemGpusCcBmsaiCapable is NVML_CC_SYSTEM_GPUS_CC_BMSAI_CAPABLE. GPUs are Baremetal Secure AI capable.
	CcSystemGpusCcBmsaiCapable = 2
	// CcSystemGpusCcCapable is NVML_CC_SYSTEM_GPUS_CC_CAPABLE. GPUs are confidential compute capable.
	CcSystemGpusCcCapable = 1
	// CcSystemGpusCcNotCapable is NVML_CC_SYSTEM_GPUS_CC_NOT_CAPABLE. GPUs are not confidential compute capable.
	CcSystemGpusCcNotCapable = 0
	// CcSystemMultigpuNone is NVML_CC_SYSTEM_MULTIGPU_NONE. Multi-GPU mode is none.
	CcSystemMultigpuNone = 0
	// CcSystemMultigpuNvle is NVML_CC_SYSTEM_MULTIGPU_NVLE. Multi-GPU mode is NVLE.
	CcSystemMultigpuNvle = 2
	// CcSystemMultigpuProtectedPcie is NVML_CC_SYSTEM_MULTIGPU_PROTECTED_PCIE. Multi-GPU mode is protected PCIe.
	CcSystemMultigpuProtectedPcie = 1
	// CcSystemTdispStateDisabled is NVML_CC_SYSTEM_TDISP_STATE_DISABLED. The GPUs are not running behind a TDI.
	CcSystemTdispStateDisabled = 0
	// CcSystemTdispStateNotReady is NVML_CC_SYSTEM_TDISP_STATE_NOT_READY. The TDIs are UNLOCKED, i.e. TDISP FW-only mode.
	CcSystemTdispStateNotReady = 1
	// CcSystemTdispStateReady is NVML_CC_SYSTEM_TDISP_STATE_READY. The TDIs completed the TSM handshake and reached RUN, i.e. TDISP secure mode.
	CcSystemTdispStateReady = 2
	// ComputeInstanceEngineProfileCount is NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_COUNT. Number of engine profiles.
	ComputeInstanceEngineProfileCount = 1
	// ComputeInstanceEngineProfileShared is NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_SHARED. All the engines except multiprocessors would be shared.
	ComputeInstanceEngineProfileShared = 0
	// ComputeInstanceIdAny is NVML_COMPUTE_INSTANCE_ID_ANY. Sentinel value used when no MIG compute instance ID applies.
	ComputeInstanceIdAny = 4294967295
	// ComputeInstanceProfile1Slice is NVML_COMPUTE_INSTANCE_PROFILE_1_SLICE. 1_SLICE compute instance profile.
	ComputeInstanceProfile1Slice = 0
	// ComputeInstanceProfile1SliceREV1 is NVML_COMPUTE_INSTANCE_PROFILE_1_SLICE_REV1. 1_SLICE compute instance profile (rev1).
	ComputeInstanceProfile1SliceREV1 = 7
	// ComputeInstanceProfile2Slice is NVML_COMPUTE_INSTANCE_PROFILE_2_SLICE. 2_SLICE compute instance profile.
	ComputeInstanceProfile2Slice = 1
	// ComputeInstanceProfile3Slice is NVML_COMPUTE_INSTANCE_PROFILE_3_SLICE. 3_SLICE compute instance profile.
	ComputeInstanceProfile3Slice = 2
	// ComputeInstanceProfile4Slice is NVML_COMPUTE_INSTANCE_PROFILE_4_SLICE. 4_SLICE compute instance profile.
	ComputeInstanceProfile4Slice = 3
	// ComputeInstanceProfile6Slice is NVML_COMPUTE_INSTANCE_PROFILE_6_SLICE. 6_SLICE compute instance profile.
	ComputeInstanceProfile6Slice = 6
	// ComputeInstanceProfile7Slice is NVML_COMPUTE_INSTANCE_PROFILE_7_SLICE. 7_SLICE compute instance profile (perf optimized for host work scheduling).
	ComputeInstanceProfile7Slice = 4
	// ComputeInstanceProfile7SliceNvl is NVML_COMPUTE_INSTANCE_PROFILE_7_SLICE_NVL. 7_SLICE compute instance profile (perf optimized for multi-GPU use).
	ComputeInstanceProfile7SliceNvl = 8
	// ComputeInstanceProfile8Slice is NVML_COMPUTE_INSTANCE_PROFILE_8_SLICE. 8_SLICE compute instance profile.
	ComputeInstanceProfile8Slice = 5
	// ComputeInstanceProfileCapsGfx is NVML_COMPUTE_INSTANCE_PROFILE_CAPS_GFX. MIG compute instance profile capability.
	//
	// Bit field values representing MIG profile capabilities [ComputeInstanceProfileInfoV3].capabilities.
	ComputeInstanceProfileCapsGfx = 1
	// ComputeInstanceProfileCount is NVML_COMPUTE_INSTANCE_PROFILE_COUNT. Number of compute instance profiles.
	ComputeInstanceProfileCount = 9
	// CperCursorHandleInit is NVML_CPER_CURSOR_HANDLE_INIT. Initialize nvmlCPERCursorHandle_t to this value before first use in any CPER API.
	CperCursorHandleInit uint64 = 0
	// DeviceHostnameBufferSize is NVML_DEVICE_HOSTNAME_BUFFER_SIZE. Buffer size for hostname string.
	DeviceHostnameBufferSize = 64
	// DeviceInforomVersionBufferSize is NVML_DEVICE_INFOROM_VERSION_BUFFER_SIZE. Buffer size guaranteed to be large enough for [Device.InforomVersion] and [Device.InforomImageVersion].
	DeviceInforomVersionBufferSize = 16
	// DeviceMemoryLimitMax is NVML_DEVICE_MEMORY_LIMIT_MAX. Value for "maximum" memory limit.
	DeviceMemoryLimitMax uint64 = 18446744073709551615
	// DeviceMigDisable is NVML_DEVICE_MIG_DISABLE. Disable Multi Instance GPU mode.
	DeviceMigDisable = 0
	// DeviceMigEnable is NVML_DEVICE_MIG_ENABLE. Enable Multi Instance GPU mode.
	DeviceMigEnable = 1
	// DeviceNameBufferSize is NVML_DEVICE_NAME_BUFFER_SIZE. Buffer size guaranteed to be large enough for storing GPU device names.
	DeviceNameBufferSize = 64
	// DeviceNameV2BufferSize is NVML_DEVICE_NAME_V2_BUFFER_SIZE. Buffer size guaranteed to be large enough for [Device.Name].
	DeviceNameV2BufferSize = 96
	// DevicePartNumberBufferSize is NVML_DEVICE_PART_NUMBER_BUFFER_SIZE. Buffer size guaranteed to be large enough for [Device.BoardPartNumber].
	DevicePartNumberBufferSize = 80
	// DevicePciBusIdBufferSize is NVML_DEVICE_PCI_BUS_ID_BUFFER_SIZE. Buffer size for PCI bus ID.
	DevicePciBusIdBufferSize = 32
	// DevicePciBusIdBufferV2Size is NVML_DEVICE_PCI_BUS_ID_BUFFER_V2_SIZE. Buffer size for legacy PCI bus ID.
	DevicePciBusIdBufferV2Size = 16
	// DeviceSerialBufferSize is NVML_DEVICE_SERIAL_BUFFER_SIZE. Buffer size guaranteed to be large enough for [Device.Serial].
	DeviceSerialBufferSize = 30
	// DeviceUuidAsciiLen is NVML_DEVICE_UUID_ASCII_LEN. Length of UUID in ASCII format.
	DeviceUuidAsciiLen = 41
	// DeviceUuidBinaryLen is NVML_DEVICE_UUID_BINARY_LEN. Length of UUID in binary format.
	DeviceUuidBinaryLen = 16
	// DeviceUuidBufferSize is NVML_DEVICE_UUID_BUFFER_SIZE. Buffer size guaranteed to be large enough for storing GPU identifiers.
	DeviceUuidBufferSize = 80
	// DeviceUuidV2BufferSize is NVML_DEVICE_UUID_V2_BUFFER_SIZE. Buffer size guaranteed to be large enough for [Device.UUID].
	DeviceUuidV2BufferSize = 96
	// DeviceVbiosVersionBufferSize is NVML_DEVICE_VBIOS_VERSION_BUFFER_SIZE. Buffer size guaranteed to be large enough for [Device.VbiosVersion].
	DeviceVbiosVersionBufferSize = 32
	// DevCapEgm is NVML_DEV_CAP_EGM. Extended GPU memory.
	DevCapEgm = 1
	// DoubleBitEcc is NVML_DOUBLE_BIT_ECC. Deprecated double bit ECC error. See [MemoryErrorTypeUncorrected].
	//
	// Deprecated: Mapped to [MemoryErrorTypeUncorrected].
	DoubleBitEcc = MemoryErrorTypeUncorrected
	// FieldDevActiveBankRemappings is NVML_FI_DEV_ACTIVE_BANK_REMAPPINGS. Number of active bank remappings.
	FieldDevActiveBankRemappings uint32 = 303
	// FieldDevBankRemapperHistogramMax is NVML_FI_DEV_BANK_REMAPPER_HISTOGRAM_MAX. Number of groups with full bank remap availability.
	FieldDevBankRemapperHistogramMax uint32 = 305
	// FieldDevBankRemapperHistogramNone is NVML_FI_DEV_BANK_REMAPPER_HISTOGRAM_NONE. Number of groups with no spare bankremap availability.
	FieldDevBankRemapperHistogramNone uint32 = 306
	// FieldDevC2CLinkCount is NVML_FI_DEV_C2C_LINK_COUNT. Number of C2C Links present on the device.
	FieldDevC2CLinkCount uint32 = 170
	// FieldDevC2CLinkErrorIntr is NVML_FI_DEV_C2C_LINK_ERROR_INTR. C2C Link CRC Error Counter.
	FieldDevC2CLinkErrorIntr uint32 = 231
	// FieldDevC2CLinkErrorReplay is NVML_FI_DEV_C2C_LINK_ERROR_REPLAY. C2C Link Replay Error Counter.
	FieldDevC2CLinkErrorReplay uint32 = 232
	// FieldDevC2CLinkErrorReplayB2B is NVML_FI_DEV_C2C_LINK_ERROR_REPLAY_B2B. C2C Link Back to Back Replay Error Counter.
	FieldDevC2CLinkErrorReplayB2B uint32 = 233
	// FieldDevC2CLinkGetMaxBw is NVML_FI_DEV_C2C_LINK_GET_MAX_BW. C2C Link Speed in MBps for active links.
	FieldDevC2CLinkGetMaxBw uint32 = 172
	// FieldDevC2CLinkGetStatus is NVML_FI_DEV_C2C_LINK_GET_STATUS. C2C Link Status 0=INACTIVE 1=ACTIVE.
	FieldDevC2CLinkGetStatus uint32 = 171
	// FieldDevC2CLinkPowerState is NVML_FI_DEV_C2C_LINK_POWER_STATE. C2C Link Power state. See NVML_C2C_POWER_STATE_*.
	FieldDevC2CLinkPowerState uint32 = 234
	// FieldDevClocksEventReasonHwPowerBrakeSlowdown is NVML_FI_DEV_CLOCKS_EVENT_REASON_HW_POWER_BRAKE_SLOWDOWN. Throttling due to external power brake assertion trigger (reducing core clocks by a factor of 2 or more) in ns.
	FieldDevClocksEventReasonHwPowerBrakeSlowdown uint32 = 271
	// FieldDevClocksEventReasonHwThermSlowdown is NVML_FI_DEV_CLOCKS_EVENT_REASON_HW_THERM_SLOWDOWN. Throttling due to temperature being too high (reducing core clocks by a factor of 2 or more) in ns.
	FieldDevClocksEventReasonHwThermSlowdown uint32 = 270
	// FieldDevClocksEventReasonSwPowerCap is NVML_FI_DEV_CLOCKS_EVENT_REASON_SW_POWER_CAP. Throttling to not exceed currently set power limits in ns.
	FieldDevClocksEventReasonSwPowerCap = FieldDevPerfPolicyPower
	// FieldDevClocksEventReasonSwThermSlowdown is NVML_FI_DEV_CLOCKS_EVENT_REASON_SW_THERM_SLOWDOWN. Throttling to ensure ((GPU temp < GPU Max Operating Temp) && (Memory Temp < Memory Max Operating Temp)) in ns.
	FieldDevClocksEventReasonSwThermSlowdown uint32 = 269
	// FieldDevClocksEventReasonSyncBoost is NVML_FI_DEV_CLOCKS_EVENT_REASON_SYNC_BOOST. Throttling to match minimum possible clock across Sync Boost Group in ns.
	FieldDevClocksEventReasonSyncBoost = FieldDevPerfPolicySyncBoost
	// FieldDevDrainAndResetStatus is NVML_FI_DEV_DRAIN_AND_RESET_STATUS.
	//
	// Deprecated: Do not use (use [FieldDevGetGpuRecoveryAction] instead).
	FieldDevDrainAndResetStatus uint32 = 227
	// FieldDevEccCurrent is NVML_FI_DEV_ECC_CURRENT. Current ECC mode. 1=Active. 0=Inactive.
	FieldDevEccCurrent uint32 = 1
	// FieldDevEccDbeAggCbu is NVML_FI_DEV_ECC_DBE_AGG_CBU. CBU double bit aggregate ECC errors.
	FieldDevEccDbeAggCbu uint32 = 28
	// FieldDevEccDbeAggDev is NVML_FI_DEV_ECC_DBE_AGG_DEV. Device memory double bit aggregate (persistent) ECC errors.
	FieldDevEccDbeAggDev uint32 = 23
	// FieldDevEccDbeAggL1 is NVML_FI_DEV_ECC_DBE_AGG_L1. L1 cache double bit aggregate (persistent) ECC errors.
	FieldDevEccDbeAggL1 uint32 = 19
	// FieldDevEccDbeAggL2 is NVML_FI_DEV_ECC_DBE_AGG_L2. L2 cache double bit aggregate (persistent) ECC errors.
	FieldDevEccDbeAggL2 uint32 = 21
	// FieldDevEccDbeAggReg is NVML_FI_DEV_ECC_DBE_AGG_REG. Register File double bit aggregate (persistent) ECC errors.
	FieldDevEccDbeAggReg uint32 = 25
	// FieldDevEccDbeAggTex is NVML_FI_DEV_ECC_DBE_AGG_TEX. Texture memory double bit aggregate (persistent) ECC errors.
	FieldDevEccDbeAggTex uint32 = 27
	// FieldDevEccDbeAggTotal is NVML_FI_DEV_ECC_DBE_AGG_TOTAL. Total double bit aggregate (persistent) ECC errors.
	FieldDevEccDbeAggTotal uint32 = 6
	// FieldDevEccDbeVolCbu is NVML_FI_DEV_ECC_DBE_VOL_CBU. CBU double bit volatile ECC errors.
	FieldDevEccDbeVolCbu uint32 = 17
	// FieldDevEccDbeVolDev is NVML_FI_DEV_ECC_DBE_VOL_DEV. Device memory double bit volatile ECC errors.
	FieldDevEccDbeVolDev uint32 = 12
	// FieldDevEccDbeVolL1 is NVML_FI_DEV_ECC_DBE_VOL_L1. L1 cache double bit volatile ECC errors.
	FieldDevEccDbeVolL1 uint32 = 8
	// FieldDevEccDbeVolL2 is NVML_FI_DEV_ECC_DBE_VOL_L2. L2 cache double bit volatile ECC errors.
	FieldDevEccDbeVolL2 uint32 = 10
	// FieldDevEccDbeVolReg is NVML_FI_DEV_ECC_DBE_VOL_REG. Register file double bit volatile ECC errors.
	FieldDevEccDbeVolReg uint32 = 14
	// FieldDevEccDbeVolTex is NVML_FI_DEV_ECC_DBE_VOL_TEX. Texture memory double bit volatile ECC errors.
	FieldDevEccDbeVolTex uint32 = 16
	// FieldDevEccDbeVolTotal is NVML_FI_DEV_ECC_DBE_VOL_TOTAL. Total double bit volatile ECC errors.
	FieldDevEccDbeVolTotal uint32 = 4
	// FieldDevEccPending is NVML_FI_DEV_ECC_PENDING. Pending ECC mode. 1=Active. 0=Inactive.
	FieldDevEccPending uint32 = 2
	// FieldDevEccSbeAggDev is NVML_FI_DEV_ECC_SBE_AGG_DEV. Device memory single bit aggregate (persistent) ECC errors.
	FieldDevEccSbeAggDev uint32 = 22
	// FieldDevEccSbeAggL1 is NVML_FI_DEV_ECC_SBE_AGG_L1. L1 cache single bit aggregate (persistent) ECC errors.
	FieldDevEccSbeAggL1 uint32 = 18
	// FieldDevEccSbeAggL2 is NVML_FI_DEV_ECC_SBE_AGG_L2. L2 cache single bit aggregate (persistent) ECC errors.
	FieldDevEccSbeAggL2 uint32 = 20
	// FieldDevEccSbeAggReg is NVML_FI_DEV_ECC_SBE_AGG_REG. Register File single bit aggregate (persistent) ECC errors.
	FieldDevEccSbeAggReg uint32 = 24
	// FieldDevEccSbeAggTex is NVML_FI_DEV_ECC_SBE_AGG_TEX. Texture memory single bit aggregate (persistent) ECC errors.
	FieldDevEccSbeAggTex uint32 = 26
	// FieldDevEccSbeAggTotal is NVML_FI_DEV_ECC_SBE_AGG_TOTAL. Total single bit aggregate (persistent) ECC errors.
	FieldDevEccSbeAggTotal uint32 = 5
	// FieldDevEccSbeVolDev is NVML_FI_DEV_ECC_SBE_VOL_DEV. Device memory single bit volatile ECC errors.
	FieldDevEccSbeVolDev uint32 = 11
	// FieldDevEccSbeVolL1 is NVML_FI_DEV_ECC_SBE_VOL_L1. L1 cache single bit volatile ECC errors.
	FieldDevEccSbeVolL1 uint32 = 7
	// FieldDevEccSbeVolL2 is NVML_FI_DEV_ECC_SBE_VOL_L2. L2 cache single bit volatile ECC errors.
	FieldDevEccSbeVolL2 uint32 = 9
	// FieldDevEccSbeVolReg is NVML_FI_DEV_ECC_SBE_VOL_REG. Register file single bit volatile ECC errors.
	FieldDevEccSbeVolReg uint32 = 13
	// FieldDevEccSbeVolTex is NVML_FI_DEV_ECC_SBE_VOL_TEX. Texture memory single bit volatile ECC errors.
	FieldDevEccSbeVolTex uint32 = 15
	// FieldDevEccSbeVolTotal is NVML_FI_DEV_ECC_SBE_VOL_TOTAL. Total single bit volatile ECC errors.
	FieldDevEccSbeVolTotal uint32 = 3
	// FieldDevEdppMultiplier is NVML_FI_DEV_EDPP_MULTIPLIER. EDPp multiplier expressed as a percentage.
	FieldDevEdppMultiplier uint32 = 274
	// FieldDevEnergy is NVML_FI_DEV_ENERGY. Total energy consumption (in mJ) since the driver was last reloaded. Same as [FieldDevTotalEnergyConsumption] for the GPU.
	FieldDevEnergy uint32 = 191
	// FieldDevGetGpuRecoveryAction is NVML_FI_DEV_GET_GPU_RECOVERY_ACTION. GPU Recovery action. See [DeviceGpuRecoveryAction].
	FieldDevGetGpuRecoveryAction uint32 = 230
	// FieldDevGpuTemp is NVML_FI_DEV_GPU_TEMP. Current GPU temperature in degrees C with sub-degree precision.
	FieldDevGpuTemp uint32 = 308
	// FieldDevInactiveBankRemappings is NVML_FI_DEV_INACTIVE_BANK_REMAPPINGS. Number of inactive bank remappings.
	FieldDevInactiveBankRemappings uint32 = 304
	// FieldDevIsMigModeIndependentMigQueryCapable is NVML_FI_DEV_IS_MIG_MODE_INDEPENDENT_MIG_QUERY_CAPABLE. MIG mode independent, MIG query capable device. 1=yes. 0=no.
	FieldDevIsMigModeIndependentMigQueryCapable uint32 = 199
	// FieldDevIsResetlessMigSupported is NVML_FI_DEV_IS_RESETLESS_MIG_SUPPORTED. Device's Restless MIG Capability.
	FieldDevIsResetlessMigSupported uint32 = 184
	// FieldDevMclkMinSwitchIntervalMilliseconds is NVML_FI_DEV_MCLK_MIN_SWITCH_INTERVAL_MILLISECONDS. minimum required elapsed time between runtime mclk switches, 0 = no rate limit.
	FieldDevMclkMinSwitchIntervalMilliseconds uint32 = 299
	// FieldDevMclkSwitchType is NVML_FI_DEV_MCLK_SWITCH_TYPE. See NVML_MCLK_SWITCH_TYPE_<XYZ> for all enumerations.
	FieldDevMclkSwitchType uint32 = 298
	// FieldDevMemoryTemp is NVML_FI_DEV_MEMORY_TEMP. Memory temperature for the device.
	FieldDevMemoryTemp uint32 = 82
	// FieldDevMmaStallPercent is NVML_FI_DEV_MMA_STALL_PERCENT. MMA (Matrix Multiply Accumulate) stall percentage.
	FieldDevMmaStallPercent uint32 = 297
	// FieldDevNvlinkBandwidthC0L0 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L0. NVLink Bandwidth Counter for Counter Set 0, Lane 0.
	FieldDevNvlinkBandwidthC0L0 uint32 = 60
	// FieldDevNvlinkBandwidthC0L1 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L1. NVLink Bandwidth Counter for Counter Set 0, Lane 1.
	FieldDevNvlinkBandwidthC0L1 uint32 = 61
	// FieldDevNvlinkBandwidthC0L10 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L10. NVLink Bandwidth Counter for Counter Set 0, Lane 10.
	FieldDevNvlinkBandwidthC0L10 uint32 = 124
	// FieldDevNvlinkBandwidthC0L11 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L11. NVLink Bandwidth Counter for Counter Set 0, Lane 11.
	FieldDevNvlinkBandwidthC0L11 uint32 = 125
	// FieldDevNvlinkBandwidthC0L2 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L2. NVLink Bandwidth Counter for Counter Set 0, Lane 2.
	FieldDevNvlinkBandwidthC0L2 uint32 = 62
	// FieldDevNvlinkBandwidthC0L3 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L3. NVLink Bandwidth Counter for Counter Set 0, Lane 3.
	FieldDevNvlinkBandwidthC0L3 uint32 = 63
	// FieldDevNvlinkBandwidthC0L4 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L4. NVLink Bandwidth Counter for Counter Set 0, Lane 4.
	FieldDevNvlinkBandwidthC0L4 uint32 = 64
	// FieldDevNvlinkBandwidthC0L5 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L5. NVLink Bandwidth Counter for Counter Set 0, Lane 5.
	FieldDevNvlinkBandwidthC0L5 uint32 = 65
	// FieldDevNvlinkBandwidthC0L6 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L6. NVLink Bandwidth Counter for Counter Set 0, Lane 6.
	FieldDevNvlinkBandwidthC0L6 uint32 = 120
	// FieldDevNvlinkBandwidthC0L7 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L7. NVLink Bandwidth Counter for Counter Set 0, Lane 7.
	FieldDevNvlinkBandwidthC0L7 uint32 = 121
	// FieldDevNvlinkBandwidthC0L8 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L8. NVLink Bandwidth Counter for Counter Set 0, Lane 8.
	FieldDevNvlinkBandwidthC0L8 uint32 = 122
	// FieldDevNvlinkBandwidthC0L9 is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L9. NVLink Bandwidth Counter for Counter Set 0, Lane 9.
	FieldDevNvlinkBandwidthC0L9 uint32 = 123
	// FieldDevNvlinkBandwidthC0Total is NVML_FI_DEV_NVLINK_BANDWIDTH_C0_TOTAL. NVLink Bandwidth Counter Total for Counter Set 0, All Lanes.
	FieldDevNvlinkBandwidthC0Total uint32 = 66
	// FieldDevNvlinkBandwidthC1L0 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L0. NVLink Bandwidth Counter for Counter Set 1, Lane 0.
	FieldDevNvlinkBandwidthC1L0 uint32 = 67
	// FieldDevNvlinkBandwidthC1L1 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L1. NVLink Bandwidth Counter for Counter Set 1, Lane 1.
	FieldDevNvlinkBandwidthC1L1 uint32 = 68
	// FieldDevNvlinkBandwidthC1L10 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L10. NVLink Bandwidth Counter for Counter Set 1, Lane 10.
	FieldDevNvlinkBandwidthC1L10 uint32 = 130
	// FieldDevNvlinkBandwidthC1L11 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L11. NVLink Bandwidth Counter for Counter Set 1, Lane 11.
	FieldDevNvlinkBandwidthC1L11 uint32 = 131
	// FieldDevNvlinkBandwidthC1L2 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L2. NVLink Bandwidth Counter for Counter Set 1, Lane 2.
	FieldDevNvlinkBandwidthC1L2 uint32 = 69
	// FieldDevNvlinkBandwidthC1L3 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L3. NVLink Bandwidth Counter for Counter Set 1, Lane 3.
	FieldDevNvlinkBandwidthC1L3 uint32 = 70
	// FieldDevNvlinkBandwidthC1L4 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L4. NVLink Bandwidth Counter for Counter Set 1, Lane 4.
	FieldDevNvlinkBandwidthC1L4 uint32 = 71
	// FieldDevNvlinkBandwidthC1L5 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L5. NVLink Bandwidth Counter for Counter Set 1, Lane 5.
	FieldDevNvlinkBandwidthC1L5 uint32 = 72
	// FieldDevNvlinkBandwidthC1L6 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L6. NVLink Bandwidth Counter for Counter Set 1, Lane 6.
	FieldDevNvlinkBandwidthC1L6 uint32 = 126
	// FieldDevNvlinkBandwidthC1L7 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L7. NVLink Bandwidth Counter for Counter Set 1, Lane 7.
	FieldDevNvlinkBandwidthC1L7 uint32 = 127
	// FieldDevNvlinkBandwidthC1L8 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L8. NVLink Bandwidth Counter for Counter Set 1, Lane 8.
	FieldDevNvlinkBandwidthC1L8 uint32 = 128
	// FieldDevNvlinkBandwidthC1L9 is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L9. NVLink Bandwidth Counter for Counter Set 1, Lane 9.
	FieldDevNvlinkBandwidthC1L9 uint32 = 129
	// FieldDevNvlinkBandwidthC1Total is NVML_FI_DEV_NVLINK_BANDWIDTH_C1_TOTAL. NVLink Bandwidth Counter Total for Counter Set 1, All Lanes.
	FieldDevNvlinkBandwidthC1Total uint32 = 73
	// FieldDevNvlinkCountBufferOverrunErrors is NVML_FI_DEV_NVLINK_COUNT_BUFFER_OVERRUN_ERRORS. Number of packets that were discarded on Rx due to buffer overrun.
	FieldDevNvlinkCountBufferOverrunErrors uint32 = 207
	// FieldDevNvlinkCountEffectiveBer is NVML_FI_DEV_NVLINK_COUNT_EFFECTIVE_BER. Effective BER for effective errors.
	FieldDevNvlinkCountEffectiveBer uint32 = 220
	// FieldDevNvlinkCountEffectiveErrors is NVML_FI_DEV_NVLINK_COUNT_EFFECTIVE_ERRORS. Sum of the number of errors in each Nvlink packet.
	FieldDevNvlinkCountEffectiveErrors uint32 = 219
	// FieldDevNvlinkCountFecHistory0 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_0. Count of symbol errors that are corrected - bin 0.
	FieldDevNvlinkCountFecHistory0 uint32 = 235
	// FieldDevNvlinkCountFecHistory1 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_1. Count of symbol errors that are corrected - bin 1.
	FieldDevNvlinkCountFecHistory1 uint32 = 236
	// FieldDevNvlinkCountFecHistory10 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_10. Count of symbol errors that are corrected - bin 10.
	FieldDevNvlinkCountFecHistory10 uint32 = 245
	// FieldDevNvlinkCountFecHistory11 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_11. Count of symbol errors that are corrected - bin 11.
	FieldDevNvlinkCountFecHistory11 uint32 = 246
	// FieldDevNvlinkCountFecHistory12 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_12. Count of symbol errors that are corrected - bin 12.
	FieldDevNvlinkCountFecHistory12 uint32 = 247
	// FieldDevNvlinkCountFecHistory13 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_13. Count of symbol errors that are corrected - bin 13.
	FieldDevNvlinkCountFecHistory13 uint32 = 248
	// FieldDevNvlinkCountFecHistory14 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_14. Count of symbol errors that are corrected - bin 14.
	FieldDevNvlinkCountFecHistory14 uint32 = 249
	// FieldDevNvlinkCountFecHistory15 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_15. Count of symbol errors that are corrected - bin 15.
	FieldDevNvlinkCountFecHistory15 uint32 = 250
	// FieldDevNvlinkCountFecHistory2 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_2. Count of symbol errors that are corrected - bin 2.
	FieldDevNvlinkCountFecHistory2 uint32 = 237
	// FieldDevNvlinkCountFecHistory3 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_3. Count of symbol errors that are corrected - bin 3.
	FieldDevNvlinkCountFecHistory3 uint32 = 238
	// FieldDevNvlinkCountFecHistory4 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_4. Count of symbol errors that are corrected - bin 4.
	FieldDevNvlinkCountFecHistory4 uint32 = 239
	// FieldDevNvlinkCountFecHistory5 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_5. Count of symbol errors that are corrected - bin 5.
	FieldDevNvlinkCountFecHistory5 uint32 = 240
	// FieldDevNvlinkCountFecHistory6 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_6. Count of symbol errors that are corrected - bin 6.
	FieldDevNvlinkCountFecHistory6 uint32 = 241
	// FieldDevNvlinkCountFecHistory7 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_7. Count of symbol errors that are corrected - bin 7.
	FieldDevNvlinkCountFecHistory7 uint32 = 242
	// FieldDevNvlinkCountFecHistory8 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_8. Count of symbol errors that are corrected - bin 8.
	FieldDevNvlinkCountFecHistory8 uint32 = 243
	// FieldDevNvlinkCountFecHistory9 is NVML_FI_DEV_NVLINK_COUNT_FEC_HISTORY_9. Count of symbol errors that are corrected - bin 9.
	FieldDevNvlinkCountFecHistory9 uint32 = 244
	// FieldDevNvlinkCountLinkRecoveryEvents is NVML_FI_DEV_NVLINK_COUNT_LINK_RECOVERY_EVENTS. Number of times link went from Up to recovery, irrespective of the result.
	FieldDevNvlinkCountLinkRecoveryEvents uint32 = 215
	// FieldDevNvlinkCountLinkRecoveryFailedEvents is NVML_FI_DEV_NVLINK_COUNT_LINK_RECOVERY_FAILED_EVENTS. Number of times link went from Up to recovery, failed and link was declared down.
	FieldDevNvlinkCountLinkRecoveryFailedEvents uint32 = 214
	// FieldDevNvlinkCountLinkRecoverySuccessfulEvents is NVML_FI_DEV_NVLINK_COUNT_LINK_RECOVERY_SUCCESSFUL_EVENTS. Number of times link went from Up to recovery, succeeded and link came back up.
	FieldDevNvlinkCountLinkRecoverySuccessfulEvents uint32 = 213
	// FieldDevNvlinkCountLocalLinkIntegrityErrors is NVML_FI_DEV_NVLINK_COUNT_LOCAL_LINK_INTEGRITY_ERRORS. Total number of times that the count of local errors exceeded a threshold.
	FieldDevNvlinkCountLocalLinkIntegrityErrors uint32 = 211
	// FieldDevNvlinkCountMalformedPacketErrors is NVML_FI_DEV_NVLINK_COUNT_MALFORMED_PACKET_ERRORS. Number of packets Rx on a link where packets are malformed.
	FieldDevNvlinkCountMalformedPacketErrors uint32 = 206
	// FieldDevNvlinkCountRawBer is NVML_FI_DEV_NVLINK_COUNT_RAW_BER.
	//
	// Deprecated: Do not use.
	FieldDevNvlinkCountRawBer uint32 = 218
	// FieldDevNvlinkCountRawBerLane0 is NVML_FI_DEV_NVLINK_COUNT_RAW_BER_LANE0.
	//
	// Deprecated: Do not use.
	FieldDevNvlinkCountRawBerLane0 uint32 = 216
	// FieldDevNvlinkCountRawBerLane0V2 is NVML_FI_DEV_NVLINK_COUNT_RAW_BER_LANE0_V2. NVLINK raw BER for lane 0.
	FieldDevNvlinkCountRawBerLane0V2 uint32 = 291
	// FieldDevNvlinkCountRawBerLane1 is NVML_FI_DEV_NVLINK_COUNT_RAW_BER_LANE1.
	//
	// Deprecated: Do not use.
	FieldDevNvlinkCountRawBerLane1 uint32 = 217
	// FieldDevNvlinkCountRawBerLane1V2 is NVML_FI_DEV_NVLINK_COUNT_RAW_BER_LANE1_V2. NVLINK raw BER for lane 1.
	FieldDevNvlinkCountRawBerLane1V2 uint32 = 292
	// FieldDevNvlinkCountRawBerV2 is NVML_FI_DEV_NVLINK_COUNT_RAW_BER_V2. NVLINK total raw BER.
	FieldDevNvlinkCountRawBerV2 uint32 = 293
	// FieldDevNvlinkCountRawErrorsLane0 is NVML_FI_DEV_NVLINK_COUNT_RAW_ERRORS_LANE0. NVLINK raw error count for lane 0.
	FieldDevNvlinkCountRawErrorsLane0 uint32 = 289
	// FieldDevNvlinkCountRawErrorsLane1 is NVML_FI_DEV_NVLINK_COUNT_RAW_ERRORS_LANE1. NVLINK raw error count for lane 1.
	FieldDevNvlinkCountRawErrorsLane1 uint32 = 290
	// FieldDevNvlinkCountRcvBytes is NVML_FI_DEV_NVLINK_COUNT_RCV_BYTES. Total Rx bytes on the link in NVLink5.
	FieldDevNvlinkCountRcvBytes uint32 = 204
	// FieldDevNvlinkCountRcvErrors is NVML_FI_DEV_NVLINK_COUNT_RCV_ERRORS. Total number of packets with errors Rx on a link.
	FieldDevNvlinkCountRcvErrors uint32 = 208
	// FieldDevNvlinkCountRcvGeneralErrors is NVML_FI_DEV_NVLINK_COUNT_RCV_GENERAL_ERRORS. Total number of packets Rx with header mismatch.
	FieldDevNvlinkCountRcvGeneralErrors uint32 = 210
	// FieldDevNvlinkCountRcvPackets is NVML_FI_DEV_NVLINK_COUNT_RCV_PACKETS. Total Rx packets on the link in NVLink5.
	FieldDevNvlinkCountRcvPackets uint32 = 203
	// FieldDevNvlinkCountRcvRemoteErrors is NVML_FI_DEV_NVLINK_COUNT_RCV_REMOTE_ERRORS. Total number of packets Rx - stomp/EBP marker.
	FieldDevNvlinkCountRcvRemoteErrors uint32 = 209
	// FieldDevNvlinkCountSymbolBer is NVML_FI_DEV_NVLINK_COUNT_SYMBOL_BER. BER for symbol errors.
	FieldDevNvlinkCountSymbolBer uint32 = 222
	// FieldDevNvlinkCountSymbolErrors is NVML_FI_DEV_NVLINK_COUNT_SYMBOL_ERRORS. Number of errors in rx symbols.
	FieldDevNvlinkCountSymbolErrors uint32 = 221
	// FieldDevNvlinkCountVL15Dropped is NVML_FI_DEV_NVLINK_COUNT_VL15_DROPPED.
	//
	// Deprecated: Do not use.
	FieldDevNvlinkCountVL15Dropped uint32 = 205
	// FieldDevNvlinkCountXmitBytes is NVML_FI_DEV_NVLINK_COUNT_XMIT_BYTES. Total Tx bytes on the link in NVLink5.
	FieldDevNvlinkCountXmitBytes uint32 = 202
	// FieldDevNvlinkCountXmitDiscards is NVML_FI_DEV_NVLINK_COUNT_XMIT_DISCARDS. Total number of tx error packets that were discarded.
	FieldDevNvlinkCountXmitDiscards uint32 = 212
	// FieldDevNvlinkCountXmitPackets is NVML_FI_DEV_NVLINK_COUNT_XMIT_PACKETS. Total Tx packets on the link in NVLink5.
	FieldDevNvlinkCountXmitPackets uint32 = 201
	// FieldDevNvlinkCrcDataErrorCountL0 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L0. NVLink data CRC Error Counter for Lane 0.
	FieldDevNvlinkCrcDataErrorCountL0 uint32 = 39
	// FieldDevNvlinkCrcDataErrorCountL1 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L1. NVLink data CRC Error Counter for Lane 1.
	FieldDevNvlinkCrcDataErrorCountL1 uint32 = 40
	// FieldDevNvlinkCrcDataErrorCountL10 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L10. NVLink data CRC Error Counter for Lane 10.
	FieldDevNvlinkCrcDataErrorCountL10 uint32 = 106
	// FieldDevNvlinkCrcDataErrorCountL11 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L11. NVLink data CRC Error Counter for Lane 11.
	FieldDevNvlinkCrcDataErrorCountL11 uint32 = 107
	// FieldDevNvlinkCrcDataErrorCountL2 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L2. NVLink data CRC Error Counter for Lane 2.
	FieldDevNvlinkCrcDataErrorCountL2 uint32 = 41
	// FieldDevNvlinkCrcDataErrorCountL3 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L3. NVLink data CRC Error Counter for Lane 3.
	FieldDevNvlinkCrcDataErrorCountL3 uint32 = 42
	// FieldDevNvlinkCrcDataErrorCountL4 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L4. NVLink data CRC Error Counter for Lane 4.
	FieldDevNvlinkCrcDataErrorCountL4 uint32 = 43
	// FieldDevNvlinkCrcDataErrorCountL5 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L5. NVLink data CRC Error Counter for Lane 5.
	FieldDevNvlinkCrcDataErrorCountL5 uint32 = 44
	// FieldDevNvlinkCrcDataErrorCountL6 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L6. NVLink data CRC Error Counter for Lane 6.
	FieldDevNvlinkCrcDataErrorCountL6 uint32 = 102
	// FieldDevNvlinkCrcDataErrorCountL7 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L7. NVLink data CRC Error Counter for Lane 7.
	FieldDevNvlinkCrcDataErrorCountL7 uint32 = 103
	// FieldDevNvlinkCrcDataErrorCountL8 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L8. NVLink data CRC Error Counter for Lane 8.
	FieldDevNvlinkCrcDataErrorCountL8 uint32 = 104
	// FieldDevNvlinkCrcDataErrorCountL9 is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L9. NVLink data CRC Error Counter for Lane 9.
	FieldDevNvlinkCrcDataErrorCountL9 uint32 = 105
	// FieldDevNvlinkCrcDataErrorCountTotal is NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_TOTAL. NvLink data CRC Error Counter total for all Lanes.
	FieldDevNvlinkCrcDataErrorCountTotal uint32 = 45
	// FieldDevNvlinkCrcFlitErrorCountL0 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L0. NVLink flow control CRC Error Counter for Lane 0.
	FieldDevNvlinkCrcFlitErrorCountL0 uint32 = 32
	// FieldDevNvlinkCrcFlitErrorCountL1 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L1. NVLink flow control CRC Error Counter for Lane 1.
	FieldDevNvlinkCrcFlitErrorCountL1 uint32 = 33
	// FieldDevNvlinkCrcFlitErrorCountL10 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L10. NVLink flow control CRC Error Counter for Lane 10.
	FieldDevNvlinkCrcFlitErrorCountL10 uint32 = 100
	// FieldDevNvlinkCrcFlitErrorCountL11 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L11. NVLink flow control CRC Error Counter for Lane 11.
	FieldDevNvlinkCrcFlitErrorCountL11 uint32 = 101
	// FieldDevNvlinkCrcFlitErrorCountL2 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L2. NVLink flow control CRC Error Counter for Lane 2.
	FieldDevNvlinkCrcFlitErrorCountL2 uint32 = 34
	// FieldDevNvlinkCrcFlitErrorCountL3 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L3. NVLink flow control CRC Error Counter for Lane 3.
	FieldDevNvlinkCrcFlitErrorCountL3 uint32 = 35
	// FieldDevNvlinkCrcFlitErrorCountL4 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L4. NVLink flow control CRC Error Counter for Lane 4.
	FieldDevNvlinkCrcFlitErrorCountL4 uint32 = 36
	// FieldDevNvlinkCrcFlitErrorCountL5 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L5. NVLink flow control CRC Error Counter for Lane 5.
	FieldDevNvlinkCrcFlitErrorCountL5 uint32 = 37
	// FieldDevNvlinkCrcFlitErrorCountL6 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L6. NVLink flow control CRC Error Counter for Lane 6.
	FieldDevNvlinkCrcFlitErrorCountL6 uint32 = 96
	// FieldDevNvlinkCrcFlitErrorCountL7 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L7. NVLink flow control CRC Error Counter for Lane 7.
	FieldDevNvlinkCrcFlitErrorCountL7 uint32 = 97
	// FieldDevNvlinkCrcFlitErrorCountL8 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L8. NVLink flow control CRC Error Counter for Lane 8.
	FieldDevNvlinkCrcFlitErrorCountL8 uint32 = 98
	// FieldDevNvlinkCrcFlitErrorCountL9 is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L9. NVLink flow control CRC Error Counter for Lane 9.
	FieldDevNvlinkCrcFlitErrorCountL9 uint32 = 99
	// FieldDevNvlinkCrcFlitErrorCountTotal is NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_TOTAL. NVLink flow control CRC Error Counter total for all Lanes.
	FieldDevNvlinkCrcFlitErrorCountTotal uint32 = 38
	// FieldDevNvlinkEccDataErrorCountL0 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L0. NVLink data ECC Error Counter for Link 0.
	FieldDevNvlinkEccDataErrorCountL0 uint32 = 148
	// FieldDevNvlinkEccDataErrorCountL1 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L1. NVLink data ECC Error Counter for Link 1.
	FieldDevNvlinkEccDataErrorCountL1 uint32 = 149
	// FieldDevNvlinkEccDataErrorCountL10 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L10. NVLink data ECC Error Counter for Link 10.
	FieldDevNvlinkEccDataErrorCountL10 uint32 = 158
	// FieldDevNvlinkEccDataErrorCountL11 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L11. NVLink data ECC Error Counter for Link 11.
	FieldDevNvlinkEccDataErrorCountL11 uint32 = 159
	// FieldDevNvlinkEccDataErrorCountL2 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L2. NVLink data ECC Error Counter for Link 2.
	FieldDevNvlinkEccDataErrorCountL2 uint32 = 150
	// FieldDevNvlinkEccDataErrorCountL3 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L3. NVLink data ECC Error Counter for Link 3.
	FieldDevNvlinkEccDataErrorCountL3 uint32 = 151
	// FieldDevNvlinkEccDataErrorCountL4 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L4. NVLink data ECC Error Counter for Link 4.
	FieldDevNvlinkEccDataErrorCountL4 uint32 = 152
	// FieldDevNvlinkEccDataErrorCountL5 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L5. NVLink data ECC Error Counter for Link 5.
	FieldDevNvlinkEccDataErrorCountL5 uint32 = 153
	// FieldDevNvlinkEccDataErrorCountL6 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L6. NVLink data ECC Error Counter for Link 6.
	FieldDevNvlinkEccDataErrorCountL6 uint32 = 154
	// FieldDevNvlinkEccDataErrorCountL7 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L7. NVLink data ECC Error Counter for Link 7.
	FieldDevNvlinkEccDataErrorCountL7 uint32 = 155
	// FieldDevNvlinkEccDataErrorCountL8 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L8. NVLink data ECC Error Counter for Link 8.
	FieldDevNvlinkEccDataErrorCountL8 uint32 = 156
	// FieldDevNvlinkEccDataErrorCountL9 is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L9. NVLink data ECC Error Counter for Link 9.
	FieldDevNvlinkEccDataErrorCountL9 uint32 = 157
	// FieldDevNvlinkEccDataErrorCountTotal is NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_TOTAL. NVLink data ECC Error Counter total for all Links.
	FieldDevNvlinkEccDataErrorCountTotal uint32 = 160
	// FieldDevNvlinkErrorDlCrc is NVML_FI_DEV_NVLINK_ERROR_DL_CRC. NVLink CRC Error Counter This is unsupported for Blackwell+ Please use NVML_FI_DEV_NVLINK_COUNT_LINK_RECOVERY_*.
	FieldDevNvlinkErrorDlCrc uint32 = 163
	// FieldDevNvlinkErrorDlRecovery is NVML_FI_DEV_NVLINK_ERROR_DL_RECOVERY. NVLink Recovery Error Counter This is unsupported for Blackwell+ Please use NVML_FI_DEV_NVLINK_COUNT_LINK_RECOVERY_*.
	FieldDevNvlinkErrorDlRecovery uint32 = 162
	// FieldDevNvlinkErrorDlReplay is NVML_FI_DEV_NVLINK_ERROR_DL_REPLAY. NVLink Replay Error Counter This is unsupported for Blackwell+. Please use NVML_FI_DEV_NVLINK_COUNT_LINK_RECOVERY_*.
	FieldDevNvlinkErrorDlReplay uint32 = 161
	// FieldDevNvlinkGetDataRate is NVML_FI_DEV_NVLINK_GET_DATA_RATE. The Effective Nvlink Data rate available for transactions after accounting for FEC overhead.
	FieldDevNvlinkGetDataRate uint32 = 296
	// FieldDevNvlinkGetPowerState is NVML_FI_DEV_NVLINK_GET_POWER_STATE. NVLink Power state. 0=HIGH_SPEED 1=LOW_SPEED.
	FieldDevNvlinkGetPowerState uint32 = 167
	// FieldDevNvlinkGetPowerThreshold is NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD. NVLink length of idle period (units can be found from [FieldDevNvlinkGetPowerThresholdUnits]) before transitioning links to sleep state.
	FieldDevNvlinkGetPowerThreshold uint32 = 168
	// FieldDevNvlinkGetPowerThresholdMax is NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD_MAX. Max Nvlink Power Threshold. See [FieldDevNvlinkGetPowerThreshold].
	FieldDevNvlinkGetPowerThresholdMax uint32 = 200
	// FieldDevNvlinkGetPowerThresholdMin is NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD_MIN. Min Nvlink Power Threshold. See [FieldDevNvlinkGetPowerThreshold].
	FieldDevNvlinkGetPowerThresholdMin uint32 = 223
	// FieldDevNvlinkGetPowerThresholdSupported is NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD_SUPPORTED. Determine if Nvlink Power Threshold feature is supported.
	FieldDevNvlinkGetPowerThresholdSupported uint32 = 225
	// FieldDevNvlinkGetPowerThresholdUnits is NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD_UNITS. Values are in the form NVML_NVLINK_LOW_POWER_THRESHOLD_UNIT_*.
	FieldDevNvlinkGetPowerThresholdUnits uint32 = 224
	// FieldDevNvlinkGetSpeed is NVML_FI_DEV_NVLINK_GET_SPEED. NVLink Speed in MBps.
	FieldDevNvlinkGetSpeed uint32 = 164
	// FieldDevNvlinkGetState is NVML_FI_DEV_NVLINK_GET_STATE. NVLink State - one of NVML_NVLINK_STATE_* values.
	FieldDevNvlinkGetState uint32 = 165
	// FieldDevNvlinkGetVersion is NVML_FI_DEV_NVLINK_GET_VERSION. NVLink Version.
	FieldDevNvlinkGetVersion uint32 = 166
	// FieldDevNvlinkLinkCount is NVML_FI_DEV_NVLINK_LINK_COUNT. Number of NVLinks present on the device.
	FieldDevNvlinkLinkCount uint32 = 91
	// FieldDevNvlinkPlrXmitBlocks is NVML_FI_DEV_NVLINK_PLR_XMIT_BLOCKS. NVLINK PLR Xmit Blocks.
	FieldDevNvlinkPlrXmitBlocks uint32 = 294
	// FieldDevNvlinkPlrXmitRetryBlocks is NVML_FI_DEV_NVLINK_PLR_XMIT_RETRY_BLOCKS. NVLINK PLR Xmit Retry Blocks.
	FieldDevNvlinkPlrXmitRetryBlocks uint32 = 295
	// FieldDevNvlinkRecoveryErrorCountL0 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L0. NVLink Recovery Error Counter for Lane 0.
	FieldDevNvlinkRecoveryErrorCountL0 uint32 = 53
	// FieldDevNvlinkRecoveryErrorCountL1 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L1. NVLink Recovery Error Counter for Lane 1.
	FieldDevNvlinkRecoveryErrorCountL1 uint32 = 54
	// FieldDevNvlinkRecoveryErrorCountL10 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L10. NVLink Recovery Error Counter for Lane 10.
	FieldDevNvlinkRecoveryErrorCountL10 uint32 = 118
	// FieldDevNvlinkRecoveryErrorCountL11 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L11. NVLink Recovery Error Counter for Lane 11.
	FieldDevNvlinkRecoveryErrorCountL11 uint32 = 119
	// FieldDevNvlinkRecoveryErrorCountL2 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L2. NVLink Recovery Error Counter for Lane 2.
	FieldDevNvlinkRecoveryErrorCountL2 uint32 = 55
	// FieldDevNvlinkRecoveryErrorCountL3 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L3. NVLink Recovery Error Counter for Lane 3.
	FieldDevNvlinkRecoveryErrorCountL3 uint32 = 56
	// FieldDevNvlinkRecoveryErrorCountL4 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L4. NVLink Recovery Error Counter for Lane 4.
	FieldDevNvlinkRecoveryErrorCountL4 uint32 = 57
	// FieldDevNvlinkRecoveryErrorCountL5 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L5. NVLink Recovery Error Counter for Lane 5.
	FieldDevNvlinkRecoveryErrorCountL5 uint32 = 58
	// FieldDevNvlinkRecoveryErrorCountL6 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L6. NVLink Recovery Error Counter for Lane 6.
	FieldDevNvlinkRecoveryErrorCountL6 uint32 = 114
	// FieldDevNvlinkRecoveryErrorCountL7 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L7. NVLink Recovery Error Counter for Lane 7.
	FieldDevNvlinkRecoveryErrorCountL7 uint32 = 115
	// FieldDevNvlinkRecoveryErrorCountL8 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L8. NVLink Recovery Error Counter for Lane 8.
	FieldDevNvlinkRecoveryErrorCountL8 uint32 = 116
	// FieldDevNvlinkRecoveryErrorCountL9 is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L9. NVLink Recovery Error Counter for Lane 9.
	FieldDevNvlinkRecoveryErrorCountL9 uint32 = 117
	// FieldDevNvlinkRecoveryErrorCountTotal is NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_TOTAL. NVLink Recovery Error Counter total for all Lanes.
	FieldDevNvlinkRecoveryErrorCountTotal uint32 = 59
	// FieldDevNvlinkRemoteNvlinkId is NVML_FI_DEV_NVLINK_REMOTE_NVLINK_ID. Remote device NVLink ID.
	FieldDevNvlinkRemoteNvlinkId uint32 = 146
	// FieldDevNvlinkReplayErrorCountL0 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L0. NVLink Replay Error Counter for Lane 0.
	FieldDevNvlinkReplayErrorCountL0 uint32 = 46
	// FieldDevNvlinkReplayErrorCountL1 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L1. NVLink Replay Error Counter for Lane 1.
	FieldDevNvlinkReplayErrorCountL1 uint32 = 47
	// FieldDevNvlinkReplayErrorCountL10 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L10. NVLink Replay Error Counter for Lane 10.
	FieldDevNvlinkReplayErrorCountL10 uint32 = 112
	// FieldDevNvlinkReplayErrorCountL11 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L11. NVLink Replay Error Counter for Lane 11.
	FieldDevNvlinkReplayErrorCountL11 uint32 = 113
	// FieldDevNvlinkReplayErrorCountL2 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L2. NVLink Replay Error Counter for Lane 2.
	FieldDevNvlinkReplayErrorCountL2 uint32 = 48
	// FieldDevNvlinkReplayErrorCountL3 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L3. NVLink Replay Error Counter for Lane 3.
	FieldDevNvlinkReplayErrorCountL3 uint32 = 49
	// FieldDevNvlinkReplayErrorCountL4 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L4. NVLink Replay Error Counter for Lane 4.
	FieldDevNvlinkReplayErrorCountL4 uint32 = 50
	// FieldDevNvlinkReplayErrorCountL5 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L5. NVLink Replay Error Counter for Lane 5.
	FieldDevNvlinkReplayErrorCountL5 uint32 = 51
	// FieldDevNvlinkReplayErrorCountL6 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L6. NVLink Replay Error Counter for Lane 6.
	FieldDevNvlinkReplayErrorCountL6 uint32 = 108
	// FieldDevNvlinkReplayErrorCountL7 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L7. NVLink Replay Error Counter for Lane 7.
	FieldDevNvlinkReplayErrorCountL7 uint32 = 109
	// FieldDevNvlinkReplayErrorCountL8 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L8. NVLink Replay Error Counter for Lane 8.
	FieldDevNvlinkReplayErrorCountL8 uint32 = 110
	// FieldDevNvlinkReplayErrorCountL9 is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L9. NVLink Replay Error Counter for Lane 9.
	FieldDevNvlinkReplayErrorCountL9 uint32 = 111
	// FieldDevNvlinkReplayErrorCountTotal is NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_TOTAL. NVLink Replay Error Counter total for all Lanes.
	FieldDevNvlinkReplayErrorCountTotal uint32 = 52
	// FieldDevNvlinkSpeedMbpsCommon is NVML_FI_DEV_NVLINK_SPEED_MBPS_COMMON. Common NVLink Speed in MBps for active links.
	FieldDevNvlinkSpeedMbpsCommon uint32 = 90
	// FieldDevNvlinkSpeedMbpsL0 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L0. NVLink Speed in MBps for Link 0.
	FieldDevNvlinkSpeedMbpsL0 uint32 = 84
	// FieldDevNvlinkSpeedMbpsL1 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L1. NVLink Speed in MBps for Link 1.
	FieldDevNvlinkSpeedMbpsL1 uint32 = 85
	// FieldDevNvlinkSpeedMbpsL10 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L10. NVLink Speed in MBps for Link 10.
	FieldDevNvlinkSpeedMbpsL10 uint32 = 136
	// FieldDevNvlinkSpeedMbpsL11 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L11. NVLink Speed in MBps for Link 11.
	FieldDevNvlinkSpeedMbpsL11 uint32 = 137
	// FieldDevNvlinkSpeedMbpsL2 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L2. NVLink Speed in MBps for Link 2.
	FieldDevNvlinkSpeedMbpsL2 uint32 = 86
	// FieldDevNvlinkSpeedMbpsL3 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L3. NVLink Speed in MBps for Link 3.
	FieldDevNvlinkSpeedMbpsL3 uint32 = 87
	// FieldDevNvlinkSpeedMbpsL4 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L4. NVLink Speed in MBps for Link 4.
	FieldDevNvlinkSpeedMbpsL4 uint32 = 88
	// FieldDevNvlinkSpeedMbpsL5 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L5. NVLink Speed in MBps for Link 5.
	FieldDevNvlinkSpeedMbpsL5 uint32 = 89
	// FieldDevNvlinkSpeedMbpsL6 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L6. NVLink Speed in MBps for Link 6.
	FieldDevNvlinkSpeedMbpsL6 uint32 = 132
	// FieldDevNvlinkSpeedMbpsL7 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L7. NVLink Speed in MBps for Link 7.
	FieldDevNvlinkSpeedMbpsL7 uint32 = 133
	// FieldDevNvlinkSpeedMbpsL8 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L8. NVLink Speed in MBps for Link 8.
	FieldDevNvlinkSpeedMbpsL8 uint32 = 134
	// FieldDevNvlinkSpeedMbpsL9 is NVML_FI_DEV_NVLINK_SPEED_MBPS_L9. NVLink Speed in MBps for Link 9.
	FieldDevNvlinkSpeedMbpsL9 uint32 = 135
	// FieldDevNvlinkThroughputDataRx is NVML_FI_DEV_NVLINK_THROUGHPUT_DATA_RX. NVLink RX Data throughput in KiB.
	FieldDevNvlinkThroughputDataRx uint32 = 139
	// FieldDevNvlinkThroughputDataTx is NVML_FI_DEV_NVLINK_THROUGHPUT_DATA_TX. NVLink TX Data throughput in KiB.
	FieldDevNvlinkThroughputDataTx uint32 = 138
	// FieldDevNvlinkThroughputRawRx is NVML_FI_DEV_NVLINK_THROUGHPUT_RAW_RX. NVLink RX Data + protocol overhead in KiB.
	FieldDevNvlinkThroughputRawRx uint32 = 141
	// FieldDevNvlinkThroughputRawTx is NVML_FI_DEV_NVLINK_THROUGHPUT_RAW_TX. NVLink TX Data + protocol overhead in KiB.
	FieldDevNvlinkThroughputRawTx uint32 = 140
	// FieldDevNvswitchConnectedLinkCount is NVML_FI_DEV_NVSWITCH_CONNECTED_LINK_COUNT. Number of NVLinks connected to NVSwitch.
	FieldDevNvswitchConnectedLinkCount uint32 = 147
	// FieldDevPcieCountBadDllp is NVML_FI_DEV_PCIE_COUNT_BAD_DLLP. PCIe Bad DLLP Counter.
	FieldDevPcieCountBadDllp uint32 = 178
	// FieldDevPcieCountBadTlp is NVML_FI_DEV_PCIE_COUNT_BAD_TLP. PCIe Bad TLP Counter.
	FieldDevPcieCountBadTlp uint32 = 176
	// FieldDevPcieCountCorrectableErrors is NVML_FI_DEV_PCIE_COUNT_CORRECTABLE_ERRORS. PCIe Correctable Errors Counter.
	FieldDevPcieCountCorrectableErrors uint32 = 173
	// FieldDevPcieCountFatalError is NVML_FI_DEV_PCIE_COUNT_FATAL_ERROR. PCIe Fatal Error Counter.
	FieldDevPcieCountFatalError uint32 = 180
	// FieldDevPcieCountLaneError is NVML_FI_DEV_PCIE_COUNT_LANE_ERROR. PCIe Per Lane Error Counter.
	FieldDevPcieCountLaneError uint32 = 183
	// FieldDevPcieCountLcrcError is NVML_FI_DEV_PCIE_COUNT_LCRC_ERROR. PCIe LCRC Error Counter.
	FieldDevPcieCountLcrcError uint32 = 182
	// FieldDevPcieCountNaksReceived is NVML_FI_DEV_PCIE_COUNT_NAKS_RECEIVED. PCIe NAK Receive Counter.
	FieldDevPcieCountNaksReceived uint32 = 174
	// FieldDevPcieCountNaksSent is NVML_FI_DEV_PCIE_COUNT_NAKS_SENT. PCIe NAK Send Counter.
	FieldDevPcieCountNaksSent uint32 = 177
	// FieldDevPcieCountNonFatalError is NVML_FI_DEV_PCIE_COUNT_NON_FATAL_ERROR. PCIe Non Fatal Error Counter.
	FieldDevPcieCountNonFatalError uint32 = 179
	// FieldDevPcieCountReceiverError is NVML_FI_DEV_PCIE_COUNT_RECEIVER_ERROR. PCIe Receiver Error Counter.
	FieldDevPcieCountReceiverError uint32 = 175
	// FieldDevPcieCountRxBytes is NVML_FI_DEV_PCIE_COUNT_RX_BYTES. PCIe receive bytes. Value can be wrapped.
	FieldDevPcieCountRxBytes uint32 = 198
	// FieldDevPcieCountTxBytes is NVML_FI_DEV_PCIE_COUNT_TX_BYTES. PCIe transmit bytes. Value can be wrapped.
	FieldDevPcieCountTxBytes uint32 = 197
	// FieldDevPcieCountUnsupportedReq is NVML_FI_DEV_PCIE_COUNT_UNSUPPORTED_REQ. PCIe Unsupported Request Counter.
	FieldDevPcieCountUnsupportedReq uint32 = 181
	// FieldDevPcieInboundAtomicsMask is NVML_FI_DEV_PCIE_INBOUND_ATOMICS_MASK.
	FieldDevPcieInboundAtomicsMask uint32 = 229
	// FieldDevPcieL0ToRecoveryCounter is NVML_FI_DEV_PCIE_L0_TO_RECOVERY_COUNTER. Device PEX error recovery counter.
	FieldDevPcieL0ToRecoveryCounter uint32 = 169
	// FieldDevPcieOutboundAtomicsMask is NVML_FI_DEV_PCIE_OUTBOUND_ATOMICS_MASK.
	FieldDevPcieOutboundAtomicsMask uint32 = 228
	// FieldDevPcieReplayCounter is NVML_FI_DEV_PCIE_REPLAY_COUNTER. PCIe replay counter.
	FieldDevPcieReplayCounter uint32 = 94
	// FieldDevPcieReplayRolloverCounter is NVML_FI_DEV_PCIE_REPLAY_ROLLOVER_COUNTER. PCIe replay rollover counter.
	FieldDevPcieReplayRolloverCounter uint32 = 95
	// FieldDevPendingBankRemapping is NVML_FI_DEV_PENDING_BANK_REMAPPING. If any banks are pending remapping. 1=yes 0=no.
	FieldDevPendingBankRemapping uint32 = 307
	// FieldDevPerfPolicyBoardLimit is NVML_FI_DEV_PERF_POLICY_BOARD_LIMIT. Perf Policy Counter for Board Limit.
	FieldDevPerfPolicyBoardLimit uint32 = 77
	// FieldDevPerfPolicyLowUtilization is NVML_FI_DEV_PERF_POLICY_LOW_UTILIZATION. Perf Policy Counter for Low GPU Utilization Policy.
	FieldDevPerfPolicyLowUtilization uint32 = 78
	// FieldDevPerfPolicyPower is NVML_FI_DEV_PERF_POLICY_POWER. Perf Policy Counter for Power Policy.
	FieldDevPerfPolicyPower uint32 = 74
	// FieldDevPerfPolicyReliability is NVML_FI_DEV_PERF_POLICY_RELIABILITY. Perf Policy Counter for Reliability Policy.
	FieldDevPerfPolicyReliability uint32 = 79
	// FieldDevPerfPolicySyncBoost is NVML_FI_DEV_PERF_POLICY_SYNC_BOOST. Perf Policy Counter for Sync boost Policy.
	FieldDevPerfPolicySyncBoost uint32 = 76
	// FieldDevPerfPolicyThermal is NVML_FI_DEV_PERF_POLICY_THERMAL. Perf Policy Counter for Thermal Policy.
	FieldDevPerfPolicyThermal uint32 = 75
	// FieldDevPerfPolicyTotalAppClocks is NVML_FI_DEV_PERF_POLICY_TOTAL_APP_CLOCKS. Perf Policy Counter for Total App Clock Policy.
	FieldDevPerfPolicyTotalAppClocks uint32 = 80
	// FieldDevPerfPolicyTotalBaseClocks is NVML_FI_DEV_PERF_POLICY_TOTAL_BASE_CLOCKS. Perf Policy Counter for Total Base Clocks Policy.
	FieldDevPerfPolicyTotalBaseClocks uint32 = 81
	// FieldDevPowerAverage is NVML_FI_DEV_POWER_AVERAGE. GPU power averaged over 1 sec interval, supported on Ampere (except GA100) or newer architectures.
	FieldDevPowerAverage uint32 = 185
	// FieldDevPowerCurrentLimit is NVML_FI_DEV_POWER_CURRENT_LIMIT. Limit currently enforced in milliwatts (This includes other limits set elsewhere. E.g. Out-of-band).
	FieldDevPowerCurrentLimit uint32 = 190
	// FieldDevPowerDefaultLimit is NVML_FI_DEV_POWER_DEFAULT_LIMIT. Default power limit in milliwatts (limit which device boots with).
	FieldDevPowerDefaultLimit uint32 = 189
	// FieldDevPowerInstant is NVML_FI_DEV_POWER_INSTANT. Current GPU power, supported on all architectures.
	FieldDevPowerInstant uint32 = 186
	// FieldDevPowerMaxLimit is NVML_FI_DEV_POWER_MAX_LIMIT. Maximum power limit in milliwatts.
	FieldDevPowerMaxLimit uint32 = 188
	// FieldDevPowerMinLimit is NVML_FI_DEV_POWER_MIN_LIMIT. Minimum power limit in milliwatts.
	FieldDevPowerMinLimit uint32 = 187
	// FieldDevPowerRequestedLimit is NVML_FI_DEV_POWER_REQUESTED_LIMIT. Power limit requested by NVML or any other userspace client.
	FieldDevPowerRequestedLimit uint32 = 192
	// FieldDevPowerSyncBalancingAf is NVML_FI_DEV_POWER_SYNC_BALANCING_AF. Accumulated activity factor of the GPU to be used for averaging.
	FieldDevPowerSyncBalancingAf uint32 = 273
	// FieldDevPowerSyncBalancingFreq is NVML_FI_DEV_POWER_SYNC_BALANCING_FREQ. Accumulated frequency of the GPU to be used for averaging.
	FieldDevPowerSyncBalancingFreq uint32 = 272
	// FieldDevRemappedCor is NVML_FI_DEV_REMAPPED_COR. Number of remapped rows due to correctable errors.
	FieldDevRemappedCor uint32 = 142
	// FieldDevRemappedFailure is NVML_FI_DEV_REMAPPED_FAILURE. If any rows failed to be remapped 1=yes 0=no.
	FieldDevRemappedFailure uint32 = 145
	// FieldDevRemappedPending is NVML_FI_DEV_REMAPPED_PENDING. If any rows are pending remapping. 1=yes 0=no.
	FieldDevRemappedPending uint32 = 144
	// FieldDevRemappedRowsCorInactive is NVML_FI_DEV_REMAPPED_ROWS_COR_INACTIVE. Number of inactive row remappings due to correctable errors.
	FieldDevRemappedRowsCorInactive uint32 = 301
	// FieldDevRemappedRowsUncInactive is NVML_FI_DEV_REMAPPED_ROWS_UNC_INACTIVE. Number of inactive row remappings due to uncorrectable errors.
	FieldDevRemappedRowsUncInactive uint32 = 302
	// FieldDevRemappedUnc is NVML_FI_DEV_REMAPPED_UNC. Number of remapped rows due to uncorrectable errors.
	FieldDevRemappedUnc uint32 = 143
	// FieldDevResetStatus is NVML_FI_DEV_RESET_STATUS. Depracated, do not use (use [FieldDevGetGpuRecoveryAction] instead).
	FieldDevResetStatus uint32 = 226
	// FieldDevRetiredDbe is NVML_FI_DEV_RETIRED_DBE. Number of retired pages because of double bit errors.
	FieldDevRetiredDbe uint32 = 30
	// FieldDevRetiredPending is NVML_FI_DEV_RETIRED_PENDING. If any pages are pending retirement. 1=yes. 0=no.
	FieldDevRetiredPending uint32 = 31
	// FieldDevRetiredPendingDbe is NVML_FI_DEV_RETIRED_PENDING_DBE. If any pages are pending retirement due to DBE. 1=yes. 0=no.
	FieldDevRetiredPendingDbe uint32 = 93
	// FieldDevRetiredPendingSbe is NVML_FI_DEV_RETIRED_PENDING_SBE. If any pages are pending retirement due to SBE. 1=yes. 0=no.
	FieldDevRetiredPendingSbe uint32 = 92
	// FieldDevRetiredSbe is NVML_FI_DEV_RETIRED_SBE. Number of retired pages because of single bit errors.
	FieldDevRetiredSbe uint32 = 29
	// FieldDevTemperatureGpuMaxTlimit is NVML_FI_DEV_TEMPERATURE_GPU_MAX_TLIMIT. T.Limit temperature after which GPU may be throttled below base clock.
	FieldDevTemperatureGpuMaxTlimit uint32 = 196
	// FieldDevTemperatureMemMaxTlimit is NVML_FI_DEV_TEMPERATURE_MEM_MAX_TLIMIT. T.Limit temperature after which GPU may begin SW slowdown due to memory temperature.
	FieldDevTemperatureMemMaxTlimit uint32 = 195
	// FieldDevTemperatureShutdownTlimit is NVML_FI_DEV_TEMPERATURE_SHUTDOWN_TLIMIT. T.Limit temperature after which GPU may shut down for HW protection.
	FieldDevTemperatureShutdownTlimit uint32 = 193
	// FieldDevTemperatureSlowdownTlimit is NVML_FI_DEV_TEMPERATURE_SLOWDOWN_TLIMIT. T.Limit temperature after which GPU may begin HW slowdown.
	FieldDevTemperatureSlowdownTlimit uint32 = 194
	// FieldDevTotalEnergyConsumption is NVML_FI_DEV_TOTAL_ENERGY_CONSUMPTION. Total energy consumption for the GPU in mJ since the driver was last reloaded.
	FieldDevTotalEnergyConsumption uint32 = 83
	// FieldMax is NVML_FI_MAX. One greater than the largest field ID defined above.
	FieldMax uint32 = 310
	// FieldPwrSmoothingActivePresetProfile is NVML_FI_PWR_SMOOTHING_ACTIVE_PRESET_PROFILE. Active preset profile number.
	FieldPwrSmoothingActivePresetProfile uint32 = 264
	// FieldPwrSmoothingAdminOverridePercentTmpFloor is NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_PERCENT_TMP_FLOOR. % TMP floor for a given profile.
	FieldPwrSmoothingAdminOverridePercentTmpFloor uint32 = 265
	// FieldPwrSmoothingAdminOverridePrimaryFloorActOffset is NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_ACT_OFFSET. Current primary floor activation offset value in Watts for admin override. If the target moving average falls below the secondary floor plus this offset, the primary floor will be activated.
	FieldPwrSmoothingAdminOverridePrimaryFloorActOffset uint32 = 288
	// FieldPwrSmoothingAdminOverridePrimaryFloorActWinMult is NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_ACT_WIN_MULT. Current primary floor activation window multiplier value for admin override. This is the "X" ms time multiplier for the activation moving average window size. The activation moving average is compared against the (secondary floor + primary floor activation offset value) to determine if the controller should switch from the secondary floor to the primary floor. Setting this to 0 will disable switching to the secondary floor.
	FieldPwrSmoothingAdminOverridePrimaryFloorActWinMult uint32 = 286
	// FieldPwrSmoothingAdminOverridePrimaryFloorTarWinMult is NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_TAR_WIN_MULT. Current primary floor target window multiplier value for admin override. This is the "X" ms time multiplier for the target moving average window size. When set to non-zero value, the target moving average power determines the primary floor. When set to 0, driver will use the Floor percentage instead to derive the primary floor.
	FieldPwrSmoothingAdminOverridePrimaryFloorTarWinMult uint32 = 287
	// FieldPwrSmoothingAdminOverrideRampDownHystVal is NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_HYST_VAL. Ramp down hysteresis value in ms for a given profile.
	FieldPwrSmoothingAdminOverrideRampDownHystVal uint32 = 268
	// FieldPwrSmoothingAdminOverrideRampDownRate is NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_RATE. Ramp down rate in mW/s for a given profile.
	FieldPwrSmoothingAdminOverrideRampDownRate uint32 = 267
	// FieldPwrSmoothingAdminOverrideRampUpRate is NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_UP_RATE. Ramp up rate in mW/s for a given profile.
	FieldPwrSmoothingAdminOverrideRampUpRate uint32 = 266
	// FieldPwrSmoothingAdminOverrideSecondaryPowerFloor is NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_SECONDARY_POWER_FLOOR. Current secondary power floor value in Watts for admin override. This is the power floor that will be applied during active workload periods on the GPU when primary floor activation window multiplier is set to a non-zero value.
	FieldPwrSmoothingAdminOverrideSecondaryPowerFloor uint32 = 285
	// FieldPwrSmoothingAppliedTmpCeil is NVML_FI_PWR_SMOOTHING_APPLIED_TMP_CEIL. Applied TMP ceiling value in Watts.
	FieldPwrSmoothingAppliedTmpCeil uint32 = 254
	// FieldPwrSmoothingAppliedTmpFloor is NVML_FI_PWR_SMOOTHING_APPLIED_TMP_FLOOR. Applied TMP floor value in Watts.
	FieldPwrSmoothingAppliedTmpFloor uint32 = 255
	// FieldPwrSmoothingDelayedPwrSmoothingSupported is NVML_FI_PWR_SMOOTHING_DELAYED_PWR_SMOOTHING_SUPPORTED. Support (0/Not Supported or 1/Supported) for delayed power smoothing.
	FieldPwrSmoothingDelayedPwrSmoothingSupported uint32 = 280
	// FieldPwrSmoothingEnabled is NVML_FI_PWR_SMOOTHING_ENABLED. Enablement (0/DISABLED or 1/ENABLED).
	FieldPwrSmoothingEnabled uint32 = 251
	// FieldPwrSmoothingHwCircuitryPercentLifetimeRemaining is NVML_FI_PWR_SMOOTHING_HW_CIRCUITRY_PERCENT_LIFETIME_REMAINING. HW Circuitry % lifetime remaining.
	FieldPwrSmoothingHwCircuitryPercentLifetimeRemaining uint32 = 258
	// FieldPwrSmoothingImmRampDownEnabled is NVML_FI_PWR_SMOOTHING_IMM_RAMP_DOWN_ENABLED. Immediate ramp down enablement (0/DISABLED or 1/ENABLED).
	FieldPwrSmoothingImmRampDownEnabled uint32 = 253
	// FieldPwrSmoothingLimitedTime is NVML_FI_PWR_SMOOTHING_LIMITED_TIME. Running total of time the GPU has been limited by power smoothing in ns.
	FieldPwrSmoothingLimitedTime uint32 = 309
	// FieldPwrSmoothingMaxNumPresetProfiles is NVML_FI_PWR_SMOOTHING_MAX_NUM_PRESET_PROFILES. Max number of preset profiles.
	FieldPwrSmoothingMaxNumPresetProfiles uint32 = 259
	// FieldPwrSmoothingMaxPercentTmpFloorSetting is NVML_FI_PWR_SMOOTHING_MAX_PERCENT_TMP_FLOOR_SETTING. Max % TMP Floor value.
	FieldPwrSmoothingMaxPercentTmpFloorSetting uint32 = 256
	// FieldPwrSmoothingMinPercentTmpFloorSetting is NVML_FI_PWR_SMOOTHING_MIN_PERCENT_TMP_FLOOR_SETTING. Min % TMP Floor value.
	FieldPwrSmoothingMinPercentTmpFloorSetting uint32 = 257
	// FieldPwrSmoothingMinPrimaryFloorActOffset is NVML_FI_PWR_SMOOTHING_MIN_PRIMARY_FLOOR_ACT_OFFSET. Minimum primary floor activation offset value in Watts. This is the minimum primary floor activation offset accepted by the driver specified in Watts. This is a static field.
	FieldPwrSmoothingMinPrimaryFloorActOffset uint32 = 277
	// FieldPwrSmoothingMinPrimaryFloorActPoint is NVML_FI_PWR_SMOOTHING_MIN_PRIMARY_FLOOR_ACT_POINT. Minimum primary floor activation point value in Watts. This is the minimum absolute raw value specified in Watts that the driver will use for switching between primary and secondary floor. This point is calculated as "secondary power floor + primary floor activation offset", and then computed value is floored to "min primary floor activation point" by the driver at run time. This value is used to avoid setting of switch point too low accidentally.
	FieldPwrSmoothingMinPrimaryFloorActPoint uint32 = 278
	// FieldPwrSmoothingPrimaryPowerFloor is NVML_FI_PWR_SMOOTHING_PRIMARY_POWER_FLOOR. Current primary power floor value in Watts. This value is calculated by doing "TMP ceiling value * (% TMP floor value)".
	FieldPwrSmoothingPrimaryPowerFloor uint32 = 275
	// FieldPwrSmoothingPrivLvl is NVML_FI_PWR_SMOOTHING_PRIV_LVL. Current privilege level.
	FieldPwrSmoothingPrivLvl uint32 = 252
	// FieldPwrSmoothingProfilePercentTmpFloor is NVML_FI_PWR_SMOOTHING_PROFILE_PERCENT_TMP_FLOOR. % TMP floor for a given profile.
	FieldPwrSmoothingProfilePercentTmpFloor uint32 = 260
	// FieldPwrSmoothingProfilePrimaryFloorActOffset is NVML_FI_PWR_SMOOTHING_PROFILE_PRIMARY_FLOOR_ACT_OFFSET. Current primary floor activation offset value in Watts for a given profile. If the target moving average falls below the secondary floor plus this offset, the primary floor will be activated.
	FieldPwrSmoothingProfilePrimaryFloorActOffset uint32 = 284
	// FieldPwrSmoothingProfilePrimaryFloorActWinMult is NVML_FI_PWR_SMOOTHING_PROFILE_PRIMARY_FLOOR_ACT_WIN_MULT. Current primary floor activation window multiplier value for a given profile. This is the "X" ms time multiplier for the activation moving average window size. The activation moving average is compared against the (secondary floor + primary floor activation offset value) to determine if the controller should switch from the secondary floor to the primary floor. Setting this to 0 will disable switching to the secondary floor.
	FieldPwrSmoothingProfilePrimaryFloorActWinMult uint32 = 282
	// FieldPwrSmoothingProfilePrimaryFloorTarWinMult is NVML_FI_PWR_SMOOTHING_PROFILE_PRIMARY_FLOOR_TAR_WIN_MULT. Current primary floor target window multiplier value for a given profile. This is the "X" ms time multiplier for the target moving average window size. When set to non-zero value, the target moving average power determines the primary floor. When set to 0, driver will use the Floor percentage instead to derive the primary floor.
	FieldPwrSmoothingProfilePrimaryFloorTarWinMult uint32 = 283
	// FieldPwrSmoothingProfileRampDownHystVal is NVML_FI_PWR_SMOOTHING_PROFILE_RAMP_DOWN_HYST_VAL. Ramp down hysteresis value in ms for a given profile.
	FieldPwrSmoothingProfileRampDownHystVal uint32 = 263
	// FieldPwrSmoothingProfileRampDownRate is NVML_FI_PWR_SMOOTHING_PROFILE_RAMP_DOWN_RATE. Ramp down rate in mW/s for a given profile.
	FieldPwrSmoothingProfileRampDownRate uint32 = 262
	// FieldPwrSmoothingProfileRampUpRate is NVML_FI_PWR_SMOOTHING_PROFILE_RAMP_UP_RATE. Ramp up rate in mW/s for a given profile.
	FieldPwrSmoothingProfileRampUpRate uint32 = 261
	// FieldPwrSmoothingProfileSecondaryPowerFloor is NVML_FI_PWR_SMOOTHING_PROFILE_SECONDARY_POWER_FLOOR. Current secondary power floor value in Watts for a given profile. This is the power floor that will be applied during active workload periods on the GPU when primary floor activation window multiplier is set to a non-zero value.
	FieldPwrSmoothingProfileSecondaryPowerFloor uint32 = 281
	// FieldPwrSmoothingSecondaryPowerFloor is NVML_FI_PWR_SMOOTHING_SECONDARY_POWER_FLOOR. Current secondary power floor value in Watts. This is the power floor that is applied during active workload periods on the GPU when primary floor activation window multiplier is set to a non-zero value.
	FieldPwrSmoothingSecondaryPowerFloor uint32 = 276
	// FieldPwrSmoothingSocPowerSmoothingEnabled is NVML_FI_PWR_SMOOTHING_SOC_POWER_SMOOTHING_ENABLED. State-Of-Charge Power Smoothing Enabled (0/DISABLED or 1/ENABLED).
	FieldPwrSmoothingSocPowerSmoothingEnabled uint32 = 300
	// FieldPwrSmoothingWindowMultiplier is NVML_FI_PWR_SMOOTHING_WINDOW_MULTIPLIER. Window Multiplier value in ms. This is the multiplier unit specified in ms for other multipliers in the profile (primary floor activation window multiplier and primary floor target window multiplier). This is a static field.
	FieldPwrSmoothingWindowMultiplier uint32 = 279
	// GpmMetricsGetVersion is NVML_GPM_METRICS_GET_VERSION.
	GpmMetricsGetVersion = 1
	// GpmSupportVersion is NVML_GPM_SUPPORT_VERSION.
	GpmSupportVersion = 1
	// GpuAttestationCertChainSize is NVML_GPU_ATTESTATION_CERT_CHAIN_SIZE. Size of the attestation certificate chain.
	GpuAttestationCertChainSize = 5120
	// GpuCertChainSize is NVML_GPU_CERT_CHAIN_SIZE. Size of the certificate chain.
	GpuCertChainSize = 4096
	// GpuFabricCliqueMax is NVML_GPU_FABRIC_CLIQUE_MAX. Maximum number of fabric clique entries.
	GpuFabricCliqueMax = 64
	// GpuFabricCliqueTypeMulticastLogicalEndpoint is NVML_GPU_FABRIC_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT. Multicast logical-endpoint-based access.
	GpuFabricCliqueTypeMulticastLogicalEndpoint = 3
	// GpuFabricCliqueTypeMulticastPointer is NVML_GPU_FABRIC_CLIQUE_TYPE_MULTICAST_POINTER. Multicast pointer-based access.
	GpuFabricCliqueTypeMulticastPointer = 1
	// GpuFabricCliqueTypeUnicastLogicalEndpoint is NVML_GPU_FABRIC_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT. Unicast logical-endpoint-based access.
	GpuFabricCliqueTypeUnicastLogicalEndpoint = 2
	// GpuFabricCliqueTypeUnicastPointer is NVML_GPU_FABRIC_CLIQUE_TYPE_UNICAST_POINTER. Unicast pointer-based access.
	GpuFabricCliqueTypeUnicastPointer = 0
	// GpuFabricHealthMaskAccessTimeoutRecoveryFalse is NVML_GPU_FABRIC_HEALTH_MASK_ACCESS_TIMEOUT_RECOVERY_FALSE. Fabric Health Mask: Access Timeout Recovery not in progress.
	GpuFabricHealthMaskAccessTimeoutRecoveryFalse = 2
	// GpuFabricHealthMaskAccessTimeoutRecoveryNotSupported is NVML_GPU_FABRIC_HEALTH_MASK_ACCESS_TIMEOUT_RECOVERY_NOT_SUPPORTED. Fabric Health Mask: Access Timeout Recovery not supported.
	GpuFabricHealthMaskAccessTimeoutRecoveryNotSupported = 0
	// GpuFabricHealthMaskAccessTimeoutRecoveryTrue is NVML_GPU_FABRIC_HEALTH_MASK_ACCESS_TIMEOUT_RECOVERY_TRUE. Fabric Health Mask: Access Timeout Recovery in progress.
	GpuFabricHealthMaskAccessTimeoutRecoveryTrue = 1
	// GpuFabricHealthMaskDegradedBwFalse is NVML_GPU_FABRIC_HEALTH_MASK_DEGRADED_BW_FALSE. Fabric Health Mask: Bandwidth not degraded.
	GpuFabricHealthMaskDegradedBwFalse = 2
	// GpuFabricHealthMaskDegradedBwNotSupported is NVML_GPU_FABRIC_HEALTH_MASK_DEGRADED_BW_NOT_SUPPORTED. Fabric Health Mask: Degraded Bandwidth not supported.
	GpuFabricHealthMaskDegradedBwNotSupported = 0
	// GpuFabricHealthMaskDegradedBwTrue is NVML_GPU_FABRIC_HEALTH_MASK_DEGRADED_BW_TRUE. Fabric Health Mask: Bandwidth degraded.
	GpuFabricHealthMaskDegradedBwTrue = 1
	// GpuFabricHealthMaskGfmStateConnected is NVML_GPU_FABRIC_HEALTH_MASK_GFM_STATE_CONNECTED. Fabric Health Mask: Global Fabric Manager State is Connected.
	GpuFabricHealthMaskGfmStateConnected = 1
	// GpuFabricHealthMaskGfmStateDisconnected is NVML_GPU_FABRIC_HEALTH_MASK_GFM_STATE_DISCONNECTED. Fabric Health Mask: Global Fabric Manager State is Disconnected.
	GpuFabricHealthMaskGfmStateDisconnected = 2
	// GpuFabricHealthMaskGfmStateNotSupported is NVML_GPU_FABRIC_HEALTH_MASK_GFM_STATE_NOT_SUPPORTED. Fabric Health Mask: Global Fabric Manager State not supported.
	GpuFabricHealthMaskGfmStateNotSupported = 0
	// GpuFabricHealthMaskIncorrectConfigurationGpuStateInvalid is NVML_GPU_FABRIC_HEALTH_MASK_INCORRECT_CONFIGURATION_GPU_STATE_INVALID. Fabric Health Mask: Incorrect Configuration - GPU State Invalid.
	GpuFabricHealthMaskIncorrectConfigurationGpuStateInvalid = 8
	// GpuFabricHealthMaskIncorrectConfigurationIncompatibleGpuFw is NVML_GPU_FABRIC_HEALTH_MASK_INCORRECT_CONFIGURATION_INCOMPATIBLE_GPU_FW. Fabric Health Mask: Incorrect Configuration - Incompatible GPU Firmware.
	GpuFabricHealthMaskIncorrectConfigurationIncompatibleGpuFw = 6
	// GpuFabricHealthMaskIncorrectConfigurationIncorrectChassisSn is NVML_GPU_FABRIC_HEALTH_MASK_INCORRECT_CONFIGURATION_INCORRECT_CHASSIS_SN. Fabric Health Mask: Incorrect Configuration - Chassis Serial Number.
	GpuFabricHealthMaskIncorrectConfigurationIncorrectChassisSn = 3
	// GpuFabricHealthMaskIncorrectConfigurationIncorrectSysguid is NVML_GPU_FABRIC_HEALTH_MASK_INCORRECT_CONFIGURATION_INCORRECT_SYSGUID. Fabric Health Mask: Incorrect Configuration - SysGUID.
	GpuFabricHealthMaskIncorrectConfigurationIncorrectSysguid = 2
	// GpuFabricHealthMaskIncorrectConfigurationInsufficientNvlinks is NVML_GPU_FABRIC_HEALTH_MASK_INCORRECT_CONFIGURATION_INSUFFICIENT_NVLINKS. Fabric Health Mask: Incorrect Configuration - Insufficient Nvlinks.
	GpuFabricHealthMaskIncorrectConfigurationInsufficientNvlinks = 5
	// GpuFabricHealthMaskIncorrectConfigurationInvalidLocation is NVML_GPU_FABRIC_HEALTH_MASK_INCORRECT_CONFIGURATION_INVALID_LOCATION. Fabric Health Mask: Incorrect Configuration - Invalid Location.
	GpuFabricHealthMaskIncorrectConfigurationInvalidLocation = 7
	// GpuFabricHealthMaskIncorrectConfigurationNone is NVML_GPU_FABRIC_HEALTH_MASK_INCORRECT_CONFIGURATION_NONE. Fabric Health Mask: Correct Configuration.
	GpuFabricHealthMaskIncorrectConfigurationNone = 1
	// GpuFabricHealthMaskIncorrectConfigurationNotSupported is NVML_GPU_FABRIC_HEALTH_MASK_INCORRECT_CONFIGURATION_NOT_SUPPORTED. Fabric Health Mask: Incorrect Configuration not supported.
	GpuFabricHealthMaskIncorrectConfigurationNotSupported = 0
	// GpuFabricHealthMaskIncorrectConfigurationNoPartition is NVML_GPU_FABRIC_HEALTH_MASK_INCORRECT_CONFIGURATION_NO_PARTITION. Fabric Health Mask: Incorrect Configuration - No Partition.
	GpuFabricHealthMaskIncorrectConfigurationNoPartition = 4
	// GpuFabricHealthMaskPartitionAssignedFalse is NVML_GPU_FABRIC_HEALTH_MASK_PARTITION_ASSIGNED_FALSE. Fabric Health Mask: Partition is not Assigned.
	GpuFabricHealthMaskPartitionAssignedFalse = 2
	// GpuFabricHealthMaskPartitionAssignedNotSupported is NVML_GPU_FABRIC_HEALTH_MASK_PARTITION_ASSIGNED_NOT_SUPPORTED. Fabric Health Mask: Partition Assigned not supported.
	GpuFabricHealthMaskPartitionAssignedNotSupported = 0
	// GpuFabricHealthMaskPartitionAssignedTrue is NVML_GPU_FABRIC_HEALTH_MASK_PARTITION_ASSIGNED_TRUE. Fabric Health Mask: Partition is Assigned.
	GpuFabricHealthMaskPartitionAssignedTrue = 1
	// GpuFabricHealthMaskRouteRecoveryFalse is NVML_GPU_FABRIC_HEALTH_MASK_ROUTE_RECOVERY_FALSE. Fabric Health Mask: Route Recovery not in progress.
	GpuFabricHealthMaskRouteRecoveryFalse = 2
	// GpuFabricHealthMaskRouteRecoveryNotSupported is NVML_GPU_FABRIC_HEALTH_MASK_ROUTE_RECOVERY_NOT_SUPPORTED. Fabric Health Mask: Route Recovery not supported.
	GpuFabricHealthMaskRouteRecoveryNotSupported = 0
	// GpuFabricHealthMaskRouteRecoveryTrue is NVML_GPU_FABRIC_HEALTH_MASK_ROUTE_RECOVERY_TRUE. Fabric Health Mask: Route Recovery in progress.
	GpuFabricHealthMaskRouteRecoveryTrue = 1
	// GpuFabricHealthMaskRouteUnhealthyFalse is NVML_GPU_FABRIC_HEALTH_MASK_ROUTE_UNHEALTHY_FALSE. Fabric Health Mask: Route is healthy.
	GpuFabricHealthMaskRouteUnhealthyFalse = 2
	// GpuFabricHealthMaskRouteUnhealthyNotSupported is NVML_GPU_FABRIC_HEALTH_MASK_ROUTE_UNHEALTHY_NOT_SUPPORTED. Fabric Health Mask: Route Unhealthy not supported.
	GpuFabricHealthMaskRouteUnhealthyNotSupported = 0
	// GpuFabricHealthMaskRouteUnhealthyTrue is NVML_GPU_FABRIC_HEALTH_MASK_ROUTE_UNHEALTHY_TRUE. Fabric Health Mask: Route is unhealthy.
	GpuFabricHealthMaskRouteUnhealthyTrue = 1
	// GpuFabricHealthMaskShiftAccessTimeoutRecovery is NVML_GPU_FABRIC_HEALTH_MASK_SHIFT_ACCESS_TIMEOUT_RECOVERY. Fabric Health Mask Bit Shift for Access Timeout Recovery.
	GpuFabricHealthMaskShiftAccessTimeoutRecovery = 6
	// GpuFabricHealthMaskShiftDegradedBw is NVML_GPU_FABRIC_HEALTH_MASK_SHIFT_DEGRADED_BW. Fabric Health Mask Bit Shift for Degraded Bandwidth.
	GpuFabricHealthMaskShiftDegradedBw = 0
	// GpuFabricHealthMaskShiftGfmState is NVML_GPU_FABRIC_HEALTH_MASK_SHIFT_GFM_STATE. Fabric Health Mask Bit Shift for Global Fabric Manager State.
	GpuFabricHealthMaskShiftGfmState = 14
	// GpuFabricHealthMaskShiftIncorrectConfiguration is NVML_GPU_FABRIC_HEALTH_MASK_SHIFT_INCORRECT_CONFIGURATION. Fabric Health Mask Bit Shift for Incorrect Configuration.
	GpuFabricHealthMaskShiftIncorrectConfiguration = 8
	// GpuFabricHealthMaskShiftPartitionAssigned is NVML_GPU_FABRIC_HEALTH_MASK_SHIFT_PARTITION_ASSIGNED. Fabric Health Mask Bit Shift for Partition Assigned.
	GpuFabricHealthMaskShiftPartitionAssigned = 12
	// GpuFabricHealthMaskShiftRouteRecovery is NVML_GPU_FABRIC_HEALTH_MASK_SHIFT_ROUTE_RECOVERY. Fabric Health Mask Bit Shift for Route Recovery.
	GpuFabricHealthMaskShiftRouteRecovery = 2
	// GpuFabricHealthMaskShiftRouteUnhealthy is NVML_GPU_FABRIC_HEALTH_MASK_SHIFT_ROUTE_UNHEALTHY. Fabric Health Mask Bit Shift for Route Unhealthy.
	GpuFabricHealthMaskShiftRouteUnhealthy = 4
	// GpuFabricHealthMaskWidthAccessTimeoutRecovery is NVML_GPU_FABRIC_HEALTH_MASK_WIDTH_ACCESS_TIMEOUT_RECOVERY. Fabric Health Mask Width for Access Timeout Recovery.
	GpuFabricHealthMaskWidthAccessTimeoutRecovery = 3
	// GpuFabricHealthMaskWidthDegradedBw is NVML_GPU_FABRIC_HEALTH_MASK_WIDTH_DEGRADED_BW. Fabric Health Mask Width for Degraded Bandwidth.
	GpuFabricHealthMaskWidthDegradedBw = 3
	// GpuFabricHealthMaskWidthGfmState is NVML_GPU_FABRIC_HEALTH_MASK_WIDTH_GFM_STATE. Fabric Health Mask Width for Global Fabric Manager State.
	GpuFabricHealthMaskWidthGfmState = 3
	// GpuFabricHealthMaskWidthIncorrectConfiguration is NVML_GPU_FABRIC_HEALTH_MASK_WIDTH_INCORRECT_CONFIGURATION. Fabric Health Mask Width for Incorrect Configuration.
	GpuFabricHealthMaskWidthIncorrectConfiguration = 15
	// GpuFabricHealthMaskWidthPartitionAssigned is NVML_GPU_FABRIC_HEALTH_MASK_WIDTH_PARTITION_ASSIGNED. Fabric Health Mask Width for Partition Assigned.
	GpuFabricHealthMaskWidthPartitionAssigned = 3
	// GpuFabricHealthMaskWidthRouteRecovery is NVML_GPU_FABRIC_HEALTH_MASK_WIDTH_ROUTE_RECOVERY. Fabric Health Mask Width for Route Recovery.
	GpuFabricHealthMaskWidthRouteRecovery = 3
	// GpuFabricHealthMaskWidthRouteUnhealthy is NVML_GPU_FABRIC_HEALTH_MASK_WIDTH_ROUTE_UNHEALTHY. Fabric Health Mask Width for Route Unhealthy.
	GpuFabricHealthMaskWidthRouteUnhealthy = 3
	// GpuFabricHealthSummaryHealthy is NVML_GPU_FABRIC_HEALTH_SUMMARY_HEALTHY. Fabric Health Summary: Healthy.
	GpuFabricHealthSummaryHealthy = 1
	// GpuFabricHealthSummaryLimitedCapacity is NVML_GPU_FABRIC_HEALTH_SUMMARY_LIMITED_CAPACITY. Fabric Health Summary: Limited Capacity.
	GpuFabricHealthSummaryLimitedCapacity = 3
	// GpuFabricHealthSummaryNotSupported is NVML_GPU_FABRIC_HEALTH_SUMMARY_NOT_SUPPORTED. Fabric Health Summary: Not supported.
	GpuFabricHealthSummaryNotSupported = 0
	// GpuFabricHealthSummaryUnhealthy is NVML_GPU_FABRIC_HEALTH_SUMMARY_UNHEALTHY. Fabric Health Summary: Unhealthy.
	GpuFabricHealthSummaryUnhealthy = 2
	// GpuFabricUuidLen is NVML_GPU_FABRIC_UUID_LEN. Length of Fabric UUID.
	GpuFabricUuidLen = 16
	// GpuInstanceIdAny is NVML_GPU_INSTANCE_ID_ANY. Sentinel value used when no MIG GPU instance ID applies.
	GpuInstanceIdAny = 4294967295
	// GpuInstanceProfile1Slice is NVML_GPU_INSTANCE_PROFILE_1_SLICE. 1_SLICE GPU instance profile.
	GpuInstanceProfile1Slice = 0
	// GpuInstanceProfile1SliceAllMe is NVML_GPU_INSTANCE_PROFILE_1_SLICE_ALL_ME. 1_SLICE profile with all of GPU Decode, Encoder, JPEG, OFA engines.
	GpuInstanceProfile1SliceAllMe = 15
	// GpuInstanceProfile1SliceGfx is NVML_GPU_INSTANCE_PROFILE_1_SLICE_GFX. 1_SLICE gfx capable profile.
	GpuInstanceProfile1SliceGfx = 10
	// GpuInstanceProfile1SliceNoMe is NVML_GPU_INSTANCE_PROFILE_1_SLICE_NO_ME. 1_SLICE profile with none of Decode, Encoder, JPEG, OFA engines.
	GpuInstanceProfile1SliceNoMe = 13
	// GpuInstanceProfile1SliceREV1 is NVML_GPU_INSTANCE_PROFILE_1_SLICE_REV1. 1_SLICE GPU instance profile (rev1).
	GpuInstanceProfile1SliceREV1 = 7
	// GpuInstanceProfile1SliceREV2 is NVML_GPU_INSTANCE_PROFILE_1_SLICE_REV2. 1_SLICE GPU instance profile (rev2).
	GpuInstanceProfile1SliceREV2 = 9
	// GpuInstanceProfile2Slice is NVML_GPU_INSTANCE_PROFILE_2_SLICE. 2_SLICE GPU instance profile.
	GpuInstanceProfile2Slice = 1
	// GpuInstanceProfile2SliceAllMe is NVML_GPU_INSTANCE_PROFILE_2_SLICE_ALL_ME. 2_SLICE profile with all of GPU Decode, Encoder, JPEG, OFA engines. Allocation of instance of this profile prevents allocation of all but _NO_ME profiles.
	GpuInstanceProfile2SliceAllMe = 16
	// GpuInstanceProfile2SliceGfx is NVML_GPU_INSTANCE_PROFILE_2_SLICE_GFX. 2_SLICE gfx capable profile.
	GpuInstanceProfile2SliceGfx = 11
	// GpuInstanceProfile2SliceNoMe is NVML_GPU_INSTANCE_PROFILE_2_SLICE_NO_ME. 2_SLICE profile with none of Decode, Encoder, JPEG, OFA engines.
	GpuInstanceProfile2SliceNoMe = 14
	// GpuInstanceProfile2SliceREV1 is NVML_GPU_INSTANCE_PROFILE_2_SLICE_REV1. 2_SLICE GPU instance profile (rev1).
	GpuInstanceProfile2SliceREV1 = 8
	// GpuInstanceProfile3Slice is NVML_GPU_INSTANCE_PROFILE_3_SLICE. 3_SLICE GPU instance profile.
	GpuInstanceProfile3Slice = 2
	// GpuInstanceProfile3SliceGfx is NVML_GPU_INSTANCE_PROFILE_3_SLICE_GFX. 3_SLICE gfx + media capable profile.
	GpuInstanceProfile3SliceGfx = 17
	// GpuInstanceProfile4Slice is NVML_GPU_INSTANCE_PROFILE_4_SLICE. 4_SLICE GPU instance profile.
	GpuInstanceProfile4Slice = 3
	// GpuInstanceProfile4SliceGfx is NVML_GPU_INSTANCE_PROFILE_4_SLICE_GFX. 4_SLICE gfx capable profile.
	GpuInstanceProfile4SliceGfx = 12
	// GpuInstanceProfile6Slice is NVML_GPU_INSTANCE_PROFILE_6_SLICE. 6_SLICE GPU instance profile.
	GpuInstanceProfile6Slice = 6
	// GpuInstanceProfile7Slice is NVML_GPU_INSTANCE_PROFILE_7_SLICE. 7_SLICE GPU instance profile.
	GpuInstanceProfile7Slice = 4
	// GpuInstanceProfile8Slice is NVML_GPU_INSTANCE_PROFILE_8_SLICE. 8_SLICE GPU instance profile.
	GpuInstanceProfile8Slice = 5
	// GpuInstanceProfileCapsGfx is NVML_GPU_INSTANCE_PROFILE_CAPS_GFX. GFX support.
	GpuInstanceProfileCapsGfx = 2
	// GpuInstanceProfileCapsP2P is NVML_GPU_INSTANCE_PROFILE_CAPS_P2P. Peer-to-Peer support.
	GpuInstanceProfileCapsP2P = 1
	// GpuInstanceProfileCount is NVML_GPU_INSTANCE_PROFILE_COUNT. Total number of GPU instance profiles.
	GpuInstanceProfileCount = 18
	// GpuIntstanceProfileCapsP2P is NVML_GPU_INTSTANCE_PROFILE_CAPS_P2P.
	//
	// Deprecated: Do not use.
	GpuIntstanceProfileCapsP2P = 1
	// GridLicenseBufferSize is NVML_GRID_LICENSE_BUFFER_SIZE. Buffer size guaranteed to be large enough for [VgpuTypeId.License].
	GridLicenseBufferSize = 128
	// GridLicenseExpiryInvalid is NVML_GRID_LICENSE_EXPIRY_INVALID. Invalid expiry or error fetching expiry.
	GridLicenseExpiryInvalid = 1
	// GridLicenseExpiryNotApplicable is NVML_GRID_LICENSE_EXPIRY_NOT_APPLICABLE. Expiry not applicable.
	GridLicenseExpiryNotApplicable = 3
	// GridLicenseExpiryNotAvailable is NVML_GRID_LICENSE_EXPIRY_NOT_AVAILABLE. Expiry information not available.
	GridLicenseExpiryNotAvailable = 0
	// GridLicenseExpiryPermanent is NVML_GRID_LICENSE_EXPIRY_PERMANENT. Permanent expiry.
	GridLicenseExpiryPermanent = 4
	// GridLicenseExpiryValid is NVML_GRID_LICENSE_EXPIRY_VALID. Valid expiry.
	GridLicenseExpiryValid = 2
	// GridLicenseFeatureMaxCount is NVML_GRID_LICENSE_FEATURE_MAX_COUNT.
	GridLicenseFeatureMaxCount = 3
	// GridLicenseStateLicensed is NVML_GRID_LICENSE_STATE_LICENSED. Licensed state.
	GridLicenseStateLicensed = 5
	// GridLicenseStateUninitialized is NVML_GRID_LICENSE_STATE_UNINITIALIZED. Uninitialized state.
	GridLicenseStateUninitialized = 1
	// GridLicenseStateUnknown is NVML_GRID_LICENSE_STATE_UNKNOWN. Unknown state.
	GridLicenseStateUnknown = 0
	// GridLicenseStateUnlicensed is NVML_GRID_LICENSE_STATE_UNLICENSED. Unlicensed state.
	GridLicenseStateUnlicensed = 4
	// GridLicenseStateUnlicensedRestricted is NVML_GRID_LICENSE_STATE_UNLICENSED_RESTRICTED. Unlicensed restricted state.
	GridLicenseStateUnlicensedRestricted = 3
	// GridLicenseStateUnlicensedUnrestricted is NVML_GRID_LICENSE_STATE_UNLICENSED_UNRESTRICTED. Unlicensed unrestricted state.
	GridLicenseStateUnlicensedUnrestricted = 2
	// GspFirmwareVersionBufSize is NVML_GSP_FIRMWARE_VERSION_BUF_SIZE. Buffer size for GSP firmware version string.
	GspFirmwareVersionBufSize = 64
	// InitFlagForceInit is NVML_INIT_FLAG_FORCE_INIT. Force device initialization even when a previous [Init] was called with the NO_GPUS and NO_ATTACH flags.
	InitFlagForceInit = 4
	// InitFlagNoAttach is NVML_INIT_FLAG_NO_ATTACH. Initialize the NVML Library without attaching any discovered devices.
	InitFlagNoAttach = 2
	// InitFlagNoGpus is NVML_INIT_FLAG_NO_GPUS. Initialize the NVML Library even when no devices are found.
	InitFlagNoGpus = 1
	// InvalidVgpuPlacementId is NVML_INVALID_VGPU_PLACEMENT_ID.
	InvalidVgpuPlacementId = 65535
	// MaxGpuPerfPstates is NVML_MAX_GPU_PERF_PSTATES. Maximum number of GPU performance states.
	MaxGpuPerfPstates = 16
	// MaxGpuUtilizations is NVML_MAX_GPU_UTILIZATIONS. Maximum number of GPU utilization domains.
	MaxGpuUtilizations = 8
	// MaxPhysicalBridge is NVML_MAX_PHYSICAL_BRIDGE. Maximum number of physical bridges.
	MaxPhysicalBridge = 128
	// MaxThermalSensorsPerGpu is NVML_MAX_THERMAL_SENSORS_PER_GPU. Maximum number of thermal sensors per GPU.
	MaxThermalSensorsPerGpu = 3
	// MclkSwitchTypeDeferred is NVML_MCLK_SWITCH_TYPE_DEFERRED. deferred switching (driver reload).
	MclkSwitchTypeDeferred = 1
	// MclkSwitchTypeNotSupported is NVML_MCLK_SWITCH_TYPE_NOT_SUPPORTED. switching is not supported.
	MclkSwitchTypeNotSupported = 0
	// MclkSwitchTypeRuntime is NVML_MCLK_SWITCH_TYPE_RUNTIME. runtime switching.
	MclkSwitchTypeRuntime = 2
	// NvfbcSessionFlagCaptureWithWaitInfinite is NVML_NVFBC_SESSION_FLAG_CAPTURE_WITH_WAIT_INFINITE. Bit specifying if capture was requested as blocking call.
	NvfbcSessionFlagCaptureWithWaitInfinite = 8
	// NvfbcSessionFlagCaptureWithWaitNoWait is NVML_NVFBC_SESSION_FLAG_CAPTURE_WITH_WAIT_NO_WAIT. Bit specifying if capture was requested as non-blocking call.
	NvfbcSessionFlagCaptureWithWaitNoWait = 4
	// NvfbcSessionFlagCaptureWithWaitTimeout is NVML_NVFBC_SESSION_FLAG_CAPTURE_WITH_WAIT_TIMEOUT. Bit specifying if capture was requested as blocking call with timeout period.
	NvfbcSessionFlagCaptureWithWaitTimeout = 16
	// NvfbcSessionFlagClassificationmapEnabled is NVML_NVFBC_SESSION_FLAG_CLASSIFICATIONMAP_ENABLED. Bit specifying classification map state.
	NvfbcSessionFlagClassificationmapEnabled = 2
	// NvfbcSessionFlagDiffmapEnabled is NVML_NVFBC_SESSION_FLAG_DIFFMAP_ENABLED. Bit specifying differential map state.
	NvfbcSessionFlagDiffmapEnabled = 1
	// NvlinkBerExpShift is NVML_NVLINK_BER_EXP_SHIFT. Shift for NVLink BER exponent.
	NvlinkBerExpShift = 0
	// NvlinkBerExpWidth is NVML_NVLINK_BER_EXP_WIDTH. Width for NVLink BER exponent.
	NvlinkBerExpWidth = 255
	// NvlinkBerMantissaShift is NVML_NVLINK_BER_MANTISSA_SHIFT. Shift for NVLink BER mantissa.
	NvlinkBerMantissaShift = 8
	// NvlinkBerMantissaWidth is NVML_NVLINK_BER_MANTISSA_WIDTH. Width for NVLink BER mantissa.
	NvlinkBerMantissaWidth = 15
	// NvlinkFirmwareUcodeTypeMse is NVML_NVLINK_FIRMWARE_UCODE_TYPE_MSE. MSE ucode type.
	NvlinkFirmwareUcodeTypeMse = 1
	// NvlinkFirmwareUcodeTypeNetir is NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR. NETIR ucode type.
	NvlinkFirmwareUcodeTypeNetir = 2
	// NvlinkFirmwareUcodeTypeNetirCln is NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR_CLN. NETIR CLN ucode type.
	NvlinkFirmwareUcodeTypeNetirCln = 4
	// NvlinkFirmwareUcodeTypeNetirDln is NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR_DLN. NETIR DLN ucode type.
	NvlinkFirmwareUcodeTypeNetirDln = 5
	// NvlinkFirmwareUcodeTypeNetirUphy is NVML_NVLINK_FIRMWARE_UCODE_TYPE_NETIR_UPHY. NETIR UPHY ucode type.
	NvlinkFirmwareUcodeTypeNetirUphy = 3
	// NvlinkFirmwareVersionLength is NVML_NVLINK_FIRMWARE_VERSION_LENGTH. Length of firmware version string.
	NvlinkFirmwareVersionLength = 100
	// NvlinkLowPowerThresholdDefault is NVML_NVLINK_LOW_POWER_THRESHOLD_DEFAULT.
	NvlinkLowPowerThresholdDefault = NvlinkLowPowerThresholdReset
	// NvlinkLowPowerThresholdMax is NVML_NVLINK_LOW_POWER_THRESHOLD_MAX.
	NvlinkLowPowerThresholdMax = 8191
	// NvlinkLowPowerThresholdMin is NVML_NVLINK_LOW_POWER_THRESHOLD_MIN. [NvlinkLowPowerThresholdMin] will be deprecated. Use the NVML Field Value [FieldDevNvlinkGetPowerThresholdMin] to get the correct Min Low Power Threshold.
	NvlinkLowPowerThresholdMin = 1
	// NvlinkLowPowerThresholdReset is NVML_NVLINK_LOW_POWER_THRESHOLD_RESET.
	NvlinkLowPowerThresholdReset = 4294967295
	// NvlinkLowPowerThresholdUnit100us is NVML_NVLINK_LOW_POWER_THRESHOLD_UNIT_100US.
	NvlinkLowPowerThresholdUnit100us = 0
	// NvlinkLowPowerThresholdUnit50US is NVML_NVLINK_LOW_POWER_THRESHOLD_UNIT_50US.
	NvlinkLowPowerThresholdUnit50US = 1
	// NvlinkMaxLinks is NVML_NVLINK_MAX_LINKS. Maximum number of NVLink links supported.
	NvlinkMaxLinks = 36
	// NvlinkMaxRemapTableEntriesV2 is NVML_NVLINK_MAX_REMAP_TABLE_ENTRIES_V2.
	NvlinkMaxRemapTableEntriesV2 = 4096
	// NvlinkNvleAes256GcmKeySizeBytes is NVML_NVLINK_NVLE_AES_256_GCM_KEY_SIZE_BYTES. Size in bytes of the AES-256-GCM key secret used for NVLink encryption.
	NvlinkNvleAes256GcmKeySizeBytes = 32
	// NvlinkNvlePrivateInfoSize is NVML_NVLINK_NVLE_PRIVATE_INFO_SIZE. Size in bytes of the NVLink NVLE private (opaque) info buffer.
	NvlinkNvlePrivateInfoSize = 256
	// NvlinkPowerStateHighSpeed is NVML_NVLINK_POWER_STATE_HIGH_SPEED.
	NvlinkPowerStateHighSpeed = 0
	// NvlinkPowerStateLow is NVML_NVLINK_POWER_STATE_LOW.
	NvlinkPowerStateLow = 1
	// NvlinkRemapTableEntriesChunk is NVML_NVLINK_REMAP_TABLE_ENTRIES_CHUNK.
	NvlinkRemapTableEntriesChunk = 128
	// NvlinkStateActive is NVML_NVLINK_STATE_ACTIVE. NVLink is active.
	NvlinkStateActive = 1
	// NvlinkStateActiveTrafficDisabled is NVML_NVLINK_STATE_ACTIVE_TRAFFIC_DISABLED. NVLink is active, but not usable for traffic.
	NvlinkStateActiveTrafficDisabled = 3
	// NvlinkStateInactive is NVML_NVLINK_STATE_INACTIVE. NVLink is inactive.
	NvlinkStateInactive = 0
	// NvlinkStateSleep is NVML_NVLINK_STATE_SLEEP. NVLink is in sleep state.
	NvlinkStateSleep = 2
	// NvlinkTotalSupportedBwModes is NVML_NVLINK_TOTAL_SUPPORTED_BW_MODES. Total supported NVLink bandwidth modes.
	NvlinkTotalSupportedBwModes = 23
	// OperationalEventAttrComponentReset is NVML_OPERATIONAL_EVENT_ATTR_COMPONENT_RESET. Event involved a component reset.
	OperationalEventAttrComponentReset = 8
	// OperationalEventAttrLatent is NVML_OPERATIONAL_EVENT_ATTR_LATENT. Event reports a latent condition.
	OperationalEventAttrLatent = 2
	// OperationalEventAttrOverflow is NVML_OPERATIONAL_EVENT_ATTR_OVERFLOW. Source reported that event records were dropped at the source.
	OperationalEventAttrOverflow = 64
	// OperationalEventAttrPrimary is NVML_OPERATIONAL_EVENT_ATTR_PRIMARY. Event is the primary event in its group.
	OperationalEventAttrPrimary = 32
	// OperationalEventAttrPropagated is NVML_OPERATIONAL_EVENT_ATTR_PROPAGATED. Event was propagated from another source.
	OperationalEventAttrPropagated = 4
	// OperationalEventAttrThresholdExceeded is NVML_OPERATIONAL_EVENT_ATTR_THRESHOLD_EXCEEDED. Event reports an exceeded threshold.
	OperationalEventAttrThresholdExceeded = 16
	// OperationalEventAttrUncontained is NVML_OPERATIONAL_EVENT_ATTR_UNCONTAINED. Event reports an uncontained condition.
	OperationalEventAttrUncontained = 1
	// OperationalEventGroupAttrPreverr is NVML_OPERATIONAL_EVENT_GROUP_ATTR_PREVERR. Event group reports a previous error condition.
	OperationalEventGroupAttrPreverr = 2
	// OperationalEventGroupAttrRecovered is NVML_OPERATIONAL_EVENT_GROUP_ATTR_RECOVERED. Event group reports a recovered condition.
	OperationalEventGroupAttrRecovered = 1
	// OperationalEventGroupAttrSimulated is NVML_OPERATIONAL_EVENT_GROUP_ATTR_SIMULATED. Event group was generated by simulation or testing.
	OperationalEventGroupAttrSimulated = 4
	// PcieAtomicsCapCas128 is NVML_PCIE_ATOMICS_CAP_CAS128. 128-bit compare and swap.
	PcieAtomicsCapCas128 = 64
	// PcieAtomicsCapCas32 is NVML_PCIE_ATOMICS_CAP_CAS32. 32-bit compare and swap.
	PcieAtomicsCapCas32 = 16
	// PcieAtomicsCapCas64 is NVML_PCIE_ATOMICS_CAP_CAS64. 64-bit compare and swap.
	PcieAtomicsCapCas64 = 32
	// PcieAtomicsCapFetchadd32 is NVML_PCIE_ATOMICS_CAP_FETCHADD32. 32-bit fetch and add.
	PcieAtomicsCapFetchadd32 = 1
	// PcieAtomicsCapFetchadd64 is NVML_PCIE_ATOMICS_CAP_FETCHADD64. 64-bit fetch and add.
	PcieAtomicsCapFetchadd64 = 2
	// PcieAtomicsCapSwap32 is NVML_PCIE_ATOMICS_CAP_SWAP32. 32-bit swap.
	PcieAtomicsCapSwap32 = 4
	// PcieAtomicsCapSwap64 is NVML_PCIE_ATOMICS_CAP_SWAP64. 64-bit swap.
	PcieAtomicsCapSwap64 = 8
	// PcieAtomicsOpsMax is NVML_PCIE_ATOMICS_OPS_MAX. Maximum number of PCIe atomics operations.
	PcieAtomicsOpsMax = 7
	// PcieLinkMaxSpeed16000mbps is NVML_PCIE_LINK_MAX_SPEED_16000MBPS. 16000 MB/s PCIe link speed.
	PcieLinkMaxSpeed16000mbps = 4
	// PcieLinkMaxSpeed2500mbps is NVML_PCIE_LINK_MAX_SPEED_2500MBPS. 2500 MB/s PCIe link speed.
	PcieLinkMaxSpeed2500mbps = 1
	// PcieLinkMaxSpeed32000mbps is NVML_PCIE_LINK_MAX_SPEED_32000MBPS. 32000 MB/s PCIe link speed.
	PcieLinkMaxSpeed32000mbps = 5
	// PcieLinkMaxSpeed5000mbps is NVML_PCIE_LINK_MAX_SPEED_5000MBPS. 5000 MB/s PCIe link speed.
	PcieLinkMaxSpeed5000mbps = 2
	// PcieLinkMaxSpeed64000mbps is NVML_PCIE_LINK_MAX_SPEED_64000MBPS. 64000 MB/s PCIe link speed.
	PcieLinkMaxSpeed64000mbps = 6
	// PcieLinkMaxSpeed8000mbps is NVML_PCIE_LINK_MAX_SPEED_8000MBPS. 8000 MB/s PCIe link speed.
	PcieLinkMaxSpeed8000mbps = 3
	// PcieLinkMaxSpeedInvalid is NVML_PCIE_LINK_MAX_SPEED_INVALID. Invalid PCIe link speed.
	PcieLinkMaxSpeedInvalid = 0
	// PerfCfPmSensorMaxSignals is NVML_PERF_CF_PM_SENSOR_MAX_SIGNALS. Maximum number of BA PM sensor signals.
	PerfCfPmSensorMaxSignals = 1024
	// PerfMetricsControllerDlppc2XPwrPolicyRelationshipSetLimitsMax is NVML_PERF_METRICS_CONTROLLER_DLPPC_2X_PWR_POLICY_RELATIONSHIP_SET_LIMITS_MAX. Maximum number of power policy relationship set limits for DLPPC 2x controller.
	PerfMetricsControllerDlppc2XPwrPolicyRelationshipSetLimitsMax = 4
	// PerfMetricsControllerSampleControllerMaxNum is NVML_PERF_METRICS_CONTROLLER_SAMPLE_CONTROLLER_MAX_NUM. Maximum number of controllers that can be sampled.
	PerfMetricsControllerSampleControllerMaxNum = 4
	// PerfMetricsControllerStatusDlppc2XDramclkNum is NVML_PERF_METRICS_CONTROLLER_STATUS_DLPPC_2X_DRAMCLK_NUM. Number of DRAMCLK frequencies tracked by DLPPC 2x controller status.
	PerfMetricsControllerStatusDlppc2XDramclkNum = 3
	// PerfMetricsControllerTypeDlppc2X is NVML_PERF_METRICS_CONTROLLER_TYPE_DLPPC_2X. Controller type identifier for DLPPC 2x.
	PerfMetricsControllerTypeDlppc2X = 0
	// PerfMetricsControllerTypePfpp1X is NVML_PERF_METRICS_CONTROLLER_TYPE_PFPP_1X. Controller type identifier for PFPP 1x.
	PerfMetricsControllerTypePfpp1X = 1
	// PerfMetricsNneDescInferenceLoopsMax is NVML_PERF_METRICS_NNE_DESC_INFERENCE_LOOPS_MAX. Maximum number of NNE descriptor inference loops.
	PerfMetricsNneDescInferenceLoopsMax = 8
	// PerfMetricsPwrModelDlppm1XMaxCoreRails is NVML_PERF_METRICS_PWR_MODEL_DLPPM_1X_MAX_CORE_RAILS. Maximum number of core rails for DLPPM 1x power model.
	PerfMetricsPwrModelDlppm1XMaxCoreRails = 2
	// PerfMetricsPwrModelMetricsDlppm1XObesrvedIntialDramclkEstimatesMax is NVML_PERF_METRICS_PWR_MODEL_METRICS_DLPPM_1X_OBESRVED_INTIAL_DRAMCLK_ESTIMATES_MAX. Maximum number of initial DRAMCLK estimates for DLPPM 1x observed metrics.
	PerfMetricsPwrModelMetricsDlppm1XObesrvedIntialDramclkEstimatesMax = 3
	// PerfMetricsPwrModelScaleLoopsMaxPfpp1X is NVML_PERF_METRICS_PWR_MODEL_SCALE_LOOPS_MAX_PFPP_1X. Maximum number of power model scale loops for PFPP 1x.
	PerfMetricsPwrModelScaleLoopsMaxPfpp1X = 32
	// PerfMetricsPwrModelScaleMetricsInputMax is NVML_PERF_METRICS_PWR_MODEL_SCALE_METRICS_INPUT_MAX. Maximum number of power model scale metrics inputs.
	PerfMetricsPwrModelScaleMetricsInputMax = 16
	// PerfMetricsPwrModelScaleMetricsPfpp1XGpcclkIdx is NVML_PERF_METRICS_PWR_MODEL_SCALE_METRICS_PFPP_1X_GPCCLK_IDX. Index for GPCCLK frequency in PFPP 1x scale metrics.
	PerfMetricsPwrModelScaleMetricsPfpp1XGpcclkIdx = 0
	// PerfMetricsSampleCount is NVML_PERF_METRICS_SAMPLE_COUNT. Total number of performance metrics samples that can be collected.
	PerfMetricsSampleCount = 13
	// PerfModesBufferSize is NVML_PERF_MODES_BUFFER_SIZE. Buffer size for performance modes strings.
	PerfModesBufferSize = 2048
	// PowerMizerModeAdaptive is NVML_POWER_MIZER_MODE_ADAPTIVE. adjust GPU clocks based on GPU utilization.
	PowerMizerModeAdaptive = 0
	// PowerMizerModeAuto is NVML_POWER_MIZER_MODE_AUTO. PowerMizer mode is driver controlled.
	PowerMizerModeAuto = 2
	// PowerMizerModePreferConsistentPerformance is NVML_POWER_MIZER_MODE_PREFER_CONSISTENT_PERFORMANCE. lock to GPU base clocks.
	PowerMizerModePreferConsistentPerformance = 3
	// PowerMizerModePreferMaximumPerformance is NVML_POWER_MIZER_MODE_PREFER_MAXIMUM_PERFORMANCE. raise GPU clocks to favor maximum performance, to the extent that thermal and other constraints allow.
	PowerMizerModePreferMaximumPerformance = 1
	// PowerSmoothingAdminOverrideNotSet is NVML_POWER_SMOOTHING_ADMIN_OVERRIDE_NOT_SET. Admin override not set.
	PowerSmoothingAdminOverrideNotSet = 4294967295
	// PowerSmoothingMaxNumProfiles is NVML_POWER_SMOOTHING_MAX_NUM_PROFILES. Maximum number of profiles.
	PowerSmoothingMaxNumProfiles = 5
	// PowerSmoothingNumProfileParams is NVML_POWER_SMOOTHING_NUM_PROFILE_PARAMS. Number of profile parameters.
	PowerSmoothingNumProfileParams = 8
	// PowerSmoothingProfileParamPercentTmpFloor is NVML_POWER_SMOOTHING_PROFILE_PARAM_PERCENT_TMP_FLOOR. Percent temperature floor.
	PowerSmoothingProfileParamPercentTmpFloor = 0
	// PowerSmoothingProfileParamPrimaryFloorActOffset is NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_ACT_OFFSET. Primary floor activation offset value for a given profile.
	PowerSmoothingProfileParamPrimaryFloorActOffset = 7
	// PowerSmoothingProfileParamPrimaryFloorActWinMult is NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_ACT_WIN_MULT. Primary floor activation window multiplier value for a given profile.
	PowerSmoothingProfileParamPrimaryFloorActWinMult = 5
	// PowerSmoothingProfileParamPrimaryFloorTarWinMult is NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_TAR_WIN_MULT. Primary floor target window multiplier value for a given profile.
	PowerSmoothingProfileParamPrimaryFloorTarWinMult = 6
	// PowerSmoothingProfileParamRampDownHysteresis is NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_HYSTERESIS. Ramp down hysteresis.
	PowerSmoothingProfileParamRampDownHysteresis = 3
	// PowerSmoothingProfileParamRampDownRate is NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_RATE. Ramp down rate.
	PowerSmoothingProfileParamRampDownRate = 2
	// PowerSmoothingProfileParamRampUpRate is NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_UP_RATE. Ramp up rate.
	PowerSmoothingProfileParamRampUpRate = 1
	// PowerSmoothingProfileParamSecondaryPowerFloor is NVML_POWER_SMOOTHING_PROFILE_PARAM_SECONDARY_POWER_FLOOR. Secondary power floor value for a given profile.
	PowerSmoothingProfileParamSecondaryPowerFloor = 4
	// PrmDataMaxSize is NVML_PRM_DATA_MAX_SIZE. Maximum size of the PRM data.
	PrmDataMaxSize = 496
	// RusdPollAll is NVML_RUSD_POLL_ALL. Enable RUSD polling on all groups.
	RusdPollAll uint64 = 18446744073709551615
	// RusdPollClock is NVML_RUSD_POLL_CLOCK. Enable RUSD polling on clock group.
	RusdPollClock = 1
	// RusdPollFan is NVML_RUSD_POLL_FAN. Enable RUSD polling on fan group.
	RusdPollFan = 64
	// RusdPollMemory is NVML_RUSD_POLL_MEMORY. Enable RUSD polling on memory group.
	RusdPollMemory = 4
	// RusdPollNone is NVML_RUSD_POLL_NONE. Disable RUSD polling on all metric groups.
	RusdPollNone = 0
	// RusdPollPci is NVML_RUSD_POLL_PCI. Enable RUSD polling on pci group.
	RusdPollPci = 32
	// RusdPollPerf is NVML_RUSD_POLL_PERF. Enable RUSD polling on performance group.
	RusdPollPerf = 2
	// RusdPollPower is NVML_RUSD_POLL_POWER. Enable RUSD polling on power group.
	RusdPollPower = 8
	// RusdPollProcUtil is NVML_RUSD_POLL_PROC_UTIL. Enable RUSD polling on process utilization group.
	RusdPollProcUtil = 128
	// RusdPollThermal is NVML_RUSD_POLL_THERMAL. Enable RUSD polling on thermal group.
	RusdPollThermal = 16
	// SchedulerSwMaxLogEntries is NVML_SCHEDULER_SW_MAX_LOG_ENTRIES. Maximum number of scheduler log entries.
	SchedulerSwMaxLogEntries = 200
	// SingleBitEcc is NVML_SINGLE_BIT_ECC. Deprecated single bit ECC error. See [MemoryErrorTypeCorrected].
	//
	// Deprecated: Mapped to [MemoryErrorTypeCorrected].
	SingleBitEcc = MemoryErrorTypeCorrected
	// SupportedVgpuSchedulerPolicyCount is NVML_SUPPORTED_VGPU_SCHEDULER_POLICY_COUNT. Number of supported vGPU scheduler policies.
	SupportedVgpuSchedulerPolicyCount = 3
	// SystemDriverVersionBufferSize is NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE. Buffer size guaranteed to be large enough for [SystemGetDriverVersion].
	SystemDriverVersionBufferSize = 80
	// SystemNvmlVersionBufferSize is NVML_SYSTEM_NVML_VERSION_BUFFER_SIZE. Buffer size guaranteed to be large enough for [SystemGetNVMLVersion].
	SystemNvmlVersionBufferSize = 80
	// TopologyCpu is NVML_TOPOLOGY_CPU. Topology level for node.
	TopologyCpu = TopologyNode
	// ValueNotAvailable is NVML_VALUE_NOT_AVAILABLE. Macro for unavailable values.
	ValueNotAvailable = -1
	// VgpuNameBufferSize is NVML_VGPU_NAME_BUFFER_SIZE.
	VgpuNameBufferSize = 64
	// VgpuPgpuHeterogeneousMode is NVML_VGPU_PGPU_HETEROGENEOUS_MODE. Heterogeneous vGPU mode.
	VgpuPgpuHeterogeneousMode = 0
	// VgpuPgpuHomogeneousMode is NVML_VGPU_PGPU_HOMOGENEOUS_MODE. Homogeneous vGPU mode.
	VgpuPgpuHomogeneousMode = 1
	// VgpuPgpuVirtualizationCapMigrationNo is NVML_VGPU_PGPU_VIRTUALIZATION_CAP_MIGRATION_NO. Physical GPU migration is not supported.
	VgpuPgpuVirtualizationCapMigrationNo = 0
	// VgpuPgpuVirtualizationCapMigrationYes is NVML_VGPU_PGPU_VIRTUALIZATION_CAP_MIGRATION_YES. Physical GPU migration is supported.
	VgpuPgpuVirtualizationCapMigrationYes = 1
	// VgpuSchedulerArrDefault is NVML_VGPU_SCHEDULER_ARR_DEFAULT. Default Adaptive Round Robin mode.
	//
	// Deprecated: Adaptive Round Robin mode is always enabled.
	VgpuSchedulerArrDefault = 0
	// VgpuSchedulerArrDisable is NVML_VGPU_SCHEDULER_ARR_DISABLE. Disable Adaptive Round Robin mode.
	VgpuSchedulerArrDisable = 1
	// VgpuSchedulerArrEnable is NVML_VGPU_SCHEDULER_ARR_ENABLE. Enable Adaptive Round Robin mode.
	VgpuSchedulerArrEnable = 2
	// VgpuSchedulerEngineTypeGraphics is NVML_VGPU_SCHEDULER_ENGINE_TYPE_GRAPHICS. Graphics engine.
	VgpuSchedulerEngineTypeGraphics = 1
	// VgpuSchedulerEngineTypeNvenc0 is NVML_VGPU_SCHEDULER_ENGINE_TYPE_NVENC0. NVENC0.
	VgpuSchedulerEngineTypeNvenc0 = 3
	// VgpuSchedulerEngineTypeNvenc1 is NVML_VGPU_SCHEDULER_ENGINE_TYPE_NVENC1. NVENC1.
	VgpuSchedulerEngineTypeNvenc1 = 2
	// VgpuSchedulerPolicyBestEffort is NVML_VGPU_SCHEDULER_POLICY_BEST_EFFORT. Best effort scheduler policy.
	VgpuSchedulerPolicyBestEffort = 1
	// VgpuSchedulerPolicyEqualShare is NVML_VGPU_SCHEDULER_POLICY_EQUAL_SHARE. Equal share scheduler policy.
	VgpuSchedulerPolicyEqualShare = 2
	// VgpuSchedulerPolicyFixedShare is NVML_VGPU_SCHEDULER_POLICY_FIXED_SHARE. Fixed share scheduler policy.
	VgpuSchedulerPolicyFixedShare = 3
	// VgpuSchedulerPolicyUnknown is NVML_VGPU_SCHEDULER_POLICY_UNKNOWN. Unknown scheduler policy.
	VgpuSchedulerPolicyUnknown = 0
	// VgpuVirtualizationCapMigrationNo is NVML_VGPU_VIRTUALIZATION_CAP_MIGRATION_NO. vGPU migration is not supported.
	VgpuVirtualizationCapMigrationNo = 0
	// VgpuVirtualizationCapMigrationYes is NVML_VGPU_VIRTUALIZATION_CAP_MIGRATION_YES. vGPU migration is supported.
	VgpuVirtualizationCapMigrationYes = 1
	// WorkloadPowerMaxProfiles is NVML_WORKLOAD_POWER_MAX_PROFILES.
	WorkloadPowerMaxProfiles = 255
	// ClocksEventReasonAll is nvmlClocksEventReasonAll. Bitmask of all clock event reasons.
	ClocksEventReasonAll uint64 = 2047
	// ClocksEventReasonApplicationsClocksSetting is nvmlClocksEventReasonApplicationsClocksSetting. Clocks are set to application-specific values.
	//
	// Deprecated: No longer used.
	ClocksEventReasonApplicationsClocksSetting uint64 = 2
	// ClocksEventReasonBoardLimit is nvmlClocksEventReasonBoardLimit. Board limit policy is limiting clocks.
	ClocksEventReasonBoardLimit uint64 = 512
	// ClocksEventReasonDisplayClockSetting is nvmlClocksEventReasonDisplayClockSetting. Display clock setting limited.
	ClocksEventReasonDisplayClockSetting uint64 = 256
	// ClocksEventReasonGpuIdle is nvmlClocksEventReasonGpuIdle. GPU is idle.
	ClocksEventReasonGpuIdle uint64 = 1
	// ClocksEventReasonNone is nvmlClocksEventReasonNone. No clock throttling.
	ClocksEventReasonNone uint64 = 0
	// ClocksEventReasonReliability is nvmlClocksEventReasonReliability. Reliability policy is limiting clocks.
	ClocksEventReasonReliability uint64 = 1024
	// ClocksEventReasonSwPowerCap is nvmlClocksEventReasonSwPowerCap. Software power cap activated.
	ClocksEventReasonSwPowerCap uint64 = 4
	// ClocksEventReasonSwThermalSlowdown is nvmlClocksEventReasonSwThermalSlowdown. Software thermal slowdown activated.
	ClocksEventReasonSwThermalSlowdown uint64 = 32
	// ClocksEventReasonSyncBoost is nvmlClocksEventReasonSyncBoost. Sync boost activated.
	ClocksEventReasonSyncBoost uint64 = 16
	// ClocksThrottleReasonAll is nvmlClocksThrottleReasonAll. All clock throttling reasons.
	//
	// Deprecated: Use [ClocksEventReasonAll] instead.
	ClocksThrottleReasonAll = ClocksEventReasonAll
	// ClocksThrottleReasonApplicationsClocksSetting is nvmlClocksThrottleReasonApplicationsClocksSetting.
	//
	// Deprecated: Application clocks setting.
	ClocksThrottleReasonApplicationsClocksSetting = ClocksEventReasonApplicationsClocksSetting
	// ClocksThrottleReasonDisplayClockSetting is nvmlClocksThrottleReasonDisplayClockSetting. Display clock setting.
	//
	// Deprecated: Use [ClocksEventReasonDisplayClockSetting] instead.
	ClocksThrottleReasonDisplayClockSetting = ClocksEventReasonDisplayClockSetting
	// ClocksThrottleReasonGpuIdle is nvmlClocksThrottleReasonGpuIdle. GPU idle.
	//
	// Deprecated: Use [ClocksEventReasonGpuIdle] instead.
	ClocksThrottleReasonGpuIdle = ClocksEventReasonGpuIdle
	// ClocksThrottleReasonHwPowerBrakeSlowdown is nvmlClocksThrottleReasonHwPowerBrakeSlowdown. Hardware power brake slowdown activated.
	ClocksThrottleReasonHwPowerBrakeSlowdown uint64 = 128
	// ClocksThrottleReasonHwSlowdown is nvmlClocksThrottleReasonHwSlowdown. Hardware slowdown activated.
	ClocksThrottleReasonHwSlowdown uint64 = 8
	// ClocksThrottleReasonHwThermalSlowdown is nvmlClocksThrottleReasonHwThermalSlowdown. Hardware thermal slowdown activated.
	ClocksThrottleReasonHwThermalSlowdown uint64 = 64
	// ClocksThrottleReasonNone is nvmlClocksThrottleReasonNone. No clock throttling.
	//
	// Deprecated: Use [ClocksEventReasonNone] instead.
	ClocksThrottleReasonNone = ClocksEventReasonNone
	// ClocksThrottleReasonSwPowerCap is nvmlClocksThrottleReasonSwPowerCap. Software power cap.
	//
	// Deprecated: Use [ClocksEventReasonSwPowerCap] instead.
	ClocksThrottleReasonSwPowerCap = ClocksEventReasonSwPowerCap
	// ClocksThrottleReasonSwThermalSlowdown is nvmlClocksThrottleReasonSwThermalSlowdown. Software thermal slowdown.
	//
	// Deprecated: Use [ClocksEventReasonSwThermalSlowdown] instead.
	ClocksThrottleReasonSwThermalSlowdown = ClocksEventReasonSwThermalSlowdown
	// ClocksThrottleReasonSyncBoost is nvmlClocksThrottleReasonSyncBoost. Sync boost.
	//
	// Deprecated: Use [ClocksEventReasonSyncBoost] instead.
	ClocksThrottleReasonSyncBoost = ClocksEventReasonSyncBoost
	// ClocksThrottleReasonUserDefinedClocks is nvmlClocksThrottleReasonUserDefinedClocks. User-defined clocks.
	//
	// Deprecated: Renamed to [ClocksThrottleReasonApplicationsClocksSetting] as the name describes the situation more accurately.
	ClocksThrottleReasonUserDefinedClocks = ClocksEventReasonApplicationsClocksSetting
	// EventMigConfigChange is nvmlEventMigConfigChange. MIG configuration change event.
	EventMigConfigChange uint64 = 256
	// EventTypeAll is nvmlEventTypeAll. Mask of all event types.
	EventTypeAll uint64 = 65439
	// EventTypeClock is nvmlEventTypeClock. Clock change event.
	EventTypeClock uint64 = 16
	// EventTypeDoubleBitEccError is nvmlEventTypeDoubleBitEccError. Double bit ECC error event.
	EventTypeDoubleBitEccError uint64 = 2
	// EventTypeDramRetirementEvent is nvmlEventTypeDramRetirementEvent. DRAM retirement event.
	EventTypeDramRetirementEvent uint64 = 1024
	// EventTypeDramRetirementFailure is nvmlEventTypeDramRetirementFailure. DRAM retirement failure event.
	EventTypeDramRetirementFailure uint64 = 2048
	// EventTypeFatalPoisonError is nvmlEventTypeFatalPoisonError. Fatal poison error event.
	EventTypeFatalPoisonError uint64 = 8192
	// EventTypeGpuRecoveryAction is nvmlEventTypeGpuRecoveryAction. GPU recovery action event.
	EventTypeGpuRecoveryAction uint64 = 32768
	// EventTypeGpuUnavailableError is nvmlEventTypeGpuUnavailableError. GPU unavailable error event.
	EventTypeGpuUnavailableError uint64 = 16384
	// EventTypeNonFatalPoisonError is nvmlEventTypeNonFatalPoisonError. Non-fatal poison error event.
	EventTypeNonFatalPoisonError uint64 = 4096
	// EventTypeNone is nvmlEventTypeNone. No event.
	EventTypeNone uint64 = 0
	// EventTypePState is nvmlEventTypePState. PState change event.
	EventTypePState uint64 = 4
	// EventTypePowerSourceChange is nvmlEventTypePowerSourceChange. Power source change event.
	EventTypePowerSourceChange uint64 = 128
	// EventTypeSingleBitEccError is nvmlEventTypeSingleBitEccError. Single bit ECC error event.
	EventTypeSingleBitEccError uint64 = 1
	// EventTypeSingleBitEccErrorStorm is nvmlEventTypeSingleBitEccErrorStorm. Single bit ECC error storm event.
	EventTypeSingleBitEccErrorStorm uint64 = 512
	// EventTypeXidCriticalError is nvmlEventTypeXidCriticalError. XID critical error event.
	EventTypeXidCriticalError uint64 = 8
	// FlagDefault is nvmlFlagDefault. Default flag.
	FlagDefault = 0
	// FlagForce is nvmlFlagForce. Force flag.
	FlagForce = 1
	// SystemEventTypeCount is nvmlSystemEventTypeCount. Number of system event types.
	SystemEventTypeCount = 2
	// SystemEventTypeGpuDriverBind is nvmlSystemEventTypeGpuDriverBind. Bitmask value of Driver Bind System Event.
	SystemEventTypeGpuDriverBind uint64 = 2
	// SystemEventTypeGpuDriverUnbind is nvmlSystemEventTypeGpuDriverUnbind. Bitmask value of Driver Unbind System Event.
	SystemEventTypeGpuDriverUnbind uint64 = 1
)
View Source
const (
	// ActiveVgpuInstanceInfoV1Version is the version stamp for nvmlActiveVgpuInstanceInfo_v1_t.
	ActiveVgpuInstanceInfoV1Version = 0x1000010
	// C2cModeInfoV1Version is the version stamp for nvmlC2cModeInfo_v1_t.
	C2cModeInfoV1Version = 0x1000004
	// ClockOffsetV1Version is the version stamp for nvmlClockOffset_v1_t.
	ClockOffsetV1Version = 0x1000018
	// ComputeInstanceProfileInfoV2Version is the version stamp for nvmlComputeInstanceProfileInfo_v2_t.
	ComputeInstanceProfileInfoV2Version = 0x2000088
	// ComputeInstanceProfileInfoV3Version is the version stamp for nvmlComputeInstanceProfileInfo_v3_t.
	ComputeInstanceProfileInfoV3Version = 0x300008c
	// CoolerInfoV1Version is the version stamp for nvmlCoolerInfo_v1_t.
	CoolerInfoV1Version = 0x1000010
	// DeviceAddressingModeV1Version is the version stamp for nvmlDeviceAddressingMode_v1_t.
	DeviceAddressingModeV1Version = 0x1000008
	// DeviceCapabilitiesV1Version is the version stamp for nvmlDeviceCapabilities_v1_t.
	DeviceCapabilitiesV1Version = 0x1000008
	// DeviceCurrentClockFreqsV1Version is the version stamp for nvmlDeviceCurrentClockFreqs_v1_t.
	DeviceCurrentClockFreqsV1Version = 0x1000804
	// DevicePerfModesV1Version is the version stamp for nvmlDevicePerfModes_v1_t.
	DevicePerfModesV1Version = 0x1000804
	// DramEncryptionInfoV1Version is the version stamp for nvmlDramEncryptionInfo_v1_t.
	DramEncryptionInfoV1Version = 0x1000008
	// EccSramErrorStatusV1Version is the version stamp for nvmlEccSramErrorStatus_v1_t.
	EccSramErrorStatusV1Version = 0x1000068
	// EccSramUniqueUncorrectedErrorCountsV1Version is the version stamp for nvmlEccSramUniqueUncorrectedErrorCounts_v1_t.
	EccSramUniqueUncorrectedErrorCountsV1Version = 0x1000010
	// FanSpeedInfoV1Version is the version stamp for nvmlFanSpeedInfo_v1_t.
	FanSpeedInfoV1Version = 0x100000c
	// GpuFabricInfoV2Version is the version stamp for nvmlGpuFabricInfo_v2_t.
	GpuFabricInfoV2Version = 0x2000024
	// GpuFabricInfoV3Version is the version stamp for nvmlGpuFabricInfo_v3_t.
	GpuFabricInfoV3Version = 0x3000028
	// GpuInstanceProfileInfoV2Version is the version stamp for nvmlGpuInstanceProfileInfo_v2_t.
	GpuInstanceProfileInfoV2Version = 0x2000098
	// GpuInstanceProfileInfoV3Version is the version stamp for nvmlGpuInstanceProfileInfo_v3_t.
	GpuInstanceProfileInfoV3Version = 0x3000098
	// MarginTemperatureV1Version is the version stamp for nvmlMarginTemperature_v1_t.
	MarginTemperatureV1Version = 0x1000008
	// MemoryV2Version is the version stamp for nvmlMemory_v2_t.
	MemoryV2Version = 0x2000028
	// NvLinkInfoV1Version is the version stamp for nvmlNvLinkInfo_v1_t.
	NvLinkInfoV1Version = 0x1000008
	// NvLinkInfoV2Version is the version stamp for nvmlNvLinkInfo_v2_t.
	NvLinkInfoV2Version = 0x200064c
	// NvlinkGetBwModeV1Version is the version stamp for nvmlNvlinkGetBwMode_v1_t.
	NvlinkGetBwModeV1Version = 0x100000c
	// NvlinkSetBwModeV1Version is the version stamp for nvmlNvlinkSetBwMode_v1_t.
	NvlinkSetBwModeV1Version = 0x100000c
	// NvlinkSupportedBwModesV1Version is the version stamp for nvmlNvlinkSupportedBwModes_v1_t.
	NvlinkSupportedBwModesV1Version = 0x100001c
	// PciInfoExtV1Version is the version stamp for nvmlPciInfoExt_v1_t.
	PciInfoExtV1Version = 0x1000040
	// PdiV1Version is the version stamp for nvmlPdi_v1_t.
	PdiV1Version = 0x1000010
	// PlatformInfoV1Version is the version stamp for nvmlPlatformInfo_v1_t.
	PlatformInfoV1Version = 0x100002c
	// PlatformInfoV2Version is the version stamp for nvmlPlatformInfo_v2_t.
	PlatformInfoV2Version = 0x200002c
	// PowerSmoothingProfileV1Version is the version stamp for nvmlPowerSmoothingProfile_v1_t.
	PowerSmoothingProfileV1Version = 0x1000018
	// PowerSmoothingStateV1Version is the version stamp for nvmlPowerSmoothingState_v1_t.
	PowerSmoothingStateV1Version = 0x1000008
	// PowerValueV2Version is the version stamp for nvmlPowerValue_v2_t.
	PowerValueV2Version = 0x200000c
	// ProcessDetailListV1Version is the version stamp for nvmlProcessDetailList_v1_t.
	ProcessDetailListV1Version = 0x1000018
	// ProcessesUtilizationInfoV1Version is the version stamp for nvmlProcessesUtilizationInfo_v1_t.
	ProcessesUtilizationInfoV1Version = 0x1000018
	// RepairStatusV1Version is the version stamp for nvmlRepairStatus_v1_t.
	RepairStatusV1Version = 0x100000c
	// RusdSettingsV1Version is the version stamp for nvmlRusdSettings_v1_t.
	RusdSettingsV1Version = 0x1000010
	// SystemConfComputeSettingsV1Version is the version stamp for nvmlSystemConfComputeSettings_v1_t.
	SystemConfComputeSettingsV1Version = 0x1000014
	// SystemConfComputeSettingsV2Version is the version stamp for nvmlSystemConfComputeSettings_v2_t.
	SystemConfComputeSettingsV2Version = 0x2000018
	// SystemDriverBranchInfoV1Version is the version stamp for nvmlSystemDriverBranchInfo_v1_t.
	SystemDriverBranchInfoV1Version = 0x1000054
	// SystemEventSetCreateRequestV1Version is the version stamp for nvmlSystemEventSetCreateRequest_v1_t.
	SystemEventSetCreateRequestV1Version = 0x1000010
	// SystemEventSetFreeRequestV1Version is the version stamp for nvmlSystemEventSetFreeRequest_v1_t.
	SystemEventSetFreeRequestV1Version = 0x1000010
	// SystemEventSetWaitRequestV1Version is the version stamp for nvmlSystemEventSetWaitRequest_v1_t.
	SystemEventSetWaitRequestV1Version = 0x1000020
	// SystemRegisterEventRequestV1Version is the version stamp for nvmlSystemRegisterEventRequest_v1_t.
	SystemRegisterEventRequestV1Version = 0x1000018
	// TemperatureV1Version is the version stamp for nvmlTemperature_v1_t.
	TemperatureV1Version = 0x100000c
	// UUIDV1Version is the version stamp for nvmlUUID_v1_t.
	UUIDV1Version = 0x1000034
	// VgpuCreatablePlacementInfoV1Version is the version stamp for nvmlVgpuCreatablePlacementInfo_v1_t.
	VgpuCreatablePlacementInfoV1Version = 0x1000020
	// VgpuHeterogeneousModeV1Version is the version stamp for nvmlVgpuHeterogeneousMode_v1_t.
	VgpuHeterogeneousModeV1Version = 0x1000008
	// VgpuInstancesUtilizationInfoV1Version is the version stamp for nvmlVgpuInstancesUtilizationInfo_v1_t.
	VgpuInstancesUtilizationInfoV1Version = 0x1000020
	// VgpuPlacementIdV1Version is the version stamp for nvmlVgpuPlacementId_v1_t.
	VgpuPlacementIdV1Version = 0x1000008
	// VgpuPlacementListV1Version is the version stamp for nvmlVgpuPlacementList_v1_t.
	VgpuPlacementListV1Version = 0x1000018
	// VgpuPlacementListV2Version is the version stamp for nvmlVgpuPlacementList_v2_t.
	VgpuPlacementListV2Version = 0x2000020
	// VgpuProcessesUtilizationInfoV1Version is the version stamp for nvmlVgpuProcessesUtilizationInfo_v1_t.
	VgpuProcessesUtilizationInfoV1Version = 0x1000018
	// VgpuRuntimeStateV1Version is the version stamp for nvmlVgpuRuntimeState_v1_t.
	VgpuRuntimeStateV1Version = 0x1000010
	// VgpuSchedulerLogInfoV1Version is the version stamp for nvmlVgpuSchedulerLogInfo_v1_t.
	VgpuSchedulerLogInfoV1Version = 0x10025a0
	// VgpuSchedulerStateInfoV1Version is the version stamp for nvmlVgpuSchedulerStateInfo_v1_t.
	VgpuSchedulerStateInfoV1Version = 0x1000018
	// VgpuSchedulerStateV1Version is the version stamp for nvmlVgpuSchedulerState_v1_t.
	VgpuSchedulerStateV1Version = 0x1000018
	// VgpuTypeBar1InfoV1Version is the version stamp for nvmlVgpuTypeBar1Info_v1_t.
	VgpuTypeBar1InfoV1Version = 0x1000010
	// VgpuTypeIdInfoV1Version is the version stamp for nvmlVgpuTypeIdInfo_v1_t.
	VgpuTypeIdInfoV1Version = 0x1000010
	// VgpuTypeMaxInstanceV1Version is the version stamp for nvmlVgpuTypeMaxInstance_v1_t.
	VgpuTypeMaxInstanceV1Version = 0x100000c
	// WorkloadPowerProfileCurrentProfilesV1Version is the version stamp for nvmlWorkloadPowerProfileCurrentProfiles_v1_t.
	WorkloadPowerProfileCurrentProfilesV1Version = 0x1000064
	// WorkloadPowerProfileInfoV1Version is the version stamp for nvmlWorkloadPowerProfileInfo_v1_t.
	WorkloadPowerProfileInfoV1Version = 0x100002c
	// WorkloadPowerProfileProfilesInfoV1Version is the version stamp for nvmlWorkloadPowerProfileProfilesInfo_v1_t.
	WorkloadPowerProfileProfilesInfoV1Version = 0x1002bf8
	// WorkloadPowerProfileRequestedProfilesV1Version is the version stamp for nvmlWorkloadPowerProfileRequestedProfiles_v1_t.
	WorkloadPowerProfileRequestedProfilesV1Version = 0x1000024
	// WorkloadPowerProfileUpdateProfilesV1Version is the version stamp for nvmlWorkloadPowerProfileUpdateProfiles_v1_t.
	WorkloadPowerProfileUpdateProfilesV1Version = 0x1000024
)

Struct version stamps. A function taking one of these structs reads its version field to tell which layout the caller compiled against, and fails if it is unset. Assign the constant before the call:

m := MemoryV2{Version: MemoryV2Version}

The values are the size of the C struct combined with its version number, so they move when the header does. They are measured by the C compiler.

Variables

This section is empty.

Functions

func BoundSymbol

func BoundSymbol(name string) string

BoundSymbol returns the symbol the loaded library bound for the C function name, loading the library first if necessary, or "" if none bound. It answers for the functions that bind the first of several symbols the library exports: BoundSymbol("nvmlDeviceGetDriverModel") returns "nvmlDeviceGetDriverModel_v2" when the library exports it, and an older spelling otherwise. It returns "" for any other name.

func Close

func Close() error

Close unloads the library and clears all bound function pointers.

The function pointers are package-level state, so Close must not be called concurrently with any other call into this package: doing so is a use-after-free. It is intended for test teardown, not for reclaiming a live library.

func DeviceDiscoverGpus

func DeviceDiscoverGpus(pciInfo *PciInfo) error

DeviceDiscoverGpus requests the OS and the NVIDIA kernel driver to rediscover a portion of the PCI subsystem looking for GPUs that were previously removed.

The portion of the PCI tree can be narrowed by specifying a domain, bus, and device. If all are zeroes then the entire PCI tree will be searched. Please note that for long-running NVML processes the enumeration will change based on how many GPUs are discovered and where they are inserted in bus order. In addition, all newly discovered GPUs will be initialized and their ECC scrubbed which may take several seconds per GPU. Also, all device handles are no longer guaranteed to be valid post discovery. Must be run as administrator. For Linux only. For Pascal or newer fully supported devices. Some Kepler devices supported.

  • pciInfo: The PCI tree to be searched. Only the domain, bus, and device fields are used in this call

A nil error means counters were successfully reset.

Errors:

Wraps nvmlDeviceDiscoverGpus.

func DeviceGetCount

func DeviceGetCount() (uint32, error)

DeviceGetCount retrieves the number of compute devices in the system.

A compute device is a single GPU. For all products.

Note: New DeviceGetCount (default in NVML 5.319) returns count of all devices in the system even if NewDeviceByIndex returns ErrNoPermission for such device. Update your code to handle this error, or use NVML 4.304 or older nvml header file. For backward binary compatibility reasons _v1 version of the API is still present in the shared library. Old _v1 version of DeviceGetCount doesn’t count devices that NVML has no permission to talk to.

  • deviceCount: Reference in which to return the number of accessible devices

A nil error means deviceCount has been set.

Errors:

Wraps nvmlDeviceGetCount, bound as nvmlDeviceGetCount_v2.

func DeviceModifyDrainState

func DeviceModifyDrainState(pciInfo *PciInfo, newState EnableState) error

DeviceModifyDrainState modifies the drain state of a GPU.

This method forces a GPU to no longer accept new incoming requests. Any new NVML process will no longer see this GPU. Persistence mode for this GPU must be turned off before this call is made. Must be called as administrator. For Linux only. For Pascal or newer fully supported devices. Some Kepler devices supported.

  • pciInfo: The PCI address of the GPU drain state to be modified
  • newState: The drain state that should be entered, see EnableState

A nil error means counters were successfully reset.

Errors:

Wraps nvmlDeviceModifyDrainState.

func DeviceQueryDrainState

func DeviceQueryDrainState(pciInfo *PciInfo, currentState *EnableState) error

DeviceQueryDrainState queries the drain state of a GPU.

This method is used to check if a GPU is in a currently draining state. For Linux only. For Pascal or newer fully supported devices. Some Kepler devices supported.

  • pciInfo: The PCI address of the GPU drain state to be queried
  • currentState: The current drain state for this GPU, see EnableState

A nil error means counters were successfully reset.

Errors:

Wraps nvmlDeviceQueryDrainState.

func DeviceRemoveGpu

func DeviceRemoveGpu(pciInfo *PciInfo, gpuState DetachGpuState, linkState PcieLinkState) error

DeviceRemoveGpu will remove the specified GPU from the view of both NVML and the NVIDIA kernel driver as long as no other processes are attached.

If other processes are attached, this call will return ErrInUse and the GPU will be returned to its original “draining” state. Note: the only situation where a process can still be attached after DeviceModifyDrainState is called to initiate the draining state is if that process was using, and is still using, a GPU before the call was made. Also note, persistence mode counts as an attachment to the GPU thus it must be disabled prior to this call. For long-running NVML processes please note that this will change the enumeration of current GPUs. For example, if there are four GPUs present and GPU1 is removed, the new enumeration will be 0-2. Also, device handles after the removed GPU will not be valid and must be re-established. Must be run as administrator. For Linux only. For Pascal or newer fully supported devices. Some Kepler devices supported.

  • pciInfo: The PCI address of the GPU to be removed
  • gpuState: Whether the GPU is to be removed, from the OS see DetachGpuState
  • linkState: Requested upstream PCIe link state, see PcieLinkState

A nil error means counters were successfully reset.

Errors:

  • ErrInvalidArgument: if nvmlIndex is invalid
  • ErrInUse: if the device is still in use and cannot be removed previousDrain State definitions nextEncoder Structs
  • ErrNotSupported: if the device doesn’t support this feature
  • ErrUninitialized: if the library has not been successfully initialized

Wraps nvmlDeviceRemoveGpu, bound as nvmlDeviceRemoveGpu_v2.

func GetExcludedDeviceCount

func GetExcludedDeviceCount() (uint32, error)

GetExcludedDeviceCount retrieves the number of excluded GPU devices in the system.

For all products.

  • deviceCount: Reference in which to return the number of excluded devices

A nil error means deviceCount has been set.

Errors:

Wraps nvmlGetExcludedDeviceCount.

func GetVgpuCompatibility

func GetVgpuCompatibility(vgpuMetadata *VgpuMetadata, pgpuMetadata *VgpuPgpuMetadata, compatibilityInfo *VgpuPgpuCompatibility) error

GetVgpuCompatibility takes a vGPU instance metadata structure read from VgpuInstance.Metadata, and a vGPU metadata structure for a physical GPU read from Device.VgpuMetadata, and returns compatibility information of the vGPU instance and the physical GPU.

The caller passes in a buffer via compatibilityInfo, into which a compatibility information structure is written. The structure defines the states in which the vGPU / VM may be booted on the physical GPU. If the vGPU / VM compatibility with the physical GPU is limited, a limit code indicates the factor limiting compatability. (see VgpuPgpuCompatibilityLimitCode for details).

Note: vGPU compatibility does not take into account dynamic capacity conditions that may limit a system’s ability to boot a given vGPU or associated VM.

  • vgpuMetadata: Pointer to caller-supplied vGPU metadata structure
  • pgpuMetadata: Pointer to caller-supplied GPU metadata structure
  • compatibilityInfo: Pointer to caller-supplied buffer to hold compatibility info

A nil error means vGPU metadata structure was successfully returned.

Errors:

Wraps nvmlGetVgpuCompatibility.

func GetVgpuDriverCapabilities

func GetVgpuDriverCapabilities(capability VgpuDriverCapability) (uint32, error)

GetVgpuDriverCapabilities retrieves the requested vGPU driver capability.

Refer to the VgpuDriverCapability structure for the specific capabilities that can be queried. The return value should be treated as a boolean, with a non-zero value indicating that the capability is supported. For Maxwell or newer fully supported devices.

  • capability: Specifies the VgpuDriverCapability to be queried
  • capResult: A boolean for the queried capability indicating that feature is supported

Errors:

Wraps nvmlGetVgpuDriverCapabilities.

func GetVgpuVersion

func GetVgpuVersion(supported *VgpuVersion, current *VgpuVersion) error

GetVgpuVersion queries the ranges of supported vGPU versions.

This function gets the linear range of supported vGPU versions that is preset for the NVIDIA vGPU Manager and the range set by an administrator. If the preset range has not been overridden by SetVgpuVersion, both ranges are the same. The caller passes pointers to the following VgpuVersion structures, into which the NVIDIA vGPU Manager writes the ranges:

  • supported structure that represents the preset range of vGPU versions supported by the NVIDIA vGPU Manager.
  • current structure that represents the range of supported vGPU versions set by an administrator. By default, this range is the same as the preset range.

Parameters:

  • supported: Pointer to the structure in which the preset range of vGPU versions supported by the NVIDIA vGPU Manager is written
  • current: Pointer to the structure in which the range of supported vGPU versions set by an administrator is written

A nil error means the vGPU version range structures were successfully obtained.

Errors:

Wraps nvmlGetVgpuVersion.

func GpmMetricsGet

func GpmMetricsGet(metricsGet *GpmMetricsGetParams) error

GpmMetricsGet calculates GPM metrics from two samples.

For Hopper or newer fully supported devices. To retrieve metrics, the user must first allocate the two sample buffers at metricsGet->sample1 and metricsGet->sample2 by calling NewGpmSample. Next, the user should fill in the ID of each metric in metricsGet->metrics[i].metricId and specify the total number of metrics to retrieve in metricsGet->numMetrics, The version should be set to GpmMetricsGetVersion in metricsGet->version. The user then calls the GpmSample.Get API twice to obtain 2 samples of counters.

Note: The interval between these two GpmSample.Get calls should be greater than 100ms due to the internal sample refresh rate. Finally, the user calls GpmMetricsGet to retrieve the metrics, which will be stored at metricsGet->metrics

Wraps nvmlGpmMetricsGet.

func Has

func Has(symbol string) bool

Has reports whether the named C symbol resolved in the loaded library, loading it first if necessary. It returns false if the library failed to load. Use it to gate on capabilities before calling into them.

func HasComputeInstanceDestroy

func HasComputeInstanceDestroy() bool

HasComputeInstanceDestroy reports whether nvmlComputeInstanceDestroy resolved in the loaded library.

func HasComputeInstanceGetInfo

func HasComputeInstanceGetInfo() bool

HasComputeInstanceGetInfo reports whether nvmlComputeInstanceGetInfo_v2 resolved in the loaded library.

func HasDeviceClearAccountingPids

func HasDeviceClearAccountingPids() bool

HasDeviceClearAccountingPids reports whether nvmlDeviceClearAccountingPids resolved in the loaded library.

func HasDeviceClearCpuAffinity

func HasDeviceClearCpuAffinity() bool

HasDeviceClearCpuAffinity reports whether nvmlDeviceClearCpuAffinity resolved in the loaded library.

func HasDeviceClearEccErrorCounts

func HasDeviceClearEccErrorCounts() bool

HasDeviceClearEccErrorCounts reports whether nvmlDeviceClearEccErrorCounts resolved in the loaded library.

func HasDeviceClearFieldValues

func HasDeviceClearFieldValues() bool

HasDeviceClearFieldValues reports whether nvmlDeviceClearFieldValues resolved in the loaded library.

func HasDeviceCreateGpuInstance

func HasDeviceCreateGpuInstance() bool

HasDeviceCreateGpuInstance reports whether nvmlDeviceCreateGpuInstance resolved in the loaded library.

func HasDeviceCreateGpuInstanceWithPlacement

func HasDeviceCreateGpuInstanceWithPlacement() bool

HasDeviceCreateGpuInstanceWithPlacement reports whether nvmlDeviceCreateGpuInstanceWithPlacement resolved in the loaded library.

func HasDeviceDiscoverGpus

func HasDeviceDiscoverGpus() bool

HasDeviceDiscoverGpus reports whether nvmlDeviceDiscoverGpus resolved in the loaded library.

func HasDeviceFreezeNvLinkUtilizationCounter

func HasDeviceFreezeNvLinkUtilizationCounter() bool

HasDeviceFreezeNvLinkUtilizationCounter reports whether nvmlDeviceFreezeNvLinkUtilizationCounter resolved in the loaded library.

func HasDeviceGetAPIRestriction

func HasDeviceGetAPIRestriction() bool

HasDeviceGetAPIRestriction reports whether nvmlDeviceGetAPIRestriction resolved in the loaded library.

func HasDeviceGetAccountingBufferSize

func HasDeviceGetAccountingBufferSize() bool

HasDeviceGetAccountingBufferSize reports whether nvmlDeviceGetAccountingBufferSize resolved in the loaded library.

func HasDeviceGetAccountingMode

func HasDeviceGetAccountingMode() bool

HasDeviceGetAccountingMode reports whether nvmlDeviceGetAccountingMode resolved in the loaded library.

func HasDeviceGetAccountingPids

func HasDeviceGetAccountingPids() bool

HasDeviceGetAccountingPids reports whether nvmlDeviceGetAccountingPids resolved in the loaded library.

func HasDeviceGetAccountingStats

func HasDeviceGetAccountingStats() bool

HasDeviceGetAccountingStats reports whether nvmlDeviceGetAccountingStats resolved in the loaded library.

func HasDeviceGetAccountingStatsV1

func HasDeviceGetAccountingStatsV1() bool

HasDeviceGetAccountingStatsV1 reports whether nvmlDeviceGetAccountingStats resolved in the loaded library.

func HasDeviceGetAccountingStatsV2

func HasDeviceGetAccountingStatsV2() bool

HasDeviceGetAccountingStatsV2 reports whether nvmlDeviceGetAccountingStats_v2 resolved in the loaded library.

func HasDeviceGetActiveVgpus

func HasDeviceGetActiveVgpus() bool

HasDeviceGetActiveVgpus reports whether nvmlDeviceGetActiveVgpus resolved in the loaded library.

func HasDeviceGetAdaptiveClockInfoStatus

func HasDeviceGetAdaptiveClockInfoStatus() bool

HasDeviceGetAdaptiveClockInfoStatus reports whether nvmlDeviceGetAdaptiveClockInfoStatus resolved in the loaded library.

func HasDeviceGetAdaptiveTgpModeInfo

func HasDeviceGetAdaptiveTgpModeInfo() bool

HasDeviceGetAdaptiveTgpModeInfo reports whether nvmlDeviceGetAdaptiveTgpModeInfo_v1 resolved in the loaded library.

func HasDeviceGetAddressingMode

func HasDeviceGetAddressingMode() bool

HasDeviceGetAddressingMode reports whether nvmlDeviceGetAddressingMode resolved in the loaded library.

func HasDeviceGetApplicationsClock

func HasDeviceGetApplicationsClock() bool

HasDeviceGetApplicationsClock reports whether nvmlDeviceGetApplicationsClock resolved in the loaded library.

func HasDeviceGetArchitecture

func HasDeviceGetArchitecture() bool

HasDeviceGetArchitecture reports whether nvmlDeviceGetArchitecture resolved in the loaded library.

func HasDeviceGetAttributes

func HasDeviceGetAttributes() bool

HasDeviceGetAttributes reports whether nvmlDeviceGetAttributes_v2 resolved in the loaded library.

func HasDeviceGetAutoBoostedClocksEnabled

func HasDeviceGetAutoBoostedClocksEnabled() bool

HasDeviceGetAutoBoostedClocksEnabled reports whether nvmlDeviceGetAutoBoostedClocksEnabled resolved in the loaded library.

func HasDeviceGetBAR1MemoryInfo

func HasDeviceGetBAR1MemoryInfo() bool

HasDeviceGetBAR1MemoryInfo reports whether nvmlDeviceGetBAR1MemoryInfo resolved in the loaded library.

func HasDeviceGetBBXTimeData

func HasDeviceGetBBXTimeData() bool

HasDeviceGetBBXTimeData reports whether nvmlDeviceGetBBXTimeData_v1 resolved in the loaded library.

func HasDeviceGetBankRemapperStatus

func HasDeviceGetBankRemapperStatus() bool

HasDeviceGetBankRemapperStatus reports whether nvmlDeviceGetBankRemapperStatus_v1 resolved in the loaded library.

func HasDeviceGetBoardId

func HasDeviceGetBoardId() bool

HasDeviceGetBoardId reports whether nvmlDeviceGetBoardId resolved in the loaded library.

func HasDeviceGetBoardPartNumber

func HasDeviceGetBoardPartNumber() bool

HasDeviceGetBoardPartNumber reports whether nvmlDeviceGetBoardPartNumber resolved in the loaded library.

func HasDeviceGetBrand

func HasDeviceGetBrand() bool

HasDeviceGetBrand reports whether nvmlDeviceGetBrand resolved in the loaded library.

func HasDeviceGetBridgeChipInfo

func HasDeviceGetBridgeChipInfo() bool

HasDeviceGetBridgeChipInfo reports whether nvmlDeviceGetBridgeChipInfo resolved in the loaded library.

func HasDeviceGetBusType

func HasDeviceGetBusType() bool

HasDeviceGetBusType reports whether nvmlDeviceGetBusType resolved in the loaded library.

func HasDeviceGetC2cModeInfoV

func HasDeviceGetC2cModeInfoV() bool

HasDeviceGetC2cModeInfoV reports whether nvmlDeviceGetC2cModeInfoV resolved in the loaded library.

func HasDeviceGetCapabilities

func HasDeviceGetCapabilities() bool

HasDeviceGetCapabilities reports whether nvmlDeviceGetCapabilities resolved in the loaded library.

func HasDeviceGetClkMonStatus

func HasDeviceGetClkMonStatus() bool

HasDeviceGetClkMonStatus reports whether nvmlDeviceGetClkMonStatus resolved in the loaded library.

func HasDeviceGetClock

func HasDeviceGetClock() bool

HasDeviceGetClock reports whether nvmlDeviceGetClock resolved in the loaded library.

func HasDeviceGetClockInfo

func HasDeviceGetClockInfo() bool

HasDeviceGetClockInfo reports whether nvmlDeviceGetClockInfo resolved in the loaded library.

func HasDeviceGetClockOffsets

func HasDeviceGetClockOffsets() bool

HasDeviceGetClockOffsets reports whether nvmlDeviceGetClockOffsets resolved in the loaded library.

func HasDeviceGetComputeInstanceId

func HasDeviceGetComputeInstanceId() bool

HasDeviceGetComputeInstanceId reports whether nvmlDeviceGetComputeInstanceId resolved in the loaded library.

func HasDeviceGetComputeMode

func HasDeviceGetComputeMode() bool

HasDeviceGetComputeMode reports whether nvmlDeviceGetComputeMode resolved in the loaded library.

func HasDeviceGetComputeRunningProcesses

func HasDeviceGetComputeRunningProcesses() bool

HasDeviceGetComputeRunningProcesses reports whether nvmlDeviceGetComputeRunningProcesses_v3 resolved in the loaded library.

func HasDeviceGetConfComputeGpuAttestationReport

func HasDeviceGetConfComputeGpuAttestationReport() bool

HasDeviceGetConfComputeGpuAttestationReport reports whether nvmlDeviceGetConfComputeGpuAttestationReport resolved in the loaded library.

func HasDeviceGetConfComputeGpuCertificate

func HasDeviceGetConfComputeGpuCertificate() bool

HasDeviceGetConfComputeGpuCertificate reports whether nvmlDeviceGetConfComputeGpuCertificate resolved in the loaded library.

func HasDeviceGetConfComputeMemSizeInfo

func HasDeviceGetConfComputeMemSizeInfo() bool

HasDeviceGetConfComputeMemSizeInfo reports whether nvmlDeviceGetConfComputeMemSizeInfo resolved in the loaded library.

func HasDeviceGetConfComputeProtectedMemoryUsage

func HasDeviceGetConfComputeProtectedMemoryUsage() bool

HasDeviceGetConfComputeProtectedMemoryUsage reports whether nvmlDeviceGetConfComputeProtectedMemoryUsage resolved in the loaded library.

func HasDeviceGetCoolerInfo

func HasDeviceGetCoolerInfo() bool

HasDeviceGetCoolerInfo reports whether nvmlDeviceGetCoolerInfo resolved in the loaded library.

func HasDeviceGetCount

func HasDeviceGetCount() bool

HasDeviceGetCount reports whether nvmlDeviceGetCount_v2 resolved in the loaded library.

func HasDeviceGetCpuAffinity

func HasDeviceGetCpuAffinity() bool

HasDeviceGetCpuAffinity reports whether nvmlDeviceGetCpuAffinity resolved in the loaded library.

func HasDeviceGetCpuAffinityWithinScope

func HasDeviceGetCpuAffinityWithinScope() bool

HasDeviceGetCpuAffinityWithinScope reports whether nvmlDeviceGetCpuAffinityWithinScope resolved in the loaded library.

func HasDeviceGetCreatableVgpus

func HasDeviceGetCreatableVgpus() bool

HasDeviceGetCreatableVgpus reports whether nvmlDeviceGetCreatableVgpus resolved in the loaded library.

func HasDeviceGetCudaComputeCapability

func HasDeviceGetCudaComputeCapability() bool

HasDeviceGetCudaComputeCapability reports whether nvmlDeviceGetCudaComputeCapability resolved in the loaded library.

func HasDeviceGetCurrPcieLinkGeneration

func HasDeviceGetCurrPcieLinkGeneration() bool

HasDeviceGetCurrPcieLinkGeneration reports whether nvmlDeviceGetCurrPcieLinkGeneration resolved in the loaded library.

func HasDeviceGetCurrPcieLinkWidth

func HasDeviceGetCurrPcieLinkWidth() bool

HasDeviceGetCurrPcieLinkWidth reports whether nvmlDeviceGetCurrPcieLinkWidth resolved in the loaded library.

func HasDeviceGetCurrentClockFreqs

func HasDeviceGetCurrentClockFreqs() bool

HasDeviceGetCurrentClockFreqs reports whether nvmlDeviceGetCurrentClockFreqs resolved in the loaded library.

func HasDeviceGetCurrentClocksEventReasons

func HasDeviceGetCurrentClocksEventReasons() bool

HasDeviceGetCurrentClocksEventReasons reports whether nvmlDeviceGetCurrentClocksEventReasons resolved in the loaded library.

func HasDeviceGetCurrentClocksThrottleReasons

func HasDeviceGetCurrentClocksThrottleReasons() bool

HasDeviceGetCurrentClocksThrottleReasons reports whether nvmlDeviceGetCurrentClocksThrottleReasons resolved in the loaded library.

func HasDeviceGetDecoderUtilization

func HasDeviceGetDecoderUtilization() bool

HasDeviceGetDecoderUtilization reports whether nvmlDeviceGetDecoderUtilization resolved in the loaded library.

func HasDeviceGetDefaultApplicationsClock

func HasDeviceGetDefaultApplicationsClock() bool

HasDeviceGetDefaultApplicationsClock reports whether nvmlDeviceGetDefaultApplicationsClock resolved in the loaded library.

func HasDeviceGetDefaultEccMode

func HasDeviceGetDefaultEccMode() bool

HasDeviceGetDefaultEccMode reports whether nvmlDeviceGetDefaultEccMode resolved in the loaded library.

func HasDeviceGetDetailedEccErrors

func HasDeviceGetDetailedEccErrors() bool

HasDeviceGetDetailedEccErrors reports whether nvmlDeviceGetDetailedEccErrors resolved in the loaded library.

func HasDeviceGetDeviceHandleFromMigDeviceHandle

func HasDeviceGetDeviceHandleFromMigDeviceHandle() bool

HasDeviceGetDeviceHandleFromMigDeviceHandle reports whether nvmlDeviceGetDeviceHandleFromMigDeviceHandle resolved in the loaded library.

func HasDeviceGetDisplayActive

func HasDeviceGetDisplayActive() bool

HasDeviceGetDisplayActive reports whether nvmlDeviceGetDisplayActive resolved in the loaded library.

func HasDeviceGetDisplayMode

func HasDeviceGetDisplayMode() bool

HasDeviceGetDisplayMode reports whether nvmlDeviceGetDisplayMode resolved in the loaded library.

func HasDeviceGetDramEncryptionMode

func HasDeviceGetDramEncryptionMode() bool

HasDeviceGetDramEncryptionMode reports whether nvmlDeviceGetDramEncryptionMode resolved in the loaded library.

func HasDeviceGetDriverModel

func HasDeviceGetDriverModel() bool

HasDeviceGetDriverModel reports whether nvmlDeviceGetDriverModel resolved in the loaded library.

It resolves as the first of nvmlDeviceGetDriverModel_v2, nvmlDeviceGetDriverModel that the library exports. BoundSymbol reports which.

func HasDeviceGetDriverModelV1

func HasDeviceGetDriverModelV1() bool

HasDeviceGetDriverModelV1 reports whether nvmlDeviceGetDriverModel resolved in the loaded library.

func HasDeviceGetDriverModelV2

func HasDeviceGetDriverModelV2() bool

HasDeviceGetDriverModelV2 reports whether nvmlDeviceGetDriverModel_v2 resolved in the loaded library.

func HasDeviceGetDynamicPstatesInfo

func HasDeviceGetDynamicPstatesInfo() bool

HasDeviceGetDynamicPstatesInfo reports whether nvmlDeviceGetDynamicPstatesInfo resolved in the loaded library.

func HasDeviceGetEccMode

func HasDeviceGetEccMode() bool

HasDeviceGetEccMode reports whether nvmlDeviceGetEccMode resolved in the loaded library.

func HasDeviceGetEncoderCapacity

func HasDeviceGetEncoderCapacity() bool

HasDeviceGetEncoderCapacity reports whether nvmlDeviceGetEncoderCapacity resolved in the loaded library.

func HasDeviceGetEncoderSessions

func HasDeviceGetEncoderSessions() bool

HasDeviceGetEncoderSessions reports whether nvmlDeviceGetEncoderSessions resolved in the loaded library.

func HasDeviceGetEncoderStats

func HasDeviceGetEncoderStats() bool

HasDeviceGetEncoderStats reports whether nvmlDeviceGetEncoderStats resolved in the loaded library.

func HasDeviceGetEncoderUtilization

func HasDeviceGetEncoderUtilization() bool

HasDeviceGetEncoderUtilization reports whether nvmlDeviceGetEncoderUtilization resolved in the loaded library.

func HasDeviceGetEnforcedPowerLimit

func HasDeviceGetEnforcedPowerLimit() bool

HasDeviceGetEnforcedPowerLimit reports whether nvmlDeviceGetEnforcedPowerLimit resolved in the loaded library.

func HasDeviceGetFBCSessions

func HasDeviceGetFBCSessions() bool

HasDeviceGetFBCSessions reports whether nvmlDeviceGetFBCSessions resolved in the loaded library.

func HasDeviceGetFBCStats

func HasDeviceGetFBCStats() bool

HasDeviceGetFBCStats reports whether nvmlDeviceGetFBCStats resolved in the loaded library.

func HasDeviceGetFanControlPolicy

func HasDeviceGetFanControlPolicy() bool

HasDeviceGetFanControlPolicy reports whether nvmlDeviceGetFanControlPolicy_v2 resolved in the loaded library.

func HasDeviceGetFanSpeed

func HasDeviceGetFanSpeed() bool

HasDeviceGetFanSpeed reports whether nvmlDeviceGetFanSpeed resolved in the loaded library.

func HasDeviceGetFanSpeedRPM

func HasDeviceGetFanSpeedRPM() bool

HasDeviceGetFanSpeedRPM reports whether nvmlDeviceGetFanSpeedRPM resolved in the loaded library.

func HasDeviceGetFanSpeedV1

func HasDeviceGetFanSpeedV1() bool

HasDeviceGetFanSpeedV1 reports whether nvmlDeviceGetFanSpeed resolved in the loaded library.

func HasDeviceGetFanSpeedV2

func HasDeviceGetFanSpeedV2() bool

HasDeviceGetFanSpeedV2 reports whether nvmlDeviceGetFanSpeed_v2 resolved in the loaded library.

func HasDeviceGetFieldValues

func HasDeviceGetFieldValues() bool

HasDeviceGetFieldValues reports whether nvmlDeviceGetFieldValues resolved in the loaded library.

func HasDeviceGetGpcClkMinMaxVfOffset

func HasDeviceGetGpcClkMinMaxVfOffset() bool

HasDeviceGetGpcClkMinMaxVfOffset reports whether nvmlDeviceGetGpcClkMinMaxVfOffset resolved in the loaded library.

func HasDeviceGetGpcClkVfOffset

func HasDeviceGetGpcClkVfOffset() bool

HasDeviceGetGpcClkVfOffset reports whether nvmlDeviceGetGpcClkVfOffset resolved in the loaded library.

func HasDeviceGetGpuFabricInfo

func HasDeviceGetGpuFabricInfo() bool

HasDeviceGetGpuFabricInfo reports whether nvmlDeviceGetGpuFabricInfo resolved in the loaded library.

func HasDeviceGetGpuFabricInfoV

func HasDeviceGetGpuFabricInfoV() bool

HasDeviceGetGpuFabricInfoV reports whether nvmlDeviceGetGpuFabricInfoV resolved in the loaded library.

func HasDeviceGetGpuFabricInfoV1

func HasDeviceGetGpuFabricInfoV1() bool

HasDeviceGetGpuFabricInfoV1 reports whether nvmlDeviceGetGpuFabricInfo resolved in the loaded library.

func HasDeviceGetGpuFabricInfoV4

func HasDeviceGetGpuFabricInfoV4() bool

HasDeviceGetGpuFabricInfoV4 reports whether nvmlDeviceGetGpuFabricInfo_v4 resolved in the loaded library.

func HasDeviceGetGpuInstanceById

func HasDeviceGetGpuInstanceById() bool

HasDeviceGetGpuInstanceById reports whether nvmlDeviceGetGpuInstanceById resolved in the loaded library.

func HasDeviceGetGpuInstanceId

func HasDeviceGetGpuInstanceId() bool

HasDeviceGetGpuInstanceId reports whether nvmlDeviceGetGpuInstanceId resolved in the loaded library.

func HasDeviceGetGpuInstancePossiblePlacements

func HasDeviceGetGpuInstancePossiblePlacements() bool

HasDeviceGetGpuInstancePossiblePlacements reports whether nvmlDeviceGetGpuInstancePossiblePlacements_v2 resolved in the loaded library.

func HasDeviceGetGpuInstanceProfileInfo

func HasDeviceGetGpuInstanceProfileInfo() bool

HasDeviceGetGpuInstanceProfileInfo reports whether nvmlDeviceGetGpuInstanceProfileInfo resolved in the loaded library.

func HasDeviceGetGpuInstanceProfileInfoByIdV

func HasDeviceGetGpuInstanceProfileInfoByIdV() bool

HasDeviceGetGpuInstanceProfileInfoByIdV reports whether nvmlDeviceGetGpuInstanceProfileInfoByIdV resolved in the loaded library.

func HasDeviceGetGpuInstanceProfileInfoV

func HasDeviceGetGpuInstanceProfileInfoV() bool

HasDeviceGetGpuInstanceProfileInfoV reports whether nvmlDeviceGetGpuInstanceProfileInfoV resolved in the loaded library.

func HasDeviceGetGpuInstanceRemainingCapacity

func HasDeviceGetGpuInstanceRemainingCapacity() bool

HasDeviceGetGpuInstanceRemainingCapacity reports whether nvmlDeviceGetGpuInstanceRemainingCapacity resolved in the loaded library.

func HasDeviceGetGpuInstances

func HasDeviceGetGpuInstances() bool

HasDeviceGetGpuInstances reports whether nvmlDeviceGetGpuInstances resolved in the loaded library.

func HasDeviceGetGpuMaxPcieLinkGeneration

func HasDeviceGetGpuMaxPcieLinkGeneration() bool

HasDeviceGetGpuMaxPcieLinkGeneration reports whether nvmlDeviceGetGpuMaxPcieLinkGeneration resolved in the loaded library.

func HasDeviceGetGpuOperationMode

func HasDeviceGetGpuOperationMode() bool

HasDeviceGetGpuOperationMode reports whether nvmlDeviceGetGpuOperationMode resolved in the loaded library.

func HasDeviceGetGpuUptime

func HasDeviceGetGpuUptime() bool

HasDeviceGetGpuUptime reports whether nvmlDeviceGetGpuUptime_v1 resolved in the loaded library.

func HasDeviceGetGraphicsRunningProcesses

func HasDeviceGetGraphicsRunningProcesses() bool

HasDeviceGetGraphicsRunningProcesses reports whether nvmlDeviceGetGraphicsRunningProcesses_v3 resolved in the loaded library.

func HasDeviceGetGridLicensableFeatures

func HasDeviceGetGridLicensableFeatures() bool

HasDeviceGetGridLicensableFeatures reports whether nvmlDeviceGetGridLicensableFeatures_v4 resolved in the loaded library.

func HasDeviceGetGspFirmwareMode

func HasDeviceGetGspFirmwareMode() bool

HasDeviceGetGspFirmwareMode reports whether nvmlDeviceGetGspFirmwareMode resolved in the loaded library.

func HasDeviceGetGspFirmwareVersion

func HasDeviceGetGspFirmwareVersion() bool

HasDeviceGetGspFirmwareVersion reports whether nvmlDeviceGetGspFirmwareVersion resolved in the loaded library.

func HasDeviceGetHandleByIndex

func HasDeviceGetHandleByIndex() bool

HasDeviceGetHandleByIndex reports whether nvmlDeviceGetHandleByIndex_v2 resolved in the loaded library.

func HasDeviceGetHandleByPciBusId

func HasDeviceGetHandleByPciBusId() bool

HasDeviceGetHandleByPciBusId reports whether nvmlDeviceGetHandleByPciBusId_v2 resolved in the loaded library.

func HasDeviceGetHandleBySerial

func HasDeviceGetHandleBySerial() bool

HasDeviceGetHandleBySerial reports whether nvmlDeviceGetHandleBySerial resolved in the loaded library.

func HasDeviceGetHandleByUUID

func HasDeviceGetHandleByUUID() bool

HasDeviceGetHandleByUUID reports whether nvmlDeviceGetHandleByUUID resolved in the loaded library.

func HasDeviceGetHandleByUUIDV

func HasDeviceGetHandleByUUIDV() bool

HasDeviceGetHandleByUUIDV reports whether nvmlDeviceGetHandleByUUIDV resolved in the loaded library.

func HasDeviceGetHostVgpuMode

func HasDeviceGetHostVgpuMode() bool

HasDeviceGetHostVgpuMode reports whether nvmlDeviceGetHostVgpuMode resolved in the loaded library.

func HasDeviceGetHostname

func HasDeviceGetHostname() bool

HasDeviceGetHostname reports whether nvmlDeviceGetHostname_v1 resolved in the loaded library.

func HasDeviceGetIndex

func HasDeviceGetIndex() bool

HasDeviceGetIndex reports whether nvmlDeviceGetIndex resolved in the loaded library.

func HasDeviceGetInforomConfigurationChecksum

func HasDeviceGetInforomConfigurationChecksum() bool

HasDeviceGetInforomConfigurationChecksum reports whether nvmlDeviceGetInforomConfigurationChecksum resolved in the loaded library.

func HasDeviceGetInforomImageVersion

func HasDeviceGetInforomImageVersion() bool

HasDeviceGetInforomImageVersion reports whether nvmlDeviceGetInforomImageVersion resolved in the loaded library.

func HasDeviceGetInforomVersion

func HasDeviceGetInforomVersion() bool

HasDeviceGetInforomVersion reports whether nvmlDeviceGetInforomVersion resolved in the loaded library.

func HasDeviceGetIrqNum

func HasDeviceGetIrqNum() bool

HasDeviceGetIrqNum reports whether nvmlDeviceGetIrqNum resolved in the loaded library.

func HasDeviceGetJpgUtilization

func HasDeviceGetJpgUtilization() bool

HasDeviceGetJpgUtilization reports whether nvmlDeviceGetJpgUtilization resolved in the loaded library.

func HasDeviceGetLastBBXFlushTime

func HasDeviceGetLastBBXFlushTime() bool

HasDeviceGetLastBBXFlushTime reports whether nvmlDeviceGetLastBBXFlushTime resolved in the loaded library.

func HasDeviceGetMPSComputeRunningProcesses

func HasDeviceGetMPSComputeRunningProcesses() bool

HasDeviceGetMPSComputeRunningProcesses reports whether nvmlDeviceGetMPSComputeRunningProcesses_v3 resolved in the loaded library.

func HasDeviceGetMarginTemperature

func HasDeviceGetMarginTemperature() bool

HasDeviceGetMarginTemperature reports whether nvmlDeviceGetMarginTemperature resolved in the loaded library.

func HasDeviceGetMaxClockInfo

func HasDeviceGetMaxClockInfo() bool

HasDeviceGetMaxClockInfo reports whether nvmlDeviceGetMaxClockInfo resolved in the loaded library.

func HasDeviceGetMaxCustomerBoostClock

func HasDeviceGetMaxCustomerBoostClock() bool

HasDeviceGetMaxCustomerBoostClock reports whether nvmlDeviceGetMaxCustomerBoostClock resolved in the loaded library.

func HasDeviceGetMaxMigDeviceCount

func HasDeviceGetMaxMigDeviceCount() bool

HasDeviceGetMaxMigDeviceCount reports whether nvmlDeviceGetMaxMigDeviceCount resolved in the loaded library.

func HasDeviceGetMaxPcieLinkGeneration

func HasDeviceGetMaxPcieLinkGeneration() bool

HasDeviceGetMaxPcieLinkGeneration reports whether nvmlDeviceGetMaxPcieLinkGeneration resolved in the loaded library.

func HasDeviceGetMaxPcieLinkWidth

func HasDeviceGetMaxPcieLinkWidth() bool

HasDeviceGetMaxPcieLinkWidth reports whether nvmlDeviceGetMaxPcieLinkWidth resolved in the loaded library.

func HasDeviceGetMemClkMinMaxVfOffset

func HasDeviceGetMemClkMinMaxVfOffset() bool

HasDeviceGetMemClkMinMaxVfOffset reports whether nvmlDeviceGetMemClkMinMaxVfOffset resolved in the loaded library.

func HasDeviceGetMemClkVfOffset

func HasDeviceGetMemClkVfOffset() bool

HasDeviceGetMemClkVfOffset reports whether nvmlDeviceGetMemClkVfOffset resolved in the loaded library.

func HasDeviceGetMemoryAffinity

func HasDeviceGetMemoryAffinity() bool

HasDeviceGetMemoryAffinity reports whether nvmlDeviceGetMemoryAffinity resolved in the loaded library.

func HasDeviceGetMemoryBusWidth

func HasDeviceGetMemoryBusWidth() bool

HasDeviceGetMemoryBusWidth reports whether nvmlDeviceGetMemoryBusWidth resolved in the loaded library.

func HasDeviceGetMemoryErrorCounter

func HasDeviceGetMemoryErrorCounter() bool

HasDeviceGetMemoryErrorCounter reports whether nvmlDeviceGetMemoryErrorCounter resolved in the loaded library.

func HasDeviceGetMemoryInfo

func HasDeviceGetMemoryInfo() bool

HasDeviceGetMemoryInfo reports whether nvmlDeviceGetMemoryInfo resolved in the loaded library.

func HasDeviceGetMemoryInfoV1

func HasDeviceGetMemoryInfoV1() bool

HasDeviceGetMemoryInfoV1 reports whether nvmlDeviceGetMemoryInfo resolved in the loaded library.

func HasDeviceGetMemoryInfoV2

func HasDeviceGetMemoryInfoV2() bool

HasDeviceGetMemoryInfoV2 reports whether nvmlDeviceGetMemoryInfo_v2 resolved in the loaded library.

func HasDeviceGetMemoryLimits

func HasDeviceGetMemoryLimits() bool

HasDeviceGetMemoryLimits reports whether nvmlDeviceGetMemoryLimits_v1 resolved in the loaded library.

func HasDeviceGetMigDeviceHandleByIndex

func HasDeviceGetMigDeviceHandleByIndex() bool

HasDeviceGetMigDeviceHandleByIndex reports whether nvmlDeviceGetMigDeviceHandleByIndex resolved in the loaded library.

func HasDeviceGetMigMode

func HasDeviceGetMigMode() bool

HasDeviceGetMigMode reports whether nvmlDeviceGetMigMode resolved in the loaded library.

func HasDeviceGetMinMaxClockOfPState

func HasDeviceGetMinMaxClockOfPState() bool

HasDeviceGetMinMaxClockOfPState reports whether nvmlDeviceGetMinMaxClockOfPState resolved in the loaded library.

func HasDeviceGetMinMaxFanSpeed

func HasDeviceGetMinMaxFanSpeed() bool

HasDeviceGetMinMaxFanSpeed reports whether nvmlDeviceGetMinMaxFanSpeed resolved in the loaded library.

func HasDeviceGetMinorNumber

func HasDeviceGetMinorNumber() bool

HasDeviceGetMinorNumber reports whether nvmlDeviceGetMinorNumber resolved in the loaded library.

func HasDeviceGetModuleId

func HasDeviceGetModuleId() bool

HasDeviceGetModuleId reports whether nvmlDeviceGetModuleId resolved in the loaded library.

func HasDeviceGetMultiGpuBoard

func HasDeviceGetMultiGpuBoard() bool

HasDeviceGetMultiGpuBoard reports whether nvmlDeviceGetMultiGpuBoard resolved in the loaded library.

func HasDeviceGetName

func HasDeviceGetName() bool

HasDeviceGetName reports whether nvmlDeviceGetName resolved in the loaded library.

func HasDeviceGetNumFans

func HasDeviceGetNumFans() bool

HasDeviceGetNumFans reports whether nvmlDeviceGetNumFans resolved in the loaded library.

func HasDeviceGetNumGpuCores

func HasDeviceGetNumGpuCores() bool

HasDeviceGetNumGpuCores reports whether nvmlDeviceGetNumGpuCores resolved in the loaded library.

func HasDeviceGetNumaNodeId

func HasDeviceGetNumaNodeId() bool

HasDeviceGetNumaNodeId reports whether nvmlDeviceGetNumaNodeId resolved in the loaded library.

func HasDeviceGetNvLinkCapability

func HasDeviceGetNvLinkCapability() bool

HasDeviceGetNvLinkCapability reports whether nvmlDeviceGetNvLinkCapability resolved in the loaded library.

func HasDeviceGetNvLinkErrorCounter

func HasDeviceGetNvLinkErrorCounter() bool

HasDeviceGetNvLinkErrorCounter reports whether nvmlDeviceGetNvLinkErrorCounter resolved in the loaded library.

func HasDeviceGetNvLinkInfo

func HasDeviceGetNvLinkInfo() bool

HasDeviceGetNvLinkInfo reports whether nvmlDeviceGetNvLinkInfo resolved in the loaded library.

func HasDeviceGetNvLinkInfoV1

func HasDeviceGetNvLinkInfoV1() bool

HasDeviceGetNvLinkInfoV1 reports whether nvmlDeviceGetNvLinkInfo resolved in the loaded library.

func HasDeviceGetNvLinkInfoV3

func HasDeviceGetNvLinkInfoV3() bool

HasDeviceGetNvLinkInfoV3 reports whether nvmlDeviceGetNvLinkInfo_v3 resolved in the loaded library.

func HasDeviceGetNvLinkRemoteDeviceType

func HasDeviceGetNvLinkRemoteDeviceType() bool

HasDeviceGetNvLinkRemoteDeviceType reports whether nvmlDeviceGetNvLinkRemoteDeviceType resolved in the loaded library.

func HasDeviceGetNvLinkRemotePciInfo

func HasDeviceGetNvLinkRemotePciInfo() bool

HasDeviceGetNvLinkRemotePciInfo reports whether nvmlDeviceGetNvLinkRemotePciInfo_v2 resolved in the loaded library.

func HasDeviceGetNvLinkState

func HasDeviceGetNvLinkState() bool

HasDeviceGetNvLinkState reports whether nvmlDeviceGetNvLinkState resolved in the loaded library.

func HasDeviceGetNvLinkTelemetrySamples

func HasDeviceGetNvLinkTelemetrySamples() bool

HasDeviceGetNvLinkTelemetrySamples reports whether nvmlDeviceGetNvLinkTelemetrySamples_v1 resolved in the loaded library.

func HasDeviceGetNvLinkUtilizationControl

func HasDeviceGetNvLinkUtilizationControl() bool

HasDeviceGetNvLinkUtilizationControl reports whether nvmlDeviceGetNvLinkUtilizationControl resolved in the loaded library.

func HasDeviceGetNvLinkUtilizationCounter

func HasDeviceGetNvLinkUtilizationCounter() bool

HasDeviceGetNvLinkUtilizationCounter reports whether nvmlDeviceGetNvLinkUtilizationCounter resolved in the loaded library.

func HasDeviceGetNvLinkVersion

func HasDeviceGetNvLinkVersion() bool

HasDeviceGetNvLinkVersion reports whether nvmlDeviceGetNvLinkVersion resolved in the loaded library.

func HasDeviceGetNvlinkBwMode

func HasDeviceGetNvlinkBwMode() bool

HasDeviceGetNvlinkBwMode reports whether nvmlDeviceGetNvlinkBwMode resolved in the loaded library.

func HasDeviceGetNvlinkNvlePrivateInfo

func HasDeviceGetNvlinkNvlePrivateInfo() bool

HasDeviceGetNvlinkNvlePrivateInfo reports whether nvmlDeviceGetNvlinkNvlePrivateInfo_v1 resolved in the loaded library.

func HasDeviceGetNvlinkRemapTableInfo

func HasDeviceGetNvlinkRemapTableInfo() bool

HasDeviceGetNvlinkRemapTableInfo reports whether nvmlDeviceGetNvlinkRemapTableInfo_v1 resolved in the loaded library.

func HasDeviceGetNvlinkSupportedBwModes

func HasDeviceGetNvlinkSupportedBwModes() bool

HasDeviceGetNvlinkSupportedBwModes reports whether nvmlDeviceGetNvlinkSupportedBwModes resolved in the loaded library.

func HasDeviceGetOfaUtilization

func HasDeviceGetOfaUtilization() bool

HasDeviceGetOfaUtilization reports whether nvmlDeviceGetOfaUtilization resolved in the loaded library.

func HasDeviceGetP2PStatus

func HasDeviceGetP2PStatus() bool

HasDeviceGetP2PStatus reports whether nvmlDeviceGetP2PStatus resolved in the loaded library.

func HasDeviceGetPciInfo

func HasDeviceGetPciInfo() bool

HasDeviceGetPciInfo reports whether nvmlDeviceGetPciInfo_v3 resolved in the loaded library.

func HasDeviceGetPciInfoExt

func HasDeviceGetPciInfoExt() bool

HasDeviceGetPciInfoExt reports whether nvmlDeviceGetPciInfoExt resolved in the loaded library.

func HasDeviceGetPcieLinkMaxSpeed

func HasDeviceGetPcieLinkMaxSpeed() bool

HasDeviceGetPcieLinkMaxSpeed reports whether nvmlDeviceGetPcieLinkMaxSpeed resolved in the loaded library.

func HasDeviceGetPcieReplayCounter

func HasDeviceGetPcieReplayCounter() bool

HasDeviceGetPcieReplayCounter reports whether nvmlDeviceGetPcieReplayCounter resolved in the loaded library.

func HasDeviceGetPcieSpeed

func HasDeviceGetPcieSpeed() bool

HasDeviceGetPcieSpeed reports whether nvmlDeviceGetPcieSpeed resolved in the loaded library.

func HasDeviceGetPcieThroughput

func HasDeviceGetPcieThroughput() bool

HasDeviceGetPcieThroughput reports whether nvmlDeviceGetPcieThroughput resolved in the loaded library.

func HasDeviceGetPdi

func HasDeviceGetPdi() bool

HasDeviceGetPdi reports whether nvmlDeviceGetPdi resolved in the loaded library.

func HasDeviceGetPerformanceModes

func HasDeviceGetPerformanceModes() bool

HasDeviceGetPerformanceModes reports whether nvmlDeviceGetPerformanceModes resolved in the loaded library.

func HasDeviceGetPerformanceState

func HasDeviceGetPerformanceState() bool

HasDeviceGetPerformanceState reports whether nvmlDeviceGetPerformanceState resolved in the loaded library.

func HasDeviceGetPersistenceMode

func HasDeviceGetPersistenceMode() bool

HasDeviceGetPersistenceMode reports whether nvmlDeviceGetPersistenceMode resolved in the loaded library.

func HasDeviceGetPgpuMetadataString

func HasDeviceGetPgpuMetadataString() bool

HasDeviceGetPgpuMetadataString reports whether nvmlDeviceGetPgpuMetadataString resolved in the loaded library.

func HasDeviceGetPlatformInfo

func HasDeviceGetPlatformInfo() bool

HasDeviceGetPlatformInfo reports whether nvmlDeviceGetPlatformInfo resolved in the loaded library.

func HasDeviceGetPowerManagementDefaultLimit

func HasDeviceGetPowerManagementDefaultLimit() bool

HasDeviceGetPowerManagementDefaultLimit reports whether nvmlDeviceGetPowerManagementDefaultLimit resolved in the loaded library.

func HasDeviceGetPowerManagementLimit

func HasDeviceGetPowerManagementLimit() bool

HasDeviceGetPowerManagementLimit reports whether nvmlDeviceGetPowerManagementLimit resolved in the loaded library.

func HasDeviceGetPowerManagementLimitConstraints

func HasDeviceGetPowerManagementLimitConstraints() bool

HasDeviceGetPowerManagementLimitConstraints reports whether nvmlDeviceGetPowerManagementLimitConstraints resolved in the loaded library.

func HasDeviceGetPowerManagementMode

func HasDeviceGetPowerManagementMode() bool

HasDeviceGetPowerManagementMode reports whether nvmlDeviceGetPowerManagementMode resolved in the loaded library.

func HasDeviceGetPowerMizerMode

func HasDeviceGetPowerMizerMode() bool

HasDeviceGetPowerMizerMode reports whether nvmlDeviceGetPowerMizerMode_v1 resolved in the loaded library.

func HasDeviceGetPowerSource

func HasDeviceGetPowerSource() bool

HasDeviceGetPowerSource reports whether nvmlDeviceGetPowerSource resolved in the loaded library.

func HasDeviceGetPowerState

func HasDeviceGetPowerState() bool

HasDeviceGetPowerState reports whether nvmlDeviceGetPowerState resolved in the loaded library.

func HasDeviceGetPowerUsage

func HasDeviceGetPowerUsage() bool

HasDeviceGetPowerUsage reports whether nvmlDeviceGetPowerUsage resolved in the loaded library.

func HasDeviceGetProcessUtilization

func HasDeviceGetProcessUtilization() bool

HasDeviceGetProcessUtilization reports whether nvmlDeviceGetProcessUtilization resolved in the loaded library.

func HasDeviceGetProcessesUtilizationInfo

func HasDeviceGetProcessesUtilizationInfo() bool

HasDeviceGetProcessesUtilizationInfo reports whether nvmlDeviceGetProcessesUtilizationInfo resolved in the loaded library.

func HasDeviceGetRemappedRows

func HasDeviceGetRemappedRows() bool

HasDeviceGetRemappedRows reports whether nvmlDeviceGetRemappedRows resolved in the loaded library.

func HasDeviceGetRemappedRowsV1

func HasDeviceGetRemappedRowsV1() bool

HasDeviceGetRemappedRowsV1 reports whether nvmlDeviceGetRemappedRows resolved in the loaded library.

func HasDeviceGetRemappedRowsV2

func HasDeviceGetRemappedRowsV2() bool

HasDeviceGetRemappedRowsV2 reports whether nvmlDeviceGetRemappedRows_v2 resolved in the loaded library.

func HasDeviceGetRepairStatus

func HasDeviceGetRepairStatus() bool

HasDeviceGetRepairStatus reports whether nvmlDeviceGetRepairStatus resolved in the loaded library.

func HasDeviceGetRetiredPages

func HasDeviceGetRetiredPages() bool

HasDeviceGetRetiredPages reports whether nvmlDeviceGetRetiredPages resolved in the loaded library.

func HasDeviceGetRetiredPagesPendingStatus

func HasDeviceGetRetiredPagesPendingStatus() bool

HasDeviceGetRetiredPagesPendingStatus reports whether nvmlDeviceGetRetiredPagesPendingStatus resolved in the loaded library.

func HasDeviceGetRetiredPagesV1

func HasDeviceGetRetiredPagesV1() bool

HasDeviceGetRetiredPagesV1 reports whether nvmlDeviceGetRetiredPages resolved in the loaded library.

func HasDeviceGetRetiredPagesV2

func HasDeviceGetRetiredPagesV2() bool

HasDeviceGetRetiredPagesV2 reports whether nvmlDeviceGetRetiredPages_v2 resolved in the loaded library.

func HasDeviceGetRowRemapperHistogram

func HasDeviceGetRowRemapperHistogram() bool

HasDeviceGetRowRemapperHistogram reports whether nvmlDeviceGetRowRemapperHistogram resolved in the loaded library.

func HasDeviceGetRunningProcessDetailList

func HasDeviceGetRunningProcessDetailList() bool

HasDeviceGetRunningProcessDetailList reports whether nvmlDeviceGetRunningProcessDetailList resolved in the loaded library.

func HasDeviceGetSamples

func HasDeviceGetSamples() bool

HasDeviceGetSamples reports whether nvmlDeviceGetSamples resolved in the loaded library.

func HasDeviceGetSerial

func HasDeviceGetSerial() bool

HasDeviceGetSerial reports whether nvmlDeviceGetSerial resolved in the loaded library.

func HasDeviceGetSramEccErrorStatus

func HasDeviceGetSramEccErrorStatus() bool

HasDeviceGetSramEccErrorStatus reports whether nvmlDeviceGetSramEccErrorStatus resolved in the loaded library.

func HasDeviceGetSramUniqueUncorrectedEccErrorCounts

func HasDeviceGetSramUniqueUncorrectedEccErrorCounts() bool

HasDeviceGetSramUniqueUncorrectedEccErrorCounts reports whether nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts resolved in the loaded library.

func HasDeviceGetSupportedClocksEventReasons

func HasDeviceGetSupportedClocksEventReasons() bool

HasDeviceGetSupportedClocksEventReasons reports whether nvmlDeviceGetSupportedClocksEventReasons resolved in the loaded library.

func HasDeviceGetSupportedClocksThrottleReasons

func HasDeviceGetSupportedClocksThrottleReasons() bool

HasDeviceGetSupportedClocksThrottleReasons reports whether nvmlDeviceGetSupportedClocksThrottleReasons resolved in the loaded library.

func HasDeviceGetSupportedEventTypes

func HasDeviceGetSupportedEventTypes() bool

HasDeviceGetSupportedEventTypes reports whether nvmlDeviceGetSupportedEventTypes resolved in the loaded library.

func HasDeviceGetSupportedGraphicsClocks

func HasDeviceGetSupportedGraphicsClocks() bool

HasDeviceGetSupportedGraphicsClocks reports whether nvmlDeviceGetSupportedGraphicsClocks resolved in the loaded library.

func HasDeviceGetSupportedMemoryClocks

func HasDeviceGetSupportedMemoryClocks() bool

HasDeviceGetSupportedMemoryClocks reports whether nvmlDeviceGetSupportedMemoryClocks resolved in the loaded library.

func HasDeviceGetSupportedPerformanceStates

func HasDeviceGetSupportedPerformanceStates() bool

HasDeviceGetSupportedPerformanceStates reports whether nvmlDeviceGetSupportedPerformanceStates resolved in the loaded library.

func HasDeviceGetSupportedVgpus

func HasDeviceGetSupportedVgpus() bool

HasDeviceGetSupportedVgpus reports whether nvmlDeviceGetSupportedVgpus resolved in the loaded library.

func HasDeviceGetTargetFanSpeed

func HasDeviceGetTargetFanSpeed() bool

HasDeviceGetTargetFanSpeed reports whether nvmlDeviceGetTargetFanSpeed resolved in the loaded library.

func HasDeviceGetTemperature

func HasDeviceGetTemperature() bool

HasDeviceGetTemperature reports whether nvmlDeviceGetTemperature resolved in the loaded library.

func HasDeviceGetTemperatureThreshold

func HasDeviceGetTemperatureThreshold() bool

HasDeviceGetTemperatureThreshold reports whether nvmlDeviceGetTemperatureThreshold resolved in the loaded library.

func HasDeviceGetTemperatureV

func HasDeviceGetTemperatureV() bool

HasDeviceGetTemperatureV reports whether nvmlDeviceGetTemperatureV resolved in the loaded library.

func HasDeviceGetThermalSettings

func HasDeviceGetThermalSettings() bool

HasDeviceGetThermalSettings reports whether nvmlDeviceGetThermalSettings resolved in the loaded library.

func HasDeviceGetTopologyCommonAncestor

func HasDeviceGetTopologyCommonAncestor() bool

HasDeviceGetTopologyCommonAncestor reports whether nvmlDeviceGetTopologyCommonAncestor resolved in the loaded library.

func HasDeviceGetTopologyNearestGpus

func HasDeviceGetTopologyNearestGpus() bool

HasDeviceGetTopologyNearestGpus reports whether nvmlDeviceGetTopologyNearestGpus resolved in the loaded library.

func HasDeviceGetTotalEccErrors

func HasDeviceGetTotalEccErrors() bool

HasDeviceGetTotalEccErrors reports whether nvmlDeviceGetTotalEccErrors resolved in the loaded library.

func HasDeviceGetTotalEnergyConsumption

func HasDeviceGetTotalEnergyConsumption() bool

HasDeviceGetTotalEnergyConsumption reports whether nvmlDeviceGetTotalEnergyConsumption resolved in the loaded library.

func HasDeviceGetUUID

func HasDeviceGetUUID() bool

HasDeviceGetUUID reports whether nvmlDeviceGetUUID resolved in the loaded library.

func HasDeviceGetUnrepairableMemoryFlag

func HasDeviceGetUnrepairableMemoryFlag() bool

HasDeviceGetUnrepairableMemoryFlag reports whether nvmlDeviceGetUnrepairableMemoryFlag_v1 resolved in the loaded library.

func HasDeviceGetUtilizationRates

func HasDeviceGetUtilizationRates() bool

HasDeviceGetUtilizationRates reports whether nvmlDeviceGetUtilizationRates resolved in the loaded library.

func HasDeviceGetVbiosVersion

func HasDeviceGetVbiosVersion() bool

HasDeviceGetVbiosVersion reports whether nvmlDeviceGetVbiosVersion resolved in the loaded library.

func HasDeviceGetVgpuCapabilities

func HasDeviceGetVgpuCapabilities() bool

HasDeviceGetVgpuCapabilities reports whether nvmlDeviceGetVgpuCapabilities resolved in the loaded library.

func HasDeviceGetVgpuHeterogeneousMode

func HasDeviceGetVgpuHeterogeneousMode() bool

HasDeviceGetVgpuHeterogeneousMode reports whether nvmlDeviceGetVgpuHeterogeneousMode resolved in the loaded library.

func HasDeviceGetVgpuInstancesUtilizationInfo

func HasDeviceGetVgpuInstancesUtilizationInfo() bool

HasDeviceGetVgpuInstancesUtilizationInfo reports whether nvmlDeviceGetVgpuInstancesUtilizationInfo resolved in the loaded library.

func HasDeviceGetVgpuMetadata

func HasDeviceGetVgpuMetadata() bool

HasDeviceGetVgpuMetadata reports whether nvmlDeviceGetVgpuMetadata resolved in the loaded library.

func HasDeviceGetVgpuProcessUtilization

func HasDeviceGetVgpuProcessUtilization() bool

HasDeviceGetVgpuProcessUtilization reports whether nvmlDeviceGetVgpuProcessUtilization resolved in the loaded library.

func HasDeviceGetVgpuProcessesUtilizationInfo

func HasDeviceGetVgpuProcessesUtilizationInfo() bool

HasDeviceGetVgpuProcessesUtilizationInfo reports whether nvmlDeviceGetVgpuProcessesUtilizationInfo resolved in the loaded library.

func HasDeviceGetVgpuSchedulerCapabilities

func HasDeviceGetVgpuSchedulerCapabilities() bool

HasDeviceGetVgpuSchedulerCapabilities reports whether nvmlDeviceGetVgpuSchedulerCapabilities resolved in the loaded library.

func HasDeviceGetVgpuSchedulerLog

func HasDeviceGetVgpuSchedulerLog() bool

HasDeviceGetVgpuSchedulerLog reports whether nvmlDeviceGetVgpuSchedulerLog resolved in the loaded library.

func HasDeviceGetVgpuSchedulerLogV1

func HasDeviceGetVgpuSchedulerLogV1() bool

HasDeviceGetVgpuSchedulerLogV1 reports whether nvmlDeviceGetVgpuSchedulerLog resolved in the loaded library.

func HasDeviceGetVgpuSchedulerLogV2

func HasDeviceGetVgpuSchedulerLogV2() bool

HasDeviceGetVgpuSchedulerLogV2 reports whether nvmlDeviceGetVgpuSchedulerLog_v2 resolved in the loaded library.

func HasDeviceGetVgpuSchedulerState

func HasDeviceGetVgpuSchedulerState() bool

HasDeviceGetVgpuSchedulerState reports whether nvmlDeviceGetVgpuSchedulerState resolved in the loaded library.

func HasDeviceGetVgpuSchedulerStateV1

func HasDeviceGetVgpuSchedulerStateV1() bool

HasDeviceGetVgpuSchedulerStateV1 reports whether nvmlDeviceGetVgpuSchedulerState resolved in the loaded library.

func HasDeviceGetVgpuSchedulerStateV2

func HasDeviceGetVgpuSchedulerStateV2() bool

HasDeviceGetVgpuSchedulerStateV2 reports whether nvmlDeviceGetVgpuSchedulerState_v2 resolved in the loaded library.

func HasDeviceGetVgpuTypeCreatablePlacements

func HasDeviceGetVgpuTypeCreatablePlacements() bool

HasDeviceGetVgpuTypeCreatablePlacements reports whether nvmlDeviceGetVgpuTypeCreatablePlacements resolved in the loaded library.

func HasDeviceGetVgpuTypeSupportedPlacements

func HasDeviceGetVgpuTypeSupportedPlacements() bool

HasDeviceGetVgpuTypeSupportedPlacements reports whether nvmlDeviceGetVgpuTypeSupportedPlacements resolved in the loaded library.

func HasDeviceGetVgpuUtilization

func HasDeviceGetVgpuUtilization() bool

HasDeviceGetVgpuUtilization reports whether nvmlDeviceGetVgpuUtilization resolved in the loaded library.

func HasDeviceGetViolationStatus

func HasDeviceGetViolationStatus() bool

HasDeviceGetViolationStatus reports whether nvmlDeviceGetViolationStatus resolved in the loaded library.

func HasDeviceGetVirtualizationMode

func HasDeviceGetVirtualizationMode() bool

HasDeviceGetVirtualizationMode reports whether nvmlDeviceGetVirtualizationMode resolved in the loaded library.

func HasDeviceIsMigDeviceHandle

func HasDeviceIsMigDeviceHandle() bool

HasDeviceIsMigDeviceHandle reports whether nvmlDeviceIsMigDeviceHandle resolved in the loaded library.

func HasDeviceLockNvlinkRemapTable

func HasDeviceLockNvlinkRemapTable() bool

HasDeviceLockNvlinkRemapTable reports whether nvmlDeviceLockNvlinkRemapTable_v1 resolved in the loaded library.

func HasDeviceModifyDrainState

func HasDeviceModifyDrainState() bool

HasDeviceModifyDrainState reports whether nvmlDeviceModifyDrainState resolved in the loaded library.

func HasDeviceOnSameBoard

func HasDeviceOnSameBoard() bool

HasDeviceOnSameBoard reports whether nvmlDeviceOnSameBoard resolved in the loaded library.

func HasDevicePerfMetricsGetSamples

func HasDevicePerfMetricsGetSamples() bool

HasDevicePerfMetricsGetSamples reports whether nvmlDevicePerfMetricsGetSamples_v1 resolved in the loaded library.

func HasDevicePowerSmoothingActivatePresetProfile

func HasDevicePowerSmoothingActivatePresetProfile() bool

HasDevicePowerSmoothingActivatePresetProfile reports whether nvmlDevicePowerSmoothingActivatePresetProfile resolved in the loaded library.

func HasDevicePowerSmoothingSetState

func HasDevicePowerSmoothingSetState() bool

HasDevicePowerSmoothingSetState reports whether nvmlDevicePowerSmoothingSetState resolved in the loaded library.

func HasDevicePowerSmoothingUpdatePresetProfileParam

func HasDevicePowerSmoothingUpdatePresetProfileParam() bool

HasDevicePowerSmoothingUpdatePresetProfileParam reports whether nvmlDevicePowerSmoothingUpdatePresetProfileParam resolved in the loaded library.

func HasDeviceQueryDrainState

func HasDeviceQueryDrainState() bool

HasDeviceQueryDrainState reports whether nvmlDeviceQueryDrainState resolved in the loaded library.

func HasDeviceReadPRMCounters

func HasDeviceReadPRMCounters() bool

HasDeviceReadPRMCounters reports whether nvmlDeviceReadPRMCounters_v1 resolved in the loaded library.

func HasDeviceReadWritePRM

func HasDeviceReadWritePRM() bool

HasDeviceReadWritePRM reports whether nvmlDeviceReadWritePRM_v1 resolved in the loaded library.

func HasDeviceRegisterEvents

func HasDeviceRegisterEvents() bool

HasDeviceRegisterEvents reports whether nvmlDeviceRegisterEvents resolved in the loaded library.

func HasDeviceRemoveGpu

func HasDeviceRemoveGpu() bool

HasDeviceRemoveGpu reports whether nvmlDeviceRemoveGpu_v2 resolved in the loaded library.

func HasDeviceResetApplicationsClocks

func HasDeviceResetApplicationsClocks() bool

HasDeviceResetApplicationsClocks reports whether nvmlDeviceResetApplicationsClocks resolved in the loaded library.

func HasDeviceResetGpuLockedClocks

func HasDeviceResetGpuLockedClocks() bool

HasDeviceResetGpuLockedClocks reports whether nvmlDeviceResetGpuLockedClocks resolved in the loaded library.

func HasDeviceResetMemoryLockedClocks

func HasDeviceResetMemoryLockedClocks() bool

HasDeviceResetMemoryLockedClocks reports whether nvmlDeviceResetMemoryLockedClocks resolved in the loaded library.

func HasDeviceResetNvLinkErrorCounters

func HasDeviceResetNvLinkErrorCounters() bool

HasDeviceResetNvLinkErrorCounters reports whether nvmlDeviceResetNvLinkErrorCounters resolved in the loaded library.

func HasDeviceResetNvLinkUtilizationCounter

func HasDeviceResetNvLinkUtilizationCounter() bool

HasDeviceResetNvLinkUtilizationCounter reports whether nvmlDeviceResetNvLinkUtilizationCounter resolved in the loaded library.

func HasDeviceSetAPIRestriction

func HasDeviceSetAPIRestriction() bool

HasDeviceSetAPIRestriction reports whether nvmlDeviceSetAPIRestriction resolved in the loaded library.

func HasDeviceSetAccountingMode

func HasDeviceSetAccountingMode() bool

HasDeviceSetAccountingMode reports whether nvmlDeviceSetAccountingMode resolved in the loaded library.

func HasDeviceSetAdaptiveTgpMode

func HasDeviceSetAdaptiveTgpMode() bool

HasDeviceSetAdaptiveTgpMode reports whether nvmlDeviceSetAdaptiveTgpMode_v1 resolved in the loaded library.

func HasDeviceSetApplicationsClocks

func HasDeviceSetApplicationsClocks() bool

HasDeviceSetApplicationsClocks reports whether nvmlDeviceSetApplicationsClocks resolved in the loaded library.

func HasDeviceSetAutoBoostedClocksEnabled

func HasDeviceSetAutoBoostedClocksEnabled() bool

HasDeviceSetAutoBoostedClocksEnabled reports whether nvmlDeviceSetAutoBoostedClocksEnabled resolved in the loaded library.

func HasDeviceSetClockOffsets

func HasDeviceSetClockOffsets() bool

HasDeviceSetClockOffsets reports whether nvmlDeviceSetClockOffsets resolved in the loaded library.

func HasDeviceSetComputeMode

func HasDeviceSetComputeMode() bool

HasDeviceSetComputeMode reports whether nvmlDeviceSetComputeMode resolved in the loaded library.

func HasDeviceSetConfComputeUnprotectedMemSize

func HasDeviceSetConfComputeUnprotectedMemSize() bool

HasDeviceSetConfComputeUnprotectedMemSize reports whether nvmlDeviceSetConfComputeUnprotectedMemSize resolved in the loaded library.

func HasDeviceSetCpuAffinity

func HasDeviceSetCpuAffinity() bool

HasDeviceSetCpuAffinity reports whether nvmlDeviceSetCpuAffinity resolved in the loaded library.

func HasDeviceSetDefaultAutoBoostedClocksEnabled

func HasDeviceSetDefaultAutoBoostedClocksEnabled() bool

HasDeviceSetDefaultAutoBoostedClocksEnabled reports whether nvmlDeviceSetDefaultAutoBoostedClocksEnabled resolved in the loaded library.

func HasDeviceSetDefaultFanSpeed

func HasDeviceSetDefaultFanSpeed() bool

HasDeviceSetDefaultFanSpeed reports whether nvmlDeviceSetDefaultFanSpeed_v2 resolved in the loaded library.

func HasDeviceSetDramEncryptionMode

func HasDeviceSetDramEncryptionMode() bool

HasDeviceSetDramEncryptionMode reports whether nvmlDeviceSetDramEncryptionMode resolved in the loaded library.

func HasDeviceSetDriverModel

func HasDeviceSetDriverModel() bool

HasDeviceSetDriverModel reports whether nvmlDeviceSetDriverModel resolved in the loaded library.

func HasDeviceSetEccMode

func HasDeviceSetEccMode() bool

HasDeviceSetEccMode reports whether nvmlDeviceSetEccMode resolved in the loaded library.

func HasDeviceSetFanControlPolicy

func HasDeviceSetFanControlPolicy() bool

HasDeviceSetFanControlPolicy reports whether nvmlDeviceSetFanControlPolicy resolved in the loaded library.

func HasDeviceSetFanSpeed

func HasDeviceSetFanSpeed() bool

HasDeviceSetFanSpeed reports whether nvmlDeviceSetFanSpeed_v2 resolved in the loaded library.

func HasDeviceSetGpcClkVfOffset

func HasDeviceSetGpcClkVfOffset() bool

HasDeviceSetGpcClkVfOffset reports whether nvmlDeviceSetGpcClkVfOffset resolved in the loaded library.

func HasDeviceSetGpuLockedClocks

func HasDeviceSetGpuLockedClocks() bool

HasDeviceSetGpuLockedClocks reports whether nvmlDeviceSetGpuLockedClocks resolved in the loaded library.

func HasDeviceSetGpuOperationMode

func HasDeviceSetGpuOperationMode() bool

HasDeviceSetGpuOperationMode reports whether nvmlDeviceSetGpuOperationMode resolved in the loaded library.

func HasDeviceSetHostname

func HasDeviceSetHostname() bool

HasDeviceSetHostname reports whether nvmlDeviceSetHostname_v1 resolved in the loaded library.

func HasDeviceSetMemClkVfOffset

func HasDeviceSetMemClkVfOffset() bool

HasDeviceSetMemClkVfOffset reports whether nvmlDeviceSetMemClkVfOffset resolved in the loaded library.

func HasDeviceSetMemoryLimits

func HasDeviceSetMemoryLimits() bool

HasDeviceSetMemoryLimits reports whether nvmlDeviceSetMemoryLimits_v1 resolved in the loaded library.

func HasDeviceSetMemoryLockedClocks

func HasDeviceSetMemoryLockedClocks() bool

HasDeviceSetMemoryLockedClocks reports whether nvmlDeviceSetMemoryLockedClocks resolved in the loaded library.

func HasDeviceSetMigMode

func HasDeviceSetMigMode() bool

HasDeviceSetMigMode reports whether nvmlDeviceSetMigMode resolved in the loaded library.

func HasDeviceSetNvLinkDeviceLowPowerThreshold

func HasDeviceSetNvLinkDeviceLowPowerThreshold() bool

HasDeviceSetNvLinkDeviceLowPowerThreshold reports whether nvmlDeviceSetNvLinkDeviceLowPowerThreshold resolved in the loaded library.

func HasDeviceSetNvLinkUtilizationControl

func HasDeviceSetNvLinkUtilizationControl() bool

HasDeviceSetNvLinkUtilizationControl reports whether nvmlDeviceSetNvLinkUtilizationControl resolved in the loaded library.

func HasDeviceSetNvlinkBwMode

func HasDeviceSetNvlinkBwMode() bool

HasDeviceSetNvlinkBwMode reports whether nvmlDeviceSetNvlinkBwMode resolved in the loaded library.

func HasDeviceSetNvlinkBwModeAsync

func HasDeviceSetNvlinkBwModeAsync() bool

HasDeviceSetNvlinkBwModeAsync reports whether nvmlDeviceSetNvlinkBwModeAsync_v1 resolved in the loaded library.

func HasDeviceSetNvlinkNvleReady

func HasDeviceSetNvlinkNvleReady() bool

HasDeviceSetNvlinkNvleReady reports whether nvmlDeviceSetNvlinkNvleReady_v1 resolved in the loaded library.

func HasDeviceSetPersistenceMode

func HasDeviceSetPersistenceMode() bool

HasDeviceSetPersistenceMode reports whether nvmlDeviceSetPersistenceMode resolved in the loaded library.

func HasDeviceSetPowerManagementLimit

func HasDeviceSetPowerManagementLimit() bool

HasDeviceSetPowerManagementLimit reports whether nvmlDeviceSetPowerManagementLimit resolved in the loaded library.

func HasDeviceSetPowerManagementLimitV1

func HasDeviceSetPowerManagementLimitV1() bool

HasDeviceSetPowerManagementLimitV1 reports whether nvmlDeviceSetPowerManagementLimit resolved in the loaded library.

func HasDeviceSetPowerManagementLimitV2

func HasDeviceSetPowerManagementLimitV2() bool

HasDeviceSetPowerManagementLimitV2 reports whether nvmlDeviceSetPowerManagementLimit_v2 resolved in the loaded library.

func HasDeviceSetPowerMizerMode

func HasDeviceSetPowerMizerMode() bool

HasDeviceSetPowerMizerMode reports whether nvmlDeviceSetPowerMizerMode_v1 resolved in the loaded library.

func HasDeviceSetRusdSettings

func HasDeviceSetRusdSettings() bool

HasDeviceSetRusdSettings reports whether nvmlDeviceSetRusdSettings_v1 resolved in the loaded library.

func HasDeviceSetTemperatureThreshold

func HasDeviceSetTemperatureThreshold() bool

HasDeviceSetTemperatureThreshold reports whether nvmlDeviceSetTemperatureThreshold resolved in the loaded library.

func HasDeviceSetVgpuCapabilities

func HasDeviceSetVgpuCapabilities() bool

HasDeviceSetVgpuCapabilities reports whether nvmlDeviceSetVgpuCapabilities resolved in the loaded library.

func HasDeviceSetVgpuHeterogeneousMode

func HasDeviceSetVgpuHeterogeneousMode() bool

HasDeviceSetVgpuHeterogeneousMode reports whether nvmlDeviceSetVgpuHeterogeneousMode resolved in the loaded library.

func HasDeviceSetVgpuSchedulerState

func HasDeviceSetVgpuSchedulerState() bool

HasDeviceSetVgpuSchedulerState reports whether nvmlDeviceSetVgpuSchedulerState resolved in the loaded library.

func HasDeviceSetVgpuSchedulerStateV1

func HasDeviceSetVgpuSchedulerStateV1() bool

HasDeviceSetVgpuSchedulerStateV1 reports whether nvmlDeviceSetVgpuSchedulerState resolved in the loaded library.

func HasDeviceSetVgpuSchedulerStateV2

func HasDeviceSetVgpuSchedulerStateV2() bool

HasDeviceSetVgpuSchedulerStateV2 reports whether nvmlDeviceSetVgpuSchedulerState_v2 resolved in the loaded library.

func HasDeviceSetVirtualizationMode

func HasDeviceSetVirtualizationMode() bool

HasDeviceSetVirtualizationMode reports whether nvmlDeviceSetVirtualizationMode resolved in the loaded library.

func HasDeviceSetupNvlinkNvleEncryptionKey

func HasDeviceSetupNvlinkNvleEncryptionKey() bool

HasDeviceSetupNvlinkNvleEncryptionKey reports whether nvmlDeviceSetupNvlinkNvleEncryptionKey_v1 resolved in the loaded library.

func HasDeviceValidateInforom

func HasDeviceValidateInforom() bool

HasDeviceValidateInforom reports whether nvmlDeviceValidateInforom resolved in the loaded library.

func HasDeviceVgpuForceGspUnload

func HasDeviceVgpuForceGspUnload() bool

HasDeviceVgpuForceGspUnload reports whether nvmlDeviceVgpuForceGspUnload resolved in the loaded library.

func HasDeviceWorkloadPowerProfileClearRequestedProfiles

func HasDeviceWorkloadPowerProfileClearRequestedProfiles() bool

HasDeviceWorkloadPowerProfileClearRequestedProfiles reports whether nvmlDeviceWorkloadPowerProfileClearRequestedProfiles resolved in the loaded library.

func HasDeviceWorkloadPowerProfileGetCurrentProfiles

func HasDeviceWorkloadPowerProfileGetCurrentProfiles() bool

HasDeviceWorkloadPowerProfileGetCurrentProfiles reports whether nvmlDeviceWorkloadPowerProfileGetCurrentProfiles resolved in the loaded library.

func HasDeviceWorkloadPowerProfileGetProfilesInfo

func HasDeviceWorkloadPowerProfileGetProfilesInfo() bool

HasDeviceWorkloadPowerProfileGetProfilesInfo reports whether nvmlDeviceWorkloadPowerProfileGetProfilesInfo resolved in the loaded library.

func HasDeviceWorkloadPowerProfileSetRequestedProfiles

func HasDeviceWorkloadPowerProfileSetRequestedProfiles() bool

HasDeviceWorkloadPowerProfileSetRequestedProfiles reports whether nvmlDeviceWorkloadPowerProfileSetRequestedProfiles resolved in the loaded library.

func HasDeviceWorkloadPowerProfileUpdateProfiles

func HasDeviceWorkloadPowerProfileUpdateProfiles() bool

HasDeviceWorkloadPowerProfileUpdateProfiles reports whether nvmlDeviceWorkloadPowerProfileUpdateProfiles_v1 resolved in the loaded library.

func HasErrorString

func HasErrorString() bool

HasErrorString reports whether nvmlErrorString resolved in the loaded library.

func HasEventSetCreate

func HasEventSetCreate() bool

HasEventSetCreate reports whether nvmlEventSetCreate resolved in the loaded library.

func HasEventSetFree

func HasEventSetFree() bool

HasEventSetFree reports whether nvmlEventSetFree resolved in the loaded library.

func HasEventSetGetContextCount

func HasEventSetGetContextCount() bool

HasEventSetGetContextCount reports whether nvmlEventSetGetContextCount_v1 resolved in the loaded library.

func HasEventSetGetContextData

func HasEventSetGetContextData() bool

HasEventSetGetContextData reports whether nvmlEventSetGetContextData_v1 resolved in the loaded library.

func HasEventSetGetContextInfo

func HasEventSetGetContextInfo() bool

HasEventSetGetContextInfo reports whether nvmlEventSetGetContextInfo_v1 resolved in the loaded library.

func HasEventSetGetGpuOperationalEventContextLegacyXid

func HasEventSetGetGpuOperationalEventContextLegacyXid() bool

HasEventSetGetGpuOperationalEventContextLegacyXid reports whether nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 resolved in the loaded library.

func HasEventSetRegisterGpuOperationalEvents

func HasEventSetRegisterGpuOperationalEvents() bool

HasEventSetRegisterGpuOperationalEvents reports whether nvmlEventSetRegisterGpuOperationalEvents_v1 resolved in the loaded library.

func HasEventSetWait

func HasEventSetWait() bool

HasEventSetWait reports whether nvmlEventSetWait_v2 resolved in the loaded library.

func HasEventSetWaitV3

func HasEventSetWaitV3() bool

HasEventSetWaitV3 reports whether nvmlEventSetWait_v3 resolved in the loaded library.

func HasGetExcludedDeviceCount

func HasGetExcludedDeviceCount() bool

HasGetExcludedDeviceCount reports whether nvmlGetExcludedDeviceCount resolved in the loaded library.

func HasGetExcludedDeviceInfoByIndex

func HasGetExcludedDeviceInfoByIndex() bool

HasGetExcludedDeviceInfoByIndex reports whether nvmlGetExcludedDeviceInfoByIndex resolved in the loaded library.

func HasGetVgpuCompatibility

func HasGetVgpuCompatibility() bool

HasGetVgpuCompatibility reports whether nvmlGetVgpuCompatibility resolved in the loaded library.

func HasGetVgpuDriverCapabilities

func HasGetVgpuDriverCapabilities() bool

HasGetVgpuDriverCapabilities reports whether nvmlGetVgpuDriverCapabilities resolved in the loaded library.

func HasGetVgpuVersion

func HasGetVgpuVersion() bool

HasGetVgpuVersion reports whether nvmlGetVgpuVersion resolved in the loaded library.

func HasGpmMetricsGet

func HasGpmMetricsGet() bool

HasGpmMetricsGet reports whether nvmlGpmMetricsGet resolved in the loaded library.

func HasGpmMigSampleGet

func HasGpmMigSampleGet() bool

HasGpmMigSampleGet reports whether nvmlGpmMigSampleGet resolved in the loaded library.

func HasGpmQueryDeviceSupport

func HasGpmQueryDeviceSupport() bool

HasGpmQueryDeviceSupport reports whether nvmlGpmQueryDeviceSupport resolved in the loaded library.

func HasGpmQueryIfStreamingEnabled

func HasGpmQueryIfStreamingEnabled() bool

HasGpmQueryIfStreamingEnabled reports whether nvmlGpmQueryIfStreamingEnabled resolved in the loaded library.

func HasGpmSampleAlloc

func HasGpmSampleAlloc() bool

HasGpmSampleAlloc reports whether nvmlGpmSampleAlloc resolved in the loaded library.

func HasGpmSampleFree

func HasGpmSampleFree() bool

HasGpmSampleFree reports whether nvmlGpmSampleFree resolved in the loaded library.

func HasGpmSampleGet

func HasGpmSampleGet() bool

HasGpmSampleGet reports whether nvmlGpmSampleGet resolved in the loaded library.

func HasGpmSetStreamingEnabled

func HasGpmSetStreamingEnabled() bool

HasGpmSetStreamingEnabled reports whether nvmlGpmSetStreamingEnabled resolved in the loaded library.

func HasGpuInstanceCreateComputeInstance

func HasGpuInstanceCreateComputeInstance() bool

HasGpuInstanceCreateComputeInstance reports whether nvmlGpuInstanceCreateComputeInstance resolved in the loaded library.

func HasGpuInstanceCreateComputeInstanceWithPlacement

func HasGpuInstanceCreateComputeInstanceWithPlacement() bool

HasGpuInstanceCreateComputeInstanceWithPlacement reports whether nvmlGpuInstanceCreateComputeInstanceWithPlacement resolved in the loaded library.

func HasGpuInstanceDestroy

func HasGpuInstanceDestroy() bool

HasGpuInstanceDestroy reports whether nvmlGpuInstanceDestroy resolved in the loaded library.

func HasGpuInstanceGetActiveVgpus

func HasGpuInstanceGetActiveVgpus() bool

HasGpuInstanceGetActiveVgpus reports whether nvmlGpuInstanceGetActiveVgpus resolved in the loaded library.

func HasGpuInstanceGetComputeInstanceById

func HasGpuInstanceGetComputeInstanceById() bool

HasGpuInstanceGetComputeInstanceById reports whether nvmlGpuInstanceGetComputeInstanceById resolved in the loaded library.

func HasGpuInstanceGetComputeInstancePossiblePlacements

func HasGpuInstanceGetComputeInstancePossiblePlacements() bool

HasGpuInstanceGetComputeInstancePossiblePlacements reports whether nvmlGpuInstanceGetComputeInstancePossiblePlacements resolved in the loaded library.

func HasGpuInstanceGetComputeInstanceProfileInfo

func HasGpuInstanceGetComputeInstanceProfileInfo() bool

HasGpuInstanceGetComputeInstanceProfileInfo reports whether nvmlGpuInstanceGetComputeInstanceProfileInfo resolved in the loaded library.

func HasGpuInstanceGetComputeInstanceProfileInfoV

func HasGpuInstanceGetComputeInstanceProfileInfoV() bool

HasGpuInstanceGetComputeInstanceProfileInfoV reports whether nvmlGpuInstanceGetComputeInstanceProfileInfoV resolved in the loaded library.

func HasGpuInstanceGetComputeInstanceRemainingCapacity

func HasGpuInstanceGetComputeInstanceRemainingCapacity() bool

HasGpuInstanceGetComputeInstanceRemainingCapacity reports whether nvmlGpuInstanceGetComputeInstanceRemainingCapacity resolved in the loaded library.

func HasGpuInstanceGetComputeInstances

func HasGpuInstanceGetComputeInstances() bool

HasGpuInstanceGetComputeInstances reports whether nvmlGpuInstanceGetComputeInstances resolved in the loaded library.

func HasGpuInstanceGetCreatableVgpus

func HasGpuInstanceGetCreatableVgpus() bool

HasGpuInstanceGetCreatableVgpus reports whether nvmlGpuInstanceGetCreatableVgpus resolved in the loaded library.

func HasGpuInstanceGetInfo

func HasGpuInstanceGetInfo() bool

HasGpuInstanceGetInfo reports whether nvmlGpuInstanceGetInfo resolved in the loaded library.

func HasGpuInstanceGetVgpuHeterogeneousMode

func HasGpuInstanceGetVgpuHeterogeneousMode() bool

HasGpuInstanceGetVgpuHeterogeneousMode reports whether nvmlGpuInstanceGetVgpuHeterogeneousMode resolved in the loaded library.

func HasGpuInstanceGetVgpuSchedulerLog

func HasGpuInstanceGetVgpuSchedulerLog() bool

HasGpuInstanceGetVgpuSchedulerLog reports whether nvmlGpuInstanceGetVgpuSchedulerLog resolved in the loaded library.

func HasGpuInstanceGetVgpuSchedulerLogV1

func HasGpuInstanceGetVgpuSchedulerLogV1() bool

HasGpuInstanceGetVgpuSchedulerLogV1 reports whether nvmlGpuInstanceGetVgpuSchedulerLog resolved in the loaded library.

func HasGpuInstanceGetVgpuSchedulerLogV2

func HasGpuInstanceGetVgpuSchedulerLogV2() bool

HasGpuInstanceGetVgpuSchedulerLogV2 reports whether nvmlGpuInstanceGetVgpuSchedulerLog_v2 resolved in the loaded library.

func HasGpuInstanceGetVgpuSchedulerState

func HasGpuInstanceGetVgpuSchedulerState() bool

HasGpuInstanceGetVgpuSchedulerState reports whether nvmlGpuInstanceGetVgpuSchedulerState resolved in the loaded library.

func HasGpuInstanceGetVgpuSchedulerStateV1

func HasGpuInstanceGetVgpuSchedulerStateV1() bool

HasGpuInstanceGetVgpuSchedulerStateV1 reports whether nvmlGpuInstanceGetVgpuSchedulerState resolved in the loaded library.

func HasGpuInstanceGetVgpuSchedulerStateV2

func HasGpuInstanceGetVgpuSchedulerStateV2() bool

HasGpuInstanceGetVgpuSchedulerStateV2 reports whether nvmlGpuInstanceGetVgpuSchedulerState_v2 resolved in the loaded library.

func HasGpuInstanceGetVgpuTypeCreatablePlacements

func HasGpuInstanceGetVgpuTypeCreatablePlacements() bool

HasGpuInstanceGetVgpuTypeCreatablePlacements reports whether nvmlGpuInstanceGetVgpuTypeCreatablePlacements resolved in the loaded library.

func HasGpuInstanceSetVgpuHeterogeneousMode

func HasGpuInstanceSetVgpuHeterogeneousMode() bool

HasGpuInstanceSetVgpuHeterogeneousMode reports whether nvmlGpuInstanceSetVgpuHeterogeneousMode resolved in the loaded library.

func HasGpuInstanceSetVgpuSchedulerState

func HasGpuInstanceSetVgpuSchedulerState() bool

HasGpuInstanceSetVgpuSchedulerState reports whether nvmlGpuInstanceSetVgpuSchedulerState resolved in the loaded library.

func HasGpuInstanceSetVgpuSchedulerStateV1

func HasGpuInstanceSetVgpuSchedulerStateV1() bool

HasGpuInstanceSetVgpuSchedulerStateV1 reports whether nvmlGpuInstanceSetVgpuSchedulerState resolved in the loaded library.

func HasGpuInstanceSetVgpuSchedulerStateV2

func HasGpuInstanceSetVgpuSchedulerStateV2() bool

HasGpuInstanceSetVgpuSchedulerStateV2 reports whether nvmlGpuInstanceSetVgpuSchedulerState_v2 resolved in the loaded library.

func HasInit

func HasInit() bool

HasInit reports whether nvmlInit_v2 resolved in the loaded library.

func HasInitWithFlags

func HasInitWithFlags() bool

HasInitWithFlags reports whether nvmlInitWithFlags resolved in the loaded library.

func HasSetVgpuVersion

func HasSetVgpuVersion() bool

HasSetVgpuVersion reports whether nvmlSetVgpuVersion resolved in the loaded library.

func HasShutdown

func HasShutdown() bool

HasShutdown reports whether nvmlShutdown resolved in the loaded library.

func HasSystemEventSetCreate

func HasSystemEventSetCreate() bool

HasSystemEventSetCreate reports whether nvmlSystemEventSetCreate resolved in the loaded library.

func HasSystemEventSetFree

func HasSystemEventSetFree() bool

HasSystemEventSetFree reports whether nvmlSystemEventSetFree resolved in the loaded library.

func HasSystemEventSetWait

func HasSystemEventSetWait() bool

HasSystemEventSetWait reports whether nvmlSystemEventSetWait resolved in the loaded library.

func HasSystemGetCPER

func HasSystemGetCPER() bool

HasSystemGetCPER reports whether nvmlSystemGetCPER_v1 resolved in the loaded library.

func HasSystemGetConfComputeCapabilities

func HasSystemGetConfComputeCapabilities() bool

HasSystemGetConfComputeCapabilities reports whether nvmlSystemGetConfComputeCapabilities resolved in the loaded library.

func HasSystemGetConfComputeGpusReadyState

func HasSystemGetConfComputeGpusReadyState() bool

HasSystemGetConfComputeGpusReadyState reports whether nvmlSystemGetConfComputeGpusReadyState resolved in the loaded library.

func HasSystemGetConfComputeKeyRotationThresholdInfo

func HasSystemGetConfComputeKeyRotationThresholdInfo() bool

HasSystemGetConfComputeKeyRotationThresholdInfo reports whether nvmlSystemGetConfComputeKeyRotationThresholdInfo resolved in the loaded library.

func HasSystemGetConfComputeSettings

func HasSystemGetConfComputeSettings() bool

HasSystemGetConfComputeSettings reports whether nvmlSystemGetConfComputeSettings resolved in the loaded library.

func HasSystemGetConfComputeSettingsV1

func HasSystemGetConfComputeSettingsV1() bool

HasSystemGetConfComputeSettingsV1 reports whether nvmlSystemGetConfComputeSettings resolved in the loaded library.

func HasSystemGetConfComputeSettingsV2

func HasSystemGetConfComputeSettingsV2() bool

HasSystemGetConfComputeSettingsV2 reports whether nvmlSystemGetConfComputeSettings_v2 resolved in the loaded library.

func HasSystemGetConfComputeState

func HasSystemGetConfComputeState() bool

HasSystemGetConfComputeState reports whether nvmlSystemGetConfComputeState resolved in the loaded library.

func HasSystemGetCudaDriverVersion

func HasSystemGetCudaDriverVersion() bool

HasSystemGetCudaDriverVersion reports whether nvmlSystemGetCudaDriverVersion resolved in the loaded library.

It resolves as the first of nvmlSystemGetCudaDriverVersion_v2, nvmlSystemGetCudaDriverVersion that the library exports. BoundSymbol reports which.

func HasSystemGetCudaDriverVersionV1

func HasSystemGetCudaDriverVersionV1() bool

HasSystemGetCudaDriverVersionV1 reports whether nvmlSystemGetCudaDriverVersion resolved in the loaded library.

func HasSystemGetCudaDriverVersionV2

func HasSystemGetCudaDriverVersionV2() bool

HasSystemGetCudaDriverVersionV2 reports whether nvmlSystemGetCudaDriverVersion_v2 resolved in the loaded library.

func HasSystemGetDriverBranch

func HasSystemGetDriverBranch() bool

HasSystemGetDriverBranch reports whether nvmlSystemGetDriverBranch resolved in the loaded library.

func HasSystemGetDriverVersion

func HasSystemGetDriverVersion() bool

HasSystemGetDriverVersion reports whether nvmlSystemGetDriverVersion resolved in the loaded library.

func HasSystemGetHicVersion

func HasSystemGetHicVersion() bool

HasSystemGetHicVersion reports whether nvmlSystemGetHicVersion resolved in the loaded library.

func HasSystemGetNVMLVersion

func HasSystemGetNVMLVersion() bool

HasSystemGetNVMLVersion reports whether nvmlSystemGetNVMLVersion resolved in the loaded library.

func HasSystemGetNvlinkBwMode

func HasSystemGetNvlinkBwMode() bool

HasSystemGetNvlinkBwMode reports whether nvmlSystemGetNvlinkBwMode resolved in the loaded library.

func HasSystemGetProcessName

func HasSystemGetProcessName() bool

HasSystemGetProcessName reports whether nvmlSystemGetProcessName resolved in the loaded library.

func HasSystemGetTopologyGpuSet

func HasSystemGetTopologyGpuSet() bool

HasSystemGetTopologyGpuSet reports whether nvmlSystemGetTopologyGpuSet resolved in the loaded library.

func HasSystemRegisterEvents

func HasSystemRegisterEvents() bool

HasSystemRegisterEvents reports whether nvmlSystemRegisterEvents resolved in the loaded library.

func HasSystemSetConfComputeGpusReadyState

func HasSystemSetConfComputeGpusReadyState() bool

HasSystemSetConfComputeGpusReadyState reports whether nvmlSystemSetConfComputeGpusReadyState resolved in the loaded library.

func HasSystemSetConfComputeKeyRotationThresholdInfo

func HasSystemSetConfComputeKeyRotationThresholdInfo() bool

HasSystemSetConfComputeKeyRotationThresholdInfo reports whether nvmlSystemSetConfComputeKeyRotationThresholdInfo resolved in the loaded library.

func HasSystemSetNvlinkBwMode

func HasSystemSetNvlinkBwMode() bool

HasSystemSetNvlinkBwMode reports whether nvmlSystemSetNvlinkBwMode resolved in the loaded library.

func HasUnitGetCount

func HasUnitGetCount() bool

HasUnitGetCount reports whether nvmlUnitGetCount resolved in the loaded library.

func HasUnitGetDevices

func HasUnitGetDevices() bool

HasUnitGetDevices reports whether nvmlUnitGetDevices resolved in the loaded library.

func HasUnitGetFanSpeedInfo

func HasUnitGetFanSpeedInfo() bool

HasUnitGetFanSpeedInfo reports whether nvmlUnitGetFanSpeedInfo resolved in the loaded library.

func HasUnitGetHandleByIndex

func HasUnitGetHandleByIndex() bool

HasUnitGetHandleByIndex reports whether nvmlUnitGetHandleByIndex resolved in the loaded library.

func HasUnitGetLedState

func HasUnitGetLedState() bool

HasUnitGetLedState reports whether nvmlUnitGetLedState resolved in the loaded library.

func HasUnitGetPsuInfo

func HasUnitGetPsuInfo() bool

HasUnitGetPsuInfo reports whether nvmlUnitGetPsuInfo resolved in the loaded library.

func HasUnitGetTemperature

func HasUnitGetTemperature() bool

HasUnitGetTemperature reports whether nvmlUnitGetTemperature resolved in the loaded library.

func HasUnitGetUnitInfo

func HasUnitGetUnitInfo() bool

HasUnitGetUnitInfo reports whether nvmlUnitGetUnitInfo resolved in the loaded library.

func HasUnitSetLedState

func HasUnitSetLedState() bool

HasUnitSetLedState reports whether nvmlUnitSetLedState resolved in the loaded library.

func HasVgpuInstanceClearAccountingPids

func HasVgpuInstanceClearAccountingPids() bool

HasVgpuInstanceClearAccountingPids reports whether nvmlVgpuInstanceClearAccountingPids resolved in the loaded library.

func HasVgpuInstanceGetAccountingMode

func HasVgpuInstanceGetAccountingMode() bool

HasVgpuInstanceGetAccountingMode reports whether nvmlVgpuInstanceGetAccountingMode resolved in the loaded library.

func HasVgpuInstanceGetAccountingPids

func HasVgpuInstanceGetAccountingPids() bool

HasVgpuInstanceGetAccountingPids reports whether nvmlVgpuInstanceGetAccountingPids resolved in the loaded library.

func HasVgpuInstanceGetAccountingStats

func HasVgpuInstanceGetAccountingStats() bool

HasVgpuInstanceGetAccountingStats reports whether nvmlVgpuInstanceGetAccountingStats resolved in the loaded library.

func HasVgpuInstanceGetEccMode

func HasVgpuInstanceGetEccMode() bool

HasVgpuInstanceGetEccMode reports whether nvmlVgpuInstanceGetEccMode resolved in the loaded library.

func HasVgpuInstanceGetEncoderCapacity

func HasVgpuInstanceGetEncoderCapacity() bool

HasVgpuInstanceGetEncoderCapacity reports whether nvmlVgpuInstanceGetEncoderCapacity resolved in the loaded library.

func HasVgpuInstanceGetEncoderSessions

func HasVgpuInstanceGetEncoderSessions() bool

HasVgpuInstanceGetEncoderSessions reports whether nvmlVgpuInstanceGetEncoderSessions resolved in the loaded library.

func HasVgpuInstanceGetEncoderStats

func HasVgpuInstanceGetEncoderStats() bool

HasVgpuInstanceGetEncoderStats reports whether nvmlVgpuInstanceGetEncoderStats resolved in the loaded library.

func HasVgpuInstanceGetFBCSessions

func HasVgpuInstanceGetFBCSessions() bool

HasVgpuInstanceGetFBCSessions reports whether nvmlVgpuInstanceGetFBCSessions resolved in the loaded library.

func HasVgpuInstanceGetFBCStats

func HasVgpuInstanceGetFBCStats() bool

HasVgpuInstanceGetFBCStats reports whether nvmlVgpuInstanceGetFBCStats resolved in the loaded library.

func HasVgpuInstanceGetFbUsage

func HasVgpuInstanceGetFbUsage() bool

HasVgpuInstanceGetFbUsage reports whether nvmlVgpuInstanceGetFbUsage resolved in the loaded library.

func HasVgpuInstanceGetFrameRateLimit

func HasVgpuInstanceGetFrameRateLimit() bool

HasVgpuInstanceGetFrameRateLimit reports whether nvmlVgpuInstanceGetFrameRateLimit resolved in the loaded library.

func HasVgpuInstanceGetGpuInstanceId

func HasVgpuInstanceGetGpuInstanceId() bool

HasVgpuInstanceGetGpuInstanceId reports whether nvmlVgpuInstanceGetGpuInstanceId resolved in the loaded library.

func HasVgpuInstanceGetGpuPciId

func HasVgpuInstanceGetGpuPciId() bool

HasVgpuInstanceGetGpuPciId reports whether nvmlVgpuInstanceGetGpuPciId resolved in the loaded library.

func HasVgpuInstanceGetLicenseInfo

func HasVgpuInstanceGetLicenseInfo() bool

HasVgpuInstanceGetLicenseInfo reports whether nvmlVgpuInstanceGetLicenseInfo_v2 resolved in the loaded library.

func HasVgpuInstanceGetLicenseStatus

func HasVgpuInstanceGetLicenseStatus() bool

HasVgpuInstanceGetLicenseStatus reports whether nvmlVgpuInstanceGetLicenseStatus resolved in the loaded library.

func HasVgpuInstanceGetMdevUUID

func HasVgpuInstanceGetMdevUUID() bool

HasVgpuInstanceGetMdevUUID reports whether nvmlVgpuInstanceGetMdevUUID resolved in the loaded library.

func HasVgpuInstanceGetMetadata

func HasVgpuInstanceGetMetadata() bool

HasVgpuInstanceGetMetadata reports whether nvmlVgpuInstanceGetMetadata resolved in the loaded library.

func HasVgpuInstanceGetPlacementId

func HasVgpuInstanceGetPlacementId() bool

HasVgpuInstanceGetPlacementId reports whether nvmlVgpuInstanceGetPlacementId resolved in the loaded library.

func HasVgpuInstanceGetRuntimeStateSize

func HasVgpuInstanceGetRuntimeStateSize() bool

HasVgpuInstanceGetRuntimeStateSize reports whether nvmlVgpuInstanceGetRuntimeStateSize resolved in the loaded library.

func HasVgpuInstanceGetType

func HasVgpuInstanceGetType() bool

HasVgpuInstanceGetType reports whether nvmlVgpuInstanceGetType resolved in the loaded library.

func HasVgpuInstanceGetUUID

func HasVgpuInstanceGetUUID() bool

HasVgpuInstanceGetUUID reports whether nvmlVgpuInstanceGetUUID resolved in the loaded library.

func HasVgpuInstanceGetVmDriverVersion

func HasVgpuInstanceGetVmDriverVersion() bool

HasVgpuInstanceGetVmDriverVersion reports whether nvmlVgpuInstanceGetVmDriverVersion resolved in the loaded library.

func HasVgpuInstanceGetVmID

func HasVgpuInstanceGetVmID() bool

HasVgpuInstanceGetVmID reports whether nvmlVgpuInstanceGetVmID resolved in the loaded library.

func HasVgpuInstanceSetEncoderCapacity

func HasVgpuInstanceSetEncoderCapacity() bool

HasVgpuInstanceSetEncoderCapacity reports whether nvmlVgpuInstanceSetEncoderCapacity resolved in the loaded library.

func HasVgpuTypeGetBAR1Info

func HasVgpuTypeGetBAR1Info() bool

HasVgpuTypeGetBAR1Info reports whether nvmlVgpuTypeGetBAR1Info resolved in the loaded library.

func HasVgpuTypeGetCapabilities

func HasVgpuTypeGetCapabilities() bool

HasVgpuTypeGetCapabilities reports whether nvmlVgpuTypeGetCapabilities resolved in the loaded library.

func HasVgpuTypeGetClass

func HasVgpuTypeGetClass() bool

HasVgpuTypeGetClass reports whether nvmlVgpuTypeGetClass resolved in the loaded library.

func HasVgpuTypeGetDeviceID

func HasVgpuTypeGetDeviceID() bool

HasVgpuTypeGetDeviceID reports whether nvmlVgpuTypeGetDeviceID resolved in the loaded library.

func HasVgpuTypeGetFbReservation

func HasVgpuTypeGetFbReservation() bool

HasVgpuTypeGetFbReservation reports whether nvmlVgpuTypeGetFbReservation resolved in the loaded library.

func HasVgpuTypeGetFrameRateLimit

func HasVgpuTypeGetFrameRateLimit() bool

HasVgpuTypeGetFrameRateLimit reports whether nvmlVgpuTypeGetFrameRateLimit resolved in the loaded library.

func HasVgpuTypeGetFramebufferSize

func HasVgpuTypeGetFramebufferSize() bool

HasVgpuTypeGetFramebufferSize reports whether nvmlVgpuTypeGetFramebufferSize resolved in the loaded library.

func HasVgpuTypeGetGpuInstanceProfileId

func HasVgpuTypeGetGpuInstanceProfileId() bool

HasVgpuTypeGetGpuInstanceProfileId reports whether nvmlVgpuTypeGetGpuInstanceProfileId resolved in the loaded library.

func HasVgpuTypeGetGspHeapSize

func HasVgpuTypeGetGspHeapSize() bool

HasVgpuTypeGetGspHeapSize reports whether nvmlVgpuTypeGetGspHeapSize resolved in the loaded library.

func HasVgpuTypeGetLicense

func HasVgpuTypeGetLicense() bool

HasVgpuTypeGetLicense reports whether nvmlVgpuTypeGetLicense resolved in the loaded library.

func HasVgpuTypeGetMaxInstances

func HasVgpuTypeGetMaxInstances() bool

HasVgpuTypeGetMaxInstances reports whether nvmlVgpuTypeGetMaxInstances resolved in the loaded library.

func HasVgpuTypeGetMaxInstancesPerGpuInstance

func HasVgpuTypeGetMaxInstancesPerGpuInstance() bool

HasVgpuTypeGetMaxInstancesPerGpuInstance reports whether nvmlVgpuTypeGetMaxInstancesPerGpuInstance resolved in the loaded library.

func HasVgpuTypeGetMaxInstancesPerVm

func HasVgpuTypeGetMaxInstancesPerVm() bool

HasVgpuTypeGetMaxInstancesPerVm reports whether nvmlVgpuTypeGetMaxInstancesPerVm resolved in the loaded library.

func HasVgpuTypeGetName

func HasVgpuTypeGetName() bool

HasVgpuTypeGetName reports whether nvmlVgpuTypeGetName resolved in the loaded library.

func HasVgpuTypeGetNumDisplayHeads

func HasVgpuTypeGetNumDisplayHeads() bool

HasVgpuTypeGetNumDisplayHeads reports whether nvmlVgpuTypeGetNumDisplayHeads resolved in the loaded library.

func HasVgpuTypeGetResolution

func HasVgpuTypeGetResolution() bool

HasVgpuTypeGetResolution reports whether nvmlVgpuTypeGetResolution resolved in the loaded library.

func Init

func Init() error

Init initializes the NVML Library lazily, without allocating any device state.

This will initialize the NVML Library state without enumerating any discovered devices. This will allow NVML to communicate with a device, even if other devices are in an unstable or bad state. Enumeration of a device can be done by obtaining the device handle via the nvmlDeviceGetHandleBy* class of APIs. This method needs to be called once before any usage of NVML Library APIs. For all products.

Note: A reference count of the number of initializations is maintained, and a corresponding call to Shutdown needs to be issued once usage of the NVML Library is complete. Shutdown will only occur after the reference count reaches zero.

See also: Shutdown

A nil error means the NVML Library was properly initialized.

Errors:

Wraps nvmlInit, bound as nvmlInit_v2.

func InitWithFlags

func InitWithFlags(flags uint32) error

InitWithFlags initializes the NVML Library lazily, without allocating any device state, with additional init flags.

A variant of Init, this will initialize the NVML Library state without enumerating any discovered devices. An option to pass in additional flags is provided to modify the behavior of NVML Library init. The usage of these flags can be obtained from NVML_INIT_FLAG_*. These flags can be combined together. Other than the “flags” parameter, this method is completely identical to Init. For all products.

Note: A reference count of the number of initializations is maintained, and a corresponding call to Shutdown needs to be issued once usage of the NVML Library is complete. Shutdown will only occur after the reference count reaches zero.

See also: Shutdown

  • flags: NVML_INIT_FLAG_* flags that can modify NVML Init behavior

A nil error means the NVML Library was properly initialized.

Errors:

Wraps nvmlInitWithFlags.

func IsUnsupported

func IsUnsupported(err error) bool

IsUnsupported reports an unsupported call or a symbol absent from the loaded library. It examines wrapped and joined errors. Permission, lost-device and symbol-binding failures alone are not unsupported features.

Example
package main

import (
	"errors"
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	err := errors.Join(nvml.ErrNoPermission, &nvml.SymbolError{Symbol: "nvmlNewQuery"})
	fmt.Println(nvml.IsUnsupported(err))
	fmt.Println(nvml.IsUnsupported(nvml.ErrGpuIsLost))
}
Output:
true
false

func Load

func Load(path string) error

Load opens the shared library from path, or from the default search list when path is empty, and binds all symbols. Callers that need to direct loading should call Load before any other function; otherwise the first call loads from the default search list.

Load is idempotent: calling it again with the same path, or with an empty path, returns nil. Calling it with a different path after a successful load returns *LibraryConflictError rather than replacing the library. After a failed load, Load retries.

func Loaded

func Loaded() bool

Loaded reports whether the library is currently loaded. It does not trigger a load.

func Path

func Path() string

Path returns the path or name the loaded library was opened from, or the empty string if no library is loaded.

func SetVgpuVersion

func SetVgpuVersion(vgpuVersion *VgpuVersion) error

SetVgpuVersion overrides the preset range of vGPU versions supported by the NVIDIA vGPU Manager with a range set by an administrator.

This function configures the NVIDIA vGPU Manager with a range of supported vGPU versions set by an administrator. This range must be a subset of the preset range that the NVIDIA vGPU Manager supports. The custom range set by an administrator takes precedence over the preset range and is advertised to the guest VM for negotiating the vGPU version. See GetVgpuVersion for details of how to query the preset range of versions supported. This function takes a pointer to vGPU version range structure VgpuVersion as input to override the preset vGPU version range that the NVIDIA vGPU Manager supports. After host system reboot or driver reload, the range of supported versions reverts to the range that is preset for the NVIDIA vGPU Manager.

Note: 1. The range set by the administrator must be a subset of the preset range that the NVIDIA vGPU Manager supports. Otherwise, an error is returned.

  • If the range of supported guest driver versions does not overlap the range set by the administrator, the guest driver fails to load.
  • If the range of supported guest driver versions overlaps the range set by the administrator, the guest driver will load with a negotiated vGPU version that is the maximum value in the overlapping range.
  • No VMs must be running on the host when this function is called. If a VM is running on the host, the call to this function fails.

Parameters:

  • vgpuVersion: Pointer to a caller-supplied range of supported vGPU versions

A nil error means the preset range of supported vGPU versions was successfully overridden.

Errors:

  • ErrInvalidArgument: The vgpuVersion parameter specifies a range that is outside the range supported by the NVIDIA vGPU Manager or if vgpuVersion is NULL.
  • ErrInUse: The range was not overridden because a VM is running on the host.
  • ErrNotSupported: The API is not supported.

Wraps nvmlSetVgpuVersion.

func Shutdown

func Shutdown() error

Shutdown shuts down and cleanup NVML Library state.

This will shut down and cleanup NVML Library state by releasing all device and library resources previously allocated with Init or InitWithFlags. This should be called after all NVML work is done, and once for each call to Init or InitWithFlags. Complete shutdown will only occur when the reference count of all prior NVML initializations reaches zero. No error will be reported if this is called more times than Init or InitWithFlags. For all products.

A nil error means the NVML Library was properly shut down.

Errors:

  • ErrUninitialized: if the NVML Library was not previously initialized.
  • ErrUnknown: if there is an unexpected error. previousFrame Buffer Capture Structures nextMulti Instance GPU Management

Wraps nvmlShutdown.

func SystemEventSetCreate

func SystemEventSetCreate(request *SystemEventSetCreateRequest) error

SystemEventSetCreate creates an empty set of system events.

Event set should be freed by SystemEventSetFree For Fermi or newer fully supported devices.

See also: SystemEventSetFree

Requires CUDA 12.9 (driver r575) or later; see HasSystemEventSetCreate.

A nil error means the event has been set.

Errors:

Wraps nvmlSystemEventSetCreate.

func SystemEventSetFree

func SystemEventSetFree(request *SystemEventSetFreeRequest) error

SystemEventSetFree releases system event set.

For Fermi or newer fully supported devices.

See also: Device.RegisterEvents

Requires CUDA 12.9 (driver r575) or later; see HasSystemEventSetFree.

A nil error means the event has been set.

Errors:

Wraps nvmlSystemEventSetFree.

func SystemEventSetWait

func SystemEventSetWait(request *SystemEventSetWaitRequest) error

SystemEventSetWait waits on system events and delivers events.

For Fermi or newer fully supported devices. If some events are ready to be delivered at the time of the call, function returns immediately. If there are no events ready to be delivered, function sleeps till event arrives but not longer than specified timeout. This function in certain conditions can return before specified timeout passes (e.g. when interrupt arrives) if the return request->numEvent equals to request->dataSize, there might be outstanding event, it is recommended to call SystemEventSetWait again to query all the events.

See also: nvmlSystemEventType, SystemRegisterEvents

Requires CUDA 12.9 (driver r575) or later; see HasSystemEventSetWait.

A nil error means the event has been set.

Errors:

Wraps nvmlSystemEventSetWait.

func SystemGetCPER

func SystemGetCPER(cper *GetCPERV1) error

SystemGetCPER retrieves Common Platform Error Record (CPER) data.

Records are returned in a caller-supplied buffer. Iteration is driven by the cursor ( CPERCursorV1) struct: pass the same cursor on every call in a sequence; the implementation updates cursor.handle. Do not modify cursor between calls. To change cursor.cperTypeMask or cursor.uuid, set cursor.handle to CperCursorHandleInit and call again (new iteration). For a size query, call with buffer NULL and bufferSize 0; the function returns ErrInsufficientSize and sets bufferSize when records exist, or Success with bufferSize set to 0 when there are no CPER records. Use bufferSize == 0 on return as the indicator for “no records” or “no more records”. This API requires root privileges. Records are available from initialization.

Requires CUDA 13.3 (driver r610) or later; see HasSystemGetCPER.

  • cper: Pointer to an GetCPERV1. On entry set cursor.cperTypeMask, cursor.uuid (empty string for all), cursor.handle (to CperCursorHandleInit for first call), buffer (or NULL), bufferSize. On return cursor.handle and bufferSize are updated

A nil error means buffer has been populated with CPER data, or bufferSize is 0 (no/more records).

Errors:

Wraps nvmlSystemGetCPER_v1.

func SystemGetConfComputeCapabilities

func SystemGetConfComputeCapabilities(capabilities *ConfComputeSystemCaps) error

SystemGetConfComputeCapabilities gets Conf Computing System capabilities.

For Ampere or newer fully supported devices. Supported on Linux, Windows TCC.

  • capabilities: System CC capabilities

A nil error means capabilities were successfully queried.

Errors:

Wraps nvmlSystemGetConfComputeCapabilities.

func SystemGetConfComputeGpusReadyState

func SystemGetConfComputeGpusReadyState() (uint32, error)

SystemGetConfComputeGpusReadyState gets Conf Computing GPUs ready state.

For Ampere or newer fully supported devices. Supported on Linux, Windows TCC. return

Parameters:

Wraps nvmlSystemGetConfComputeGpusReadyState.

func SystemGetConfComputeKeyRotationThresholdInfo

func SystemGetConfComputeKeyRotationThresholdInfo(pKeyRotationThrInfo *ConfComputeGetKeyRotationThresholdInfo) error

SystemGetConfComputeKeyRotationThresholdInfo gets Conf Computing key rotation threshold detail.

For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.

Requires CUDA 12.4 (driver r550) or later; see HasSystemGetConfComputeKeyRotationThresholdInfo.

  • pKeyRotationThrInfo: Reference in which to return the key rotation threshold data

A nil error means gpu key rotation threshold info has been populated.

Errors:

Wraps nvmlSystemGetConfComputeKeyRotationThresholdInfo.

func SystemGetConfComputeSettings

func SystemGetConfComputeSettings(settings *SystemConfComputeSettings) error

SystemGetConfComputeSettings gets Conf Computing System Settings.

For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.

Requires CUDA 12.4 (driver r550) or later; see HasSystemGetConfComputeSettings.

  • settings: System CC settings

A nil error means the query is success.

Errors:

Wraps nvmlSystemGetConfComputeSettings.

func SystemGetConfComputeSettingsV1

func SystemGetConfComputeSettingsV1(settings *SystemConfComputeSettings) error

SystemGetConfComputeSettingsV1 gets Conf Computing System Settings.

For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.

Requires CUDA 12.4 (driver r550) or later; see HasSystemGetConfComputeSettingsV1.

  • settings: System CC settings

A nil error means the query is success.

Errors:

Wraps nvmlSystemGetConfComputeSettings.

func SystemGetConfComputeSettingsV2

func SystemGetConfComputeSettingsV2(settings *SystemConfComputeSettingsV2) error

SystemGetConfComputeSettingsV2 gets Conf Computing System Settings.

For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.

Requires CUDA 13.5 (driver r620) or later; see HasSystemGetConfComputeSettingsV2.

  • settings: System CC settings

A nil error means the query is success.

Errors:

Wraps nvmlSystemGetConfComputeSettings_v2.

func SystemGetCudaDriverVersion

func SystemGetCudaDriverVersion() (int32, error)

SystemGetCudaDriverVersion retrieves the version of the CUDA driver from the shared library.

For all products. The returned CUDA driver version by calling cuDriverGetVersion()

  • cudaDriverVersion: Reference in which to return the version identifier

A nil error means cudaDriverVersion has been set.

Errors:

Wraps nvmlSystemGetCudaDriverVersion, bound to the first of nvmlSystemGetCudaDriverVersion_v2, nvmlSystemGetCudaDriverVersion that the library exports.

func SystemGetCudaDriverVersionV1

func SystemGetCudaDriverVersionV1() (int32, error)

SystemGetCudaDriverVersionV1 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.

  • cudaDriverVersion: Reference in which to return the version identifier

A nil error means cudaDriverVersion has been set.

Errors:

Wraps nvmlSystemGetCudaDriverVersion.

func SystemGetCudaDriverVersionV2

func SystemGetCudaDriverVersionV2() (int32, error)

SystemGetCudaDriverVersionV2 retrieves the version of the CUDA driver from the shared library.

For all products. The returned CUDA driver version by calling cuDriverGetVersion()

  • cudaDriverVersion: Reference in which to return the version identifier

A nil error means cudaDriverVersion has been set.

Errors:

Wraps nvmlSystemGetCudaDriverVersion_v2.

func SystemGetDriverBranch

func SystemGetDriverBranch(branchInfo *SystemDriverBranchInfo, length uint32) error

SystemGetDriverBranch retrieves the driver branch of the NVIDIA driver installed on the system.

For all products. The branch identifier is an alphanumeric string. It will not exceed 80 characters in length (including the NULL terminator). See SystemDriverVersionBufferSize.

Requires CUDA 12.6 (driver r560) or later; see HasSystemGetDriverBranch.

  • branchInfo: Pointer to the driver branch information structure SystemDriverBranchInfo
  • length: The maximum allowed length of the driver branch string

Errors:

Wraps nvmlSystemGetDriverBranch.

func SystemGetDriverVersion

func SystemGetDriverVersion() (string, error)

SystemGetDriverVersion 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 SystemDriverVersionBufferSize.

  • version: Reference in which to return the version identifier
  • length: The maximum allowed length of the string returned in version

A nil error means version has been set.

Errors:

Wraps nvmlSystemGetDriverVersion.

func SystemGetHicVersion

func SystemGetHicVersion(hwbcCount *uint32, hwbcEntries *HwbcEntry) error

SystemGetHicVersion 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.

  • hwbcCount: Size of hwbcEntries array
  • hwbcEntries: Array holding information about hwbc

A nil error means hwbcCount and hwbcEntries have been populated.

Errors:

Wraps nvmlSystemGetHicVersion.

func SystemGetNVMLVersion

func SystemGetNVMLVersion() (string, error)

SystemGetNVMLVersion 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 SystemNvmlVersionBufferSize.

  • version: Reference in which to return the version identifier
  • length: The maximum allowed length of the string returned in version

A nil error means version has been set.

Errors:

Wraps nvmlSystemGetNVMLVersion.

func SystemGetNvlinkBwMode

func SystemGetNvlinkBwMode() (uint32, error)

SystemGetNvlinkBwMode gets the global nvlink bandwith mode.

  • nvlinkBwMode: reference of nvlink bandwidth mode

Errors:

Wraps nvmlSystemGetNvlinkBwMode.

func SystemGetProcessName

func SystemGetProcessName(pid uint32) (string, error)

SystemGetProcessName 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.

  • 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

A nil error means name has been set.

Errors:

Wraps nvmlSystemGetProcessName.

func SystemGetTopologyGpuSet

func SystemGetTopologyGpuSet(cpuNumber uint32, count *uint32, deviceArray *Device) error

SystemGetTopologyGpuSet retrieves the set of GPUs that have a CPU affinity with the given CPU number For all products.

Supported on Linux only.

  • 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

A nil error means deviceArray or count (if initially zero) has been set.

Errors:

  • ErrInvalidArgument: if cpuNumber, or count is invalid, or deviceArray is NULL with a non-zero count
  • ErrNotSupported: if the device or OS does not support this feature
  • ErrUnknown: an error has occurred in underlying topology discovery

Wraps nvmlSystemGetTopologyGpuSet.

func SystemRegisterEvents

func SystemRegisterEvents(request *SystemRegisterEventRequest) error

SystemRegisterEvents starts recording of events on system and add the events to specified SystemEventSet.

For Linux only. This call starts recording of events on specific device. All events that occurred before this call are not recorded. Checking if some event occurred can be done with SystemEventSetWait If function reports ErrUnknown, event set is in undefined state and should be freed. If function reports ErrNotSupported, event set can still be used. None of the requested eventTypes are registered in that case.

See also: nvmlSystemEventType, SystemEventSetWait, EventSet.Close

Requires CUDA 12.9 (driver r575) or later; see HasSystemRegisterEvents.

A nil error means the event has been set.

Errors:

Wraps nvmlSystemRegisterEvents.

func SystemSetConfComputeGpusReadyState

func SystemSetConfComputeGpusReadyState(isAcceptingWork uint32) error

SystemSetConfComputeGpusReadyState sets Conf Computing GPUs ready state.

For Ampere or newer fully supported devices. Supported on Linux, Windows TCC. return

Parameters:

Wraps nvmlSystemSetConfComputeGpusReadyState.

func SystemSetConfComputeKeyRotationThresholdInfo

func SystemSetConfComputeKeyRotationThresholdInfo(pKeyRotationThrInfo *ConfComputeSetKeyRotationThresholdInfo) error

SystemSetConfComputeKeyRotationThresholdInfo sets Conf Computing key rotation threshold.

For Hopper or newer fully supported devices. Supported on Linux, Windows TCC. This function is to set the confidential compute key rotation threshold parameters. pKeyRotationThrInfo->maxAttackerAdvantage should be in the range from CcKeyRotationThresholdAttackerAdvantageMin to CcKeyRotationThresholdAttackerAdvantageMax. Default value is 60.

Requires CUDA 12.4 (driver r550) or later; see HasSystemSetConfComputeKeyRotationThresholdInfo.

  • pKeyRotationThrInfo: Reference to the key rotation threshold data

A nil error means key rotation threashold max attacker advantage has been set.

Errors:

Wraps nvmlSystemSetConfComputeKeyRotationThresholdInfo.

func SystemSetNvlinkBwMode

func SystemSetNvlinkBwMode(nvlinkBwMode uint32) error

SystemSetNvlinkBwMode sets the global nvlink bandwith mode.

  • nvlinkBwMode: nvlink bandwidth mode

Errors:

Wraps nvmlSystemSetNvlinkBwMode.

func UnitGetCount

func UnitGetCount() (uint32, error)

UnitGetCount retrieves the number of units in the system.

For S-class products.

  • unitCount: Reference in which to return the number of units

A nil error means unitCount has been set.

Errors:

Wraps nvmlUnitGetCount.

func VgpuTypeGetMaxInstancesPerGpuInstance

func VgpuTypeGetMaxInstancesPerGpuInstance(pMaxInstance *VgpuTypeMaxInstance) error

VgpuTypeGetMaxInstancesPerGpuInstance retrieves the maximum number of vGPU instances per GPU instance for given vGPU type.

Requires CUDA 12.9 (driver r575) or later; see HasVgpuTypeGetMaxInstancesPerGpuInstance.

Errors:

Wraps nvmlVgpuTypeGetMaxInstancesPerGpuInstance.

Types

type AccountingStats

type AccountingStats struct {
	GpuUtilization    uint32
	MemoryUtilization uint32
	MaxMemoryUsage    uint64
	Time              uint64
	StartTime         uint64
	IsRunning         uint32
	Reserved          [5]uint32
}

AccountingStats describes accounting statistics of a process.

type AccountingStatsV2

type AccountingStatsV2 struct {
	Pid               uint32
	IsRunning         uint32
	GpuUtilization    uint32
	MemoryUtilization uint32
	MaxMemoryUsage    uint64
	SampleCount       uint32
	SumGpuUtil        uint64
	SumFbUtil         uint64
	Time              uint64
	StartTime         uint64
}

AccountingStatsV2 describes accounting statistics (v2) of a process.

type ActiveVgpuInstanceInfo

type ActiveVgpuInstanceInfo struct {
	Version       uint32
	VgpuCount     uint32
	VgpuInstances uintptr
}

ActiveVgpuInstanceInfo stores active vGPU instance information -- Version 1.

type ActiveVgpuInstanceInfoV1

type ActiveVgpuInstanceInfoV1 = ActiveVgpuInstanceInfo

ActiveVgpuInstanceInfoV1 is an alias for ActiveVgpuInstanceInfo.

type AdaptiveTgpModeInfoV1

type AdaptiveTgpModeInfoV1 struct {
	InBandEnableRequest   EnableState
	FeatureAllowedByAdmin EnableState
	AdminOverrideEnabled  EnableState
	EnablementStatus      EnableState
	AdjustedLimitMw       uint32
}

AdaptiveTgpModeInfoV1 stores adaptive TGP Mode state and telemetry for a GPU.

type AffinityScope

type AffinityScope uint32

AffinityScope represents nvmlAffinityScope_t.

const (
	AffinityScopeNode   AffinityScope = 0 // Scope of NUMA node for affinity queries
	AffinityScopeSocket AffinityScope = 1 // Scope of processor socket for affinity queries
)

func (AffinityScope) String

func (e AffinityScope) String() string

String returns the constant name, or a numeric representation for unknown values.

type BAR1Memory

type BAR1Memory struct {
	Bar1Total uint64
	Bar1Free  uint64
	Bar1Used  uint64
}

BAR1Memory represents BAR1 Memory allocation Information for a device.

type BBXTimeDataV1

type BBXTimeDataV1 struct {
	TimeRun uint32
}

BBXTimeDataV1 represents BBX Time Data.

type BindFailure

type BindFailure struct {
	Symbol string
	Err    error
}

BindFailure names a symbol the loaded library exports but that could not be bound, and why.

func BindFailures

func BindFailures() []BindFailure

BindFailures returns the symbols the loaded library exports that could not be bound, sorted by symbol name, or nil if every exported symbol bound. Calling one of these reports *SymbolError with the same Err.

A load that reports no error can still leave symbols unbound: the library is fine and the signatures are not representable here. Call this after Load to find that out at once rather than one call site at a time. It does not trigger a load, and returns nil if none has happened.

type BrandType

type BrandType int32

BrandType represents * The Brand of the GPU.

const (
	BrandUnknown           BrandType = 0
	BrandQuadro            BrandType = 1
	BrandTesla             BrandType = 2
	BrandNvs               BrandType = 3
	BrandGrid              BrandType = 4 // Deprecated from API reporting. Keeping definition for backward compatibility.
	BrandGeforce           BrandType = 5
	BrandTitan             BrandType = 6
	BrandNvidiaVapps       BrandType = 7                      // NVIDIA Virtual Applications
	BrandNvidiaVpc         BrandType = 8                      // NVIDIA Virtual PC
	BrandNvidiaVcs         BrandType = 9                      // NVIDIA vGPU for Compute
	BrandNvidiaVws         BrandType = 10                     // NVIDIA RTX Virtual Workstation
	BrandNvidiaCloudGaming BrandType = 11                     // NVIDIA Cloud Gaming
	BrandNvidiaVgaming     BrandType = BrandNvidiaCloudGaming // Deprecated from API reporting. Keeping definition for backward compatibility.
	BrandQuadroRtx         BrandType = 12
	BrandNvidiaRtx         BrandType = 13
	BrandNvidia            BrandType = 14
	BrandGeforceRtx        BrandType = 15 // Unused
	BrandTitanRtx          BrandType = 16 // Unused
	BrandNvidiaDla         BrandType = 17 // Deprecated NVIDIA Deep Learning Accelerator
	BrandNvidiaNpu         BrandType = 19 // NVIDIA NPU
	BrandNvidiaVgamedev    BrandType = 18 // NVIDIA RTX Virtual Game Dev
	BrandCount             BrandType = 20
)

func (BrandType) String

func (e BrandType) String() string

String returns the constant name, or a numeric representation for unknown values.

type BridgeChipHierarchy

type BridgeChipHierarchy struct {
	BridgeCount    uint8
	BridgeChipInfo [128]BridgeChipInfo
}

BridgeChipHierarchy stores the complete Hierarchy of the Bridge Chip within the board.

The immediate bridge is stored at index 0 of bridgeInfoList, parent to immediate bridge is at index 1 and so forth.

type BridgeChipInfo

type BridgeChipInfo struct {
	Type      BridgeChipType
	FwVersion uint32
}

BridgeChipInfo represents information about the Bridge Chip Firmware.

type BridgeChipType

type BridgeChipType int32

BridgeChipType represents type of bridge chip.

const (
	BridgeChipPlx  BridgeChipType = 0
	BridgeChipBRO4 BridgeChipType = 1
)

func (BridgeChipType) String

func (e BridgeChipType) String() string

String returns the constant name, or a numeric representation for unknown values.

type BusType

type BusType uint32

BusType represents PCI bus types.

const (
	BusTypeUnknown BusType = 0 // Unknown bus type.
	BusTypePci     BusType = 1 // PCI bus.
	BusTypePcie    BusType = 2 // PCI-Express bus.
	BusTypeFpci    BusType = 3 // FPCI bus.
	BusTypeAgp     BusType = 4 // AGP bus.
)

func (BusType) String

func (e BusType) String() string

String returns the constant name, or a numeric representation for unknown values.

type C2cModeInfoV1

type C2cModeInfoV1 struct {
	IsC2cEnabled uint32
}

C2cModeInfoV1 represents C2C Mode information for a device.

type CPERCursorV1

type CPERCursorV1 struct {
	CperTypeMask uint32
	Uuid         [80]byte
	Handle       uint64
}

CPERCursorV1 represents CPER query and cursor parameters.

Groups the filter options and opaque read position used to iterate through CPER records. Cursor semantics for iterative calls: - Pass the same CPERCursorV1 (i.e. the same cursor) on every call in a single iteration sequence. - Do not modify this struct between calls. - To change cperTypeMask or uuid, set handle to CperCursorHandleInit and call again with the updated filter (this starts a new iteration).

type CPERType

type CPERType int32

CPERType represents bitmask of CPER record types.

Multiple values may be combined to request records from several sources in one call.

const (
	CperAccessTypeGpu CPERType = 1 << 0 // Access GPU CPER records
)

func (CPERType) String

func (e CPERType) String() string

String returns the constant name, or a numeric representation for unknown values.

type CallError

type CallError struct {
	Func   string // the C symbol called
	Result Result
}

CallError reports that a library call returned a failure result.

Unwrap returns Result, so errors.Is(err, c) reports whether the call returned the Result constant c, and errors.As(err, &r) with r of type Result recovers the code.

func (*CallError) Error

func (e *CallError) Error() string

Error reports the C symbol called and the result it returned.

func (*CallError) Unwrap

func (e *CallError) Unwrap() error

Unwrap returns the result the call reported.

type ClkMonFaultInfo

type ClkMonFaultInfo struct {
	ClkApiDomain       uint32
	ClkDomainFaultMask uint32
}

ClkMonFaultInfo represents clock Monitor error types.

type ClkMonStatus

type ClkMonStatus struct {
	BGlobalStatus  uint32
	ClkMonListSize uint32
	ClkMonList     [32]ClkMonFaultInfo
}

ClkMonStatus represents clock Monitor Status.

type ClockId

type ClockId int32

ClockId represents clock Ids.

These are used in combination with ClockType to specify a single clock value.

const (
	ClockIdCurrent ClockId = 0 // Current actual clock value
	// ClockIdAppClockTarget: Target application clock.
	//
	// Deprecated: Deprecated by NVIDIA. Do not use.
	ClockIdAppClockTarget ClockId = 1
	// ClockIdAppClockDefault: Default application clock target
	//
	// Deprecated: Deprecated by NVIDIA. Do not use.
	ClockIdAppClockDefault  ClockId = 2
	ClockIdCustomerBoostMax ClockId = 3 // OEM-defined maximum clock rate
	ClockIdCount            ClockId = 4 // Count of Clock Ids.
)

func (ClockId) String

func (e ClockId) String() string

String returns the constant name, or a numeric representation for unknown values.

type ClockLimitId

type ClockLimitId uint32

ClockLimitId represents nvmlClockLimitId_t.

const (
	ClockLimitIdRangeStart ClockLimitId = 0xffffff00
	ClockLimitIdTdp        ClockLimitId = 4294967041
	ClockLimitIdUnlimited  ClockLimitId = 4294967042
)

func (ClockLimitId) String

func (e ClockLimitId) String() string

String returns the constant name, or a numeric representation for unknown values.

type ClockOffset

type ClockOffset struct {
	Version           uint32
	Type              ClockType
	Pstate            Pstates
	ClockOffsetMHz    int32
	MinClockOffsetMHz int32
	MaxClockOffsetMHz int32
}

ClockOffset represents clock offset info.

type ClockOffsetV1

type ClockOffsetV1 = ClockOffset

ClockOffsetV1 is an alias for ClockOffset.

type ClockType

type ClockType int32

ClockType represents clock types.

All speeds are in Mhz.

const (
	ClockGraphics ClockType = 0 // Graphics clock domain
	ClockSm       ClockType = 1 // SM clock domain
	ClockMem      ClockType = 2 // Memory clock domain
	ClockVideo    ClockType = 3 // Video encoder/decoder clock domain
	ClockCount    ClockType = 4 // Count of clock types
)

func (ClockType) String

func (e ClockType) String() string

String returns the constant name, or a numeric representation for unknown values.

type ComputeInstance

type ComputeInstance uintptr

ComputeInstance is an opaque handle for nvmlComputeInstance_t.

func (*ComputeInstance) Close

func (c *ComputeInstance) Close() error

Close destroys compute instance.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user.

Errors:

  • ErrInvalidArgument: If computeInstance is invalid
  • ErrInUse: If the compute instance is in use. This error would be returned if processes (e.g. CUDA application) are active on the compute instance.
  • ErrNoPermission: If user doesn’t have permission to perform the operation
  • ErrUninitialized: If library has not been successfully initialized

If c is zero, Close returns nil. Otherwise Close sets c to zero when the call succeeds and leaves it unchanged when it fails. Only c is zeroed: a copy of it still refers to the released object.

Wraps nvmlComputeInstanceDestroy.

func (ComputeInstance) Info

Info gets compute instance information.

For Ampere or newer fully supported devices. Supported on Linux only.

  • info: Return compute instance information

Errors:

Wraps nvmlComputeInstanceGetInfo, bound as nvmlComputeInstanceGetInfo_v2.

type ComputeInstanceInfo

type ComputeInstanceInfo struct {
	Device      Device
	GpuInstance GpuInstance
	Id          uint32
	ProfileId   uint32
	Placement   ComputeInstancePlacement
}

ComputeInstanceInfo represents nvmlComputeInstanceInfo_t.

type ComputeInstancePlacement

type ComputeInstancePlacement struct {
	Start uint32
	Size  uint32
}

ComputeInstancePlacement represents nvmlComputeInstancePlacement_t.

type ComputeInstanceProfileInfo

type ComputeInstanceProfileInfo struct {
	Id                    uint32
	SliceCount            uint32
	InstanceCount         uint32
	MultiprocessorCount   uint32
	SharedCopyEngineCount uint32
	SharedDecoderCount    uint32
	SharedEncoderCount    uint32
	SharedJpegCount       uint32
	SharedOfaCount        uint32
}

ComputeInstanceProfileInfo represents compute instance profile information.

type ComputeInstanceProfileInfoV2

type ComputeInstanceProfileInfoV2 struct {
	Version               uint32
	Id                    uint32
	SliceCount            uint32
	InstanceCount         uint32
	MultiprocessorCount   uint32
	SharedCopyEngineCount uint32
	SharedDecoderCount    uint32
	SharedEncoderCount    uint32
	SharedJpegCount       uint32
	SharedOfaCount        uint32
	Name                  [96]byte
}

ComputeInstanceProfileInfoV2 represents compute instance profile information (v2).

Version 2 adds the ComputeInstanceProfileInfoV2.version field to the start of the structure, and the ComputeInstanceProfileInfoV2.name field to the end. This structure is not backwards-compatible with ComputeInstanceProfileInfo.

type ComputeInstanceProfileInfoV3

type ComputeInstanceProfileInfoV3 struct {
	Version               uint32
	Id                    uint32
	SliceCount            uint32
	InstanceCount         uint32
	MultiprocessorCount   uint32
	SharedCopyEngineCount uint32
	SharedDecoderCount    uint32
	SharedEncoderCount    uint32
	SharedJpegCount       uint32
	SharedOfaCount        uint32
	Name                  [96]byte
	Capabilities          uint32
}

ComputeInstanceProfileInfoV3 represents compute instance profile information (v3).

Version 3 adds the ComputeInstanceProfileInfoV3.capabilities field ComputeInstanceProfileInfo.

type ComputeMode

type ComputeMode int32

ComputeMode represents compute mode.

ComputemodeExclusiveProcess was added in CUDA 4.0. Earlier CUDA versions supported a single exclusive mode, which is equivalent to ComputemodeExclusiveThread in CUDA 4.0 and beyond.

const (
	ComputemodeDefault          ComputeMode = 0 // Default compute mode -- multiple contexts per device
	ComputemodeExclusiveThread  ComputeMode = 1 // Support Removed
	ComputemodeProhibited       ComputeMode = 2 // Compute-prohibited mode -- no contexts per device
	ComputemodeExclusiveProcess ComputeMode = 3 // Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time
	ComputemodeCount            ComputeMode = 4
)

func (ComputeMode) String

func (e ComputeMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type ConfComputeGetKeyRotationThresholdInfo

type ConfComputeGetKeyRotationThresholdInfo struct {
	Version           uint32
	AttackerAdvantage uint64
}

ConfComputeGetKeyRotationThresholdInfo represents nvmlConfComputeGetKeyRotationThresholdInfo_v1_t.

type ConfComputeGetKeyRotationThresholdInfoV1

type ConfComputeGetKeyRotationThresholdInfoV1 = ConfComputeGetKeyRotationThresholdInfo

ConfComputeGetKeyRotationThresholdInfoV1 is an alias for ConfComputeGetKeyRotationThresholdInfo.

type ConfComputeGpuAttestationReport

type ConfComputeGpuAttestationReport struct {
	IsCecAttestationReportPresent uint32
	AttestationReportSize         uint32
	CecAttestationReportSize      uint32
	Nonce                         [32]uint8
	AttestationReport             [8192]uint8
	CecAttestationReport          [4096]uint8
}

ConfComputeGpuAttestationReport represents nvmlConfComputeGpuAttestationReport_t.

type ConfComputeGpuCertificate

type ConfComputeGpuCertificate struct {
	CertChainSize            uint32
	AttestationCertChainSize uint32
	CertChain                [4096]uint8
	AttestationCertChain     [5120]uint8
}

ConfComputeGpuCertificate represents nvmlConfComputeGpuCertificate_t.

type ConfComputeMemSizeInfo

type ConfComputeMemSizeInfo struct {
	ProtectedMemSizeKib   uint64
	UnprotectedMemSizeKib uint64
}

ConfComputeMemSizeInfo represents protected memory size.

type ConfComputeSetKeyRotationThresholdInfo

type ConfComputeSetKeyRotationThresholdInfo struct {
	Version              uint32
	MaxAttackerAdvantage uint64
}

ConfComputeSetKeyRotationThresholdInfo represents nvmlConfComputeSetKeyRotationThresholdInfo_v1_t.

type ConfComputeSetKeyRotationThresholdInfoV1

type ConfComputeSetKeyRotationThresholdInfoV1 = ConfComputeSetKeyRotationThresholdInfo

ConfComputeSetKeyRotationThresholdInfoV1 is an alias for ConfComputeSetKeyRotationThresholdInfo.

type ConfComputeSystemCaps

type ConfComputeSystemCaps struct {
	CpuCaps  uint32
	GpusCaps uint32
}

ConfComputeSystemCaps represents nvmlConfComputeSystemCaps_t.

type ConfComputeSystemState

type ConfComputeSystemState struct {
	Environment  uint32
	CcFeature    uint32
	DevToolsMode uint32
}

ConfComputeSystemState represents nvmlConfComputeSystemState_t.

func SystemGetConfComputeState

func SystemGetConfComputeState() (ConfComputeSystemState, error)

SystemGetConfComputeState gets Conf Computing System State.

For Ampere or newer fully supported devices. Supported on Linux, Windows TCC.

  • state: System CC State

A nil error means state were successfully queried.

Errors:

Wraps nvmlSystemGetConfComputeState.

type CoolerControl

type CoolerControl int32

CoolerControl represents cooler control type.

const (
	ThermalCoolerSignalNone     CoolerControl = 0 // This cooler has no control signal.
	ThermalCoolerSignalToggle   CoolerControl = 1 // This cooler can only be toggled either ON or OFF (eg a switch).
	ThermalCoolerSignalVariable CoolerControl = 2 // This cooler's level can be adjusted from some minimum to some maximum (eg a knob).
	ThermalCoolerSignalCount    CoolerControl = 3
)

func (CoolerControl) String

func (e CoolerControl) String() string

String returns the constant name, or a numeric representation for unknown values.

type CoolerInfo

type CoolerInfo struct {
	Version    uint32
	Index      uint32
	SignalType CoolerControl
	Target     CoolerTarget
}

CoolerInfo represents nvmlCoolerInfo_v1_t.

type CoolerInfoV1

type CoolerInfoV1 = CoolerInfo

CoolerInfoV1 is an alias for CoolerInfo.

type CoolerTarget

type CoolerTarget int32

CoolerTarget represents Cooler's target.

const (
	ThermalCoolerTargetNone        CoolerTarget = 1 << 0                                                                              // This cooler cools nothing.
	ThermalCoolerTargetGpu         CoolerTarget = 1 << 1                                                                              // This cooler can cool the GPU.
	ThermalCoolerTargetMemory      CoolerTarget = 1 << 2                                                                              // This cooler can cool the memory.
	ThermalCoolerTargetPowerSupply CoolerTarget = 1 << 3                                                                              // This cooler can cool the power supply.
	ThermalCoolerTargetGpuRelated  CoolerTarget = ThermalCoolerTargetGpu | ThermalCoolerTargetMemory | ThermalCoolerTargetPowerSupply // This cooler cools all of the components related to its target gpu. GPU_RELATED = GPU | MEMORY | POWER_SUPPLY
)

func (CoolerTarget) String

func (e CoolerTarget) String() string

String returns the constant name, or a numeric representation for unknown values.

type CoreRailMetrics

type CoreRailMetrics struct {
	Rails [2]RailMetrics
}

CoreRailMetrics represents metrics for all core rails in the system.

type DetachGpuState

type DetachGpuState int32

DetachGpuState is the GPU device to be removed from the kernel by DeviceRemoveGpu.

const (
	DetachGpuKeep   DetachGpuState = 0
	DetachGpuRemove DetachGpuState = 1
)

func (DetachGpuState) String

func (e DetachGpuState) String() string

String returns the constant name, or a numeric representation for unknown values.

type Device

type Device uintptr

Device is an opaque handle for nvmlDevice_t.

func NewDeviceByIndex

func NewDeviceByIndex(index uint32) (Device, error)

NewDeviceByIndex acquires the handle for a particular device, based on its index.

For all products. Valid indices are derived from the accessibleDevices count returned by DeviceGetCount. For example, if accessibleDevices is 2 the valid indices are 0 and 1, corresponding to GPU 0 and GPU 1. The order in which NVML enumerates devices has no guarantees of consistency between reboots. For that reason it is recommended that devices be looked up by their PCI ids or UUID. See NewDeviceByUUID and NewDeviceByPciBusId.

Note: The NVML index may not correlate with other APIs, such as the CUDA device index. Starting from NVML 5, this API causes NVML to initialize the target GPU NVML may initialize additional GPUs if:

  • The target GPU is an SLI slave

Note: New DeviceGetCount (default in NVML 5.319) returns count of all devices in the system even if NewDeviceByIndex returns ErrNoPermission for such device. Update your code to handle this error, or use NVML 4.304 or older nvml header file. For backward binary compatibility reasons _v1 version of the API is still present in the shared library. Old _v1 version of DeviceGetCount doesn’t count devices that NVML has no permission to talk to. This means that NewDeviceByIndex and _v1 can return different devices for the same index. If you don’t touch macros that map old (_v1) versions to _v2 versions at the top of the file you don’t need to worry about that.

See also: Device.Index, DeviceGetCount

  • index: The index of the target GPU, >= 0 and < accessibleDevices
  • device: Reference in which to return the device handle

A nil error means device has been set.

Errors:

Wraps nvmlDeviceGetHandleByIndex, bound as nvmlDeviceGetHandleByIndex_v2.

func NewDeviceByPciBusId

func NewDeviceByPciBusId(pciBusId string) (Device, error)

NewDeviceByPciBusId acquires the handle for a particular device, based on its PCI bus id.

For all products. This value corresponds to the PciInfo.busId returned by Device.PciInfo. Starting from NVML 5, this API causes NVML to initialize the target GPU NVML may initialize additional GPUs if:

  • The target GPU is an SLI slave

Note: NVML 4.304 and older version of NewDeviceByPciBusId”_v1” returns ErrNotFound instead of ErrNoPermission.

  • pciBusId: The PCI bus id of the target GPU Accept the following formats (all numbers in hexadecimal): domain:bus:device.function in format x:x:x.x domain:bus:device in format x:x:x bus:device.function in format x:x.x
  • device: Reference in which to return the device handle

A nil error means device has been set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientPower: if the attached device has improperly attached external power cables
  • ErrInvalidArgument: if pciBusId is invalid or device is NULL
  • ErrIrqIssue: if NVIDIA kernel detected an interrupt issue with the attached GPUs
  • ErrNotFound: if pciBusId does not match a valid device on the system
  • ErrNoPermission: if the user doesn’t have permission to talk to this device
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetHandleByPciBusId, bound as nvmlDeviceGetHandleByPciBusId_v2.

func NewDeviceBySerial deprecated

func NewDeviceBySerial(serial *byte) (Device, error)

NewDeviceBySerial acquires the handle for a particular device, based on its board serial number.

For Fermi or newer fully supported devices. This number corresponds to the value printed directly on the board, and to the value returned by Device.Serial. For dual GPU boards this function will return ErrInvalidArgument. Starting from NVML 5, this API causes NVML to initialize the target GPU NVML may initialize additional GPUs as it searches for the target GPU

See also: Device.Serial, NewDeviceByUUID

  • serial: The board serial number of the target GPU
  • device: Reference in which to return the device handle

A nil error means device has been set.

Errors:

  • ErrGpuIsLost: if any GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientPower: if any attached devices have improperly attached external power cables
  • ErrInvalidArgument: if serial is invalid, device is NULL or more than one device has the same serial (dual GPU boards)
  • ErrIrqIssue: if NVIDIA kernel detected an interrupt issue with the attached GPUs
  • ErrNotFound: if serial does not match a valid device on the system
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetHandleBySerial.

Deprecated: Deprecated in CUDA 13.0. Use NewDeviceByUUID instead. Since more than one GPU can exist on a single board this function is deprecated in favor of NewDeviceByUUID.

func NewDeviceByUUID

func NewDeviceByUUID(uuid string) (Device, error)

NewDeviceByUUID acquires the handle for a particular device, based on its globally unique immutable UUID (in ASCII format) associated with each device.

For all products. Starting from NVML 5, this API causes NVML to initialize the target GPU NVML may initialize additional GPUs as it searches for the target GPU

See also: Device.UUID

  • uuid: The UUID of the target GPU or MIG instance
  • device: Reference in which to return the device handle or MIG device handle

A nil error means device has been set.

Errors:

Wraps nvmlDeviceGetHandleByUUID.

func NewDeviceByUUIDV

func NewDeviceByUUIDV(uuid *UUID) (Device, error)

NewDeviceByUUIDV acquires the handle for a particular device, based on its globally unique immutable UUID (in either ASCII or binary format) associated with each device.

See UUID for more information on the UUID struct. The caller must set the appropriate version prior to calling this API. For all products. This API causes NVML to initialize the target GPU NVML may initialize additional GPUs as it searches for the target GPU

Requires CUDA 12.9 (driver r575) or later; see HasDeviceGetHandleByUUIDV.

  • uuid: The UUID of the target GPU or MIG instance
  • device: Reference in which to return the device handle or MIG device handle

A nil error means device has been set.

Errors:

Wraps nvmlDeviceGetHandleByUUIDV.

func (Device) APIRestriction

func (d Device) APIRestriction(apiType RestrictedAPI, isRestricted *EnableState) error

APIRestriction retrieves the root/admin permissions on the target API.

See RestrictedAPI for the list of supported APIs. If an API is restricted only root users can call that API. See Device.SetAPIRestriction to change current permissions. For all fully supported products.

See also: RestrictedAPI

  • apiType: Target API type for this operation
  • isRestricted: Reference in which to return the current restriction FeatureEnabled indicates that the API is root-only FeatureDisabled indicates that the API is accessible to all users

A nil error means isRestricted has been set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid, apiType incorrect or isRestricted is NULL
  • ErrNotSupported: if this query is not supported by the device or the device does not support the feature that is being queried (E.G. Enabling/disabling Auto Boosted clocks is not supported by the device)
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetAPIRestriction.

func (Device) AccountingBufferSize

func (d Device) AccountingBufferSize(bufferSize *uint32) error

AccountingBufferSize returns the number of processes that the circular buffer with accounting pids can hold.

For Kepler or newer fully supported devices. This is the maximum number of processes that accounting information will be stored for before information about oldest processes will get overwritten by information about new processes.

See also: Device.AccountingStats, Device.AccountingPids

  • bufferSize: Reference in which to provide the size (in number of elements) of the circular buffer for accounting stats

A nil error means buffer size was successfully retrieved.

Errors:

Wraps nvmlDeviceGetAccountingBufferSize.

func (Device) AccountingMode

func (d Device) AccountingMode() (EnableState, error)

AccountingMode queries the state of per process accounting mode.

For Kepler or newer fully supported devices. See Device.AccountingStats for more details. See Device.SetAccountingMode

  • mode: Reference in which to return the current accounting mode

A nil error means the mode has been successfully retrieved.

Errors:

Wraps nvmlDeviceGetAccountingMode.

func (Device) AccountingPids

func (d Device) AccountingPids(buf []uint32) ([]uint32, error)

AccountingPids queries list of processes that can be queried for accounting stats.

The list of processes returned can be in running or terminated state. For Kepler or newer fully supported devices. To query the number of processes under Accounting Mode, call this function with *count = 0 and pids=NULL. The return code will be ErrInsufficientSize with an updated count value indicating the number of processes. For more details see Device.AccountingStats.

Note: In case of PID collision some processes might not be accessible before the circular buffer is full.

See also: Device.AccountingBufferSize

  • count: Reference in which to provide the pids array size, and to return the number of elements ready to be queried
  • pids: Reference in which to return list of process ids

A nil error means pids were successfully retrieved.

Errors:

Wraps nvmlDeviceGetAccountingPids.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) AccountingStats

func (d Device) AccountingStats(pid uint32, stats *AccountingStats) error

AccountingStats queries process’s accounting stats.

For Kepler or newer fully supported devices. Accounting stats capture GPU utilization and other statistics across the lifetime of a process. Accounting stats can be queried during life time of the process and after its termination. The time field in AccountingStats is reported as 0 during the lifetime of the process and updated to actual running time after its termination. Accounting stats are kept in a circular buffer, newly created processes overwrite information about old processes. See AccountingStats for description of each returned metric. List of processes that can be queried can be retrieved from Device.AccountingPids.

Note: Accounting Mode needs to be on. See Device.AccountingMode.

Note: Only compute and graphics applications stats can be queried. Monitoring applications stats can’t be queried since they don’t contribute to GPU utilization.

Note: In case of pid collision stats of only the latest process (that terminated last) will be reported

Warning: On Kepler devices per process statistics are accurate only if there’s one process running on a GPU.

See also: Device.AccountingBufferSize

  • pid: Process Id of the target process to query stats for
  • stats: Reference in which to return the process’s accounting stats

A nil error means stats have been successfully retrieved.

Errors:

Wraps nvmlDeviceGetAccountingStats.

func (Device) AccountingStatsV1

func (d Device) AccountingStatsV1(pid uint32, stats *AccountingStats) error

AccountingStatsV1 queries process’s accounting stats.

For Kepler or newer fully supported devices. Accounting stats capture GPU utilization and other statistics across the lifetime of a process. Accounting stats can be queried during life time of the process and after its termination. The time field in AccountingStats is reported as 0 during the lifetime of the process and updated to actual running time after its termination. Accounting stats are kept in a circular buffer, newly created processes overwrite information about old processes. See AccountingStats for description of each returned metric. List of processes that can be queried can be retrieved from Device.AccountingPids.

Note: Accounting Mode needs to be on. See Device.AccountingMode.

Note: Only compute and graphics applications stats can be queried. Monitoring applications stats can’t be queried since they don’t contribute to GPU utilization.

Note: In case of pid collision stats of only the latest process (that terminated last) will be reported

Warning: On Kepler devices per process statistics are accurate only if there’s one process running on a GPU.

See also: Device.AccountingBufferSize

  • pid: Process Id of the target process to query stats for
  • stats: Reference in which to return the process’s accounting stats

A nil error means stats have been successfully retrieved.

Errors:

Wraps nvmlDeviceGetAccountingStats.

func (Device) AccountingStatsV2

func (d Device) AccountingStatsV2(stats *AccountingStatsV2) error

AccountingStatsV2 queries process’s accounting stats (v2).

For Kepler or newer fully supported devices. Accounting stats (v2) capture GPU utilization and other statistics across the lifetime of a process. Accounting stats (v2) can be queried during life time of the process and after its termination. The time field in AccountingStatsV2 is reported as 0 during the lifetime of the process and updated to actual running time after its termination. Accounting stats (v2) are kept in a circular buffer, newly created processes overwrite information about old processes. See AccountingStatsV2 for description of each returned metric. List of processes that can be queried can be retrieved from Device.AccountingPids.

Note: Accounting Mode needs to be on. See Device.AccountingMode.

Note: Only compute and graphics applications stats can be queried. Monitoring applications stats can’t be queried since they don’t contribute to GPU utilization.

Note: In case of pid collision stats of only the latest process (that terminated last) will be reported

Warning: On Kepler devices per process statistics are accurate only if there’s one process running on a GPU.

See also: Device.AccountingBufferSize

Requires CUDA 13.3 (driver r610) or later; see HasDeviceGetAccountingStatsV2.

  • stats: Reference in which to return the process’s accounting stats (v2)

A nil error means stats (v2) have been successfully retrieved.

Errors:

Wraps nvmlDeviceGetAccountingStats_v2.

func (Device) ActiveVgpus

func (d Device) ActiveVgpus(buf []VgpuInstance) ([]VgpuInstance, error)

ActiveVgpus retrieves the active vGPU instances on a device.

An array of active vGPU instances is returned in the caller-supplied buffer pointed at by vgpuInstances. The array element count is passed in vgpuCount, and vgpuCount is used to return the number of vGPU instances written to the buffer. If the supplied buffer is not large enough to accommodate the vGPU instance array, the function returns ErrInsufficientSize, with the element count of VgpuInstance array required in vgpuCount. To query the number of active vGPU instances, call this function with *vgpuCount = 0. The code will return ErrInsufficientSize, or Success if no vGPU Types are supported. For Kepler or newer fully supported devices.

  • vgpuCount: Pointer which passes in the array size as well as get back the number of types
  • vgpuInstances: Pointer to array in which to return list of vGPU instances

Errors:

Wraps nvmlDeviceGetActiveVgpus.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) AdaptiveClockInfoStatus

func (d Device) AdaptiveClockInfoStatus() (uint32, error)

AdaptiveClockInfoStatus gets the device’s Adaptive Clock status.

A nil error means the current adaptive clocking status is successfully retrieved.

Errors:

Wraps nvmlDeviceGetAdaptiveClockInfoStatus.

func (Device) AdaptiveTgpModeInfo

func (d Device) AdaptiveTgpModeInfo() (AdaptiveTgpModeInfoV1, error)

AdaptiveTgpModeInfo retrieves Adaptive TGP Mode state and telemetry for a GPU.

RUBIN_OR_NEWER% Populates info with the in-band request, out-of-band enablement status, out-of-band override status, arbitrated enablement state, and adjusted base power limit. The adjusted base power is valid only when feature is enabled. See AdaptiveTgpModeInfoV1 for field details.

See also: Device.SetAdaptiveTgpMode

Requires CUDA 13.4 (driver r615) or later; see HasDeviceGetAdaptiveTgpModeInfo.

  • info: Reference in which to return the Adaptive TGP Mode information

A nil error means info has been populated.

Errors:

Wraps nvmlDeviceGetAdaptiveTgpModeInfo_v1.

func (Device) AddressingMode

func (d Device) AddressingMode() (DeviceAddressingMode, error)

AddressingMode gets the addressing mode for a given GPU.

Addressing modes can be one of:

  • HMM: System allocated memory (malloc, mmap) is addressable from the device (GPU), via software-based mirroring of the CPU’s page tables, on the GPU.
  • ATS: System allocated memory (malloc, mmap) is addressable from the device (GPU), via Address Translation Services. This means that there is (effectively) a single set of page tables, and the CPU and GPU both use them.
  • None: Neither HMM nor ATS is active.

For Turing or newer fully supported devices. Supported on Linux only.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceGetAddressingMode.

  • mode: Pointer to addressing mode of the device

A nil error means mode is retrieved successfully.

Errors:

Wraps nvmlDeviceGetAddressingMode.

func (Device) ApplicationsClock deprecated

func (d Device) ApplicationsClock(clockType ClockType) (uint32, error)

ApplicationsClock returns the device's applications clock of the given type, in MHz.

Wraps nvmlDeviceGetApplicationsClock.

Deprecated: Deprecated in CUDA 13.0 and removed in CUDA 14.0. Applications clocks are deprecated and will be removed in CUDA 14.0.

func (Device) Architecture

func (d Device) Architecture() (DeviceArchitecture, error)

Architecture gets architecture for device.

  • arch: Reference where architecture is returned, if call successful. Set to NVML_DEVICE_ARCH_* (DeviceArchitecture) upon success

Errors:

Wraps nvmlDeviceGetArchitecture.

func (Device) Attributes

func (d Device) Attributes(attributes *DeviceAttributes) error

Attributes gets attributes (engine counts etc.) for the given NVML device handle.

For Ampere or newer fully supported devices. Supported on Linux only.

Note: This API currently only supports MIG device handles.

  • attributes: Device attributes

A nil error means device attributes were successfully retrieved.

Errors:

Wraps nvmlDeviceGetAttributes, bound as nvmlDeviceGetAttributes_v2.

func (Device) AutoBoostedClocksEnabled

func (d Device) AutoBoostedClocksEnabled(isEnabled *EnableState, defaultIsEnabled *EnableState) error

AutoBoostedClocksEnabled retrieves the current state of Auto Boosted clocks on a device and stores it in isEnabled.

For Kepler or newer fully supported devices. Auto Boosted clocks are enabled by default on some hardware, allowing the GPU to run at higher clock rates to maximize performance as thermal limits allow. On Pascal and newer hardware, Auto Aoosted clocks are controlled through application clocks. Use Device.SetApplicationsClocks and Device.ResetApplicationsClocks to control Auto Boost behavior.

  • isEnabled: Where to store the current state of Auto Boosted clocks of the target device
  • defaultIsEnabled: Where to store the default Auto Boosted clocks behavior of the target device that the device will revert to when no applications are using the GPU

A nil error means isEnabled has been been set with the Auto Boosted clocks state of device.

Errors:

Wraps nvmlDeviceGetAutoBoostedClocksEnabled.

func (Device) BAR1MemoryInfo

func (d Device) BAR1MemoryInfo() (BAR1Memory, error)

BAR1MemoryInfo gets Total, Available and Used size of BAR1 memory.

BAR1 is used to map the FB (device memory) so that it can be directly accessed by the CPU or by 3rd party devices (peer-to-peer on the PCIE bus). For Kepler or newer fully supported devices.

Note: In MIG mode, if device handle is provided, the API returns aggregate information, only if the caller has appropriate privileges. Per-instance information can be queried by using specific MIG device handles.

  • bar1Memory: Reference in which BAR1 memory information is returned

A nil error means BAR1 memory is successfully retrieved.

Errors:

Wraps nvmlDeviceGetBAR1MemoryInfo.

func (Device) BBXTimeData

func (d Device) BBXTimeData(timeData *BBXTimeDataV1) error

BBXTimeData retrieves the cumulative number of seconds the GPU has had the driver loaded.

For all products with an inforom.

Requires CUDA 13.3 (driver r610) or later; see HasDeviceGetBBXTimeData.

  • timeData: Reference in which to return the cumulative number of seconds the GPU has had the driver loaded

A nil error means timeData has been set.

Errors:

Wraps nvmlDeviceGetBBXTimeData_v1.

func (Device) BankRemapperStatus

func (d Device) BankRemapperStatus(pBankRemapperStatus *EccBankRemapperStatusV1) error

BankRemapperStatus gets bank remapper status.

RUBIN_OR_NEWER%

Requires CUDA 13.4 (driver r615) or later; see HasDeviceGetBankRemapperStatus.

  • pBankRemapperStatus: Reference to nvmlEccBankRemapperStatus_t

A nil error means pBankRemapperStatus was populated.

Errors:

Wraps nvmlDeviceGetBankRemapperStatus_v1.

func (Device) BoardId

func (d Device) BoardId() (uint32, error)

BoardId retrieves the device boardId from 0-N.

Devices with the same boardId indicate GPUs connected to the same PLX. Use in conjunction with Device.MultiGpuBoard to decide if they are on the same board as well. The boardId returned is a unique ID for the current configuration. Uniqueness and ordering across reboots and system configurations is not guaranteed (i.e. if a Tesla K40c returns 0x100 and the two GPUs on a Tesla K10 in the same system returns 0x200 it is not guaranteed they will always return those values but they will always be different from each other). For Fermi or newer fully supported devices.

  • boardId: Reference in which to return the device’s board ID

A nil error means boardId has been set.

Errors:

Wraps nvmlDeviceGetBoardId.

func (Device) BoardPartNumber

func (d Device) BoardPartNumber() (string, error)

BoardPartNumber retrieves the the device board part number which is programmed into the board’s InfoROM.

For all products.

  • partNumber: Reference to the buffer to return
  • length: Length of the buffer reference

A nil error means partNumber has been set.

Errors:

Wraps nvmlDeviceGetBoardPartNumber.

func (Device) Brand

func (d Device) Brand() (BrandType, error)

Brand retrieves the brand of this device.

For all products. The type is a member of BrandType defined above.

  • type_: Reference in which to return the product brand type

A nil error means name has been set.

Errors:

Wraps nvmlDeviceGetBrand.

func (Device) BridgeChipInfo

func (d Device) BridgeChipInfo(bridgeHierarchy *BridgeChipHierarchy) error

BridgeChipInfo gets Bridge Chip Information for all the bridge chips on the board.

For all fully supported products. Only applicable to multi-GPU products.

  • bridgeHierarchy: Reference to the returned bridge chip Hierarchy

A nil error means bridge chip exists.

Errors:

Wraps nvmlDeviceGetBridgeChipInfo.

func (Device) BusType

func (d Device) BusType() (BusType, error)

BusType gets the type of the GPU Bus (PCIe, PCI, …)

return

Parameters:

  • type_: The PCI Bus type

Wraps nvmlDeviceGetBusType.

func (Device) C2cModeInfoV

func (d Device) C2cModeInfoV(c2cModeInfo *C2cModeInfoV1) error

C2cModeInfoV retrieves the Device’s C2C Mode information.

Requires CUDA 12.3 (driver r545) or later; see HasDeviceGetC2cModeInfoV.

  • c2cModeInfo: Output struct containing the device’s C2C Mode info

A nil error means C2C Mode Infor query is successful.

Errors:

Wraps nvmlDeviceGetC2cModeInfoV.

func (Device) Capabilities

func (d Device) Capabilities() (DeviceCapabilities, error)

Capabilities wraps nvmlDeviceGetCapabilities.

Requires CUDA 12.5 (driver r555) or later; see HasDeviceGetCapabilities.

  • caps: Returns GPU's capabilities

func (Device) ClearAccountingPids

func (d Device) ClearAccountingPids() error

ClearAccountingPids clears accounting information about all processes that have already terminated.

For Kepler or newer fully supported devices. Requires root/admin permissions. See Device.AccountingMode See Device.AccountingStats See Device.SetAccountingMode

A nil error means accounting information has been cleared.

Errors:

Wraps nvmlDeviceClearAccountingPids.

func (Device) ClearCpuAffinity

func (d Device) ClearCpuAffinity() error

ClearCpuAffinity clears all affinity bindings for the calling thread.

Note, this is a change as of version 8.0 as older versions cleared the affinity for a calling process and all children. For Kepler or newer fully supported devices. Supported on Linux only.

A nil error means the calling process has been successfully unbound.

Errors:

Wraps nvmlDeviceClearCpuAffinity.

func (Device) ClearEccErrorCounts

func (d Device) ClearEccErrorCounts(counterType EccCounterType) error

ClearEccErrorCounts clears the ECC error and other memory error counts for the device.

For Kepler or newer fully supported devices. Only applicable to devices with ECC. Requires InforomEcc version 2.0 or higher to clear aggregate location-based ECC counts. Requires InforomEcc version 1.0 or higher to clear all other ECC counts. Requires root/admin permissions. Requires ECC Mode to be enabled. Sets all of the specified ECC counters to 0, including both detailed and total counts. This operation takes effect immediately. See MemoryErrorType for details on available counter types.

See also: Device.DetailedEccErrors and Device.TotalEccErrors.

  • counterType: Flag that indicates which type of errors should be cleared

A nil error means the error counts were cleared.

Errors:

Wraps nvmlDeviceClearEccErrorCounts.

func (Device) ClearFieldValues

func (d Device) ClearFieldValues(valuesCount int32, values *FieldValue) error

ClearFieldValues clears values for a list of fields for a device.

This API allows multiple fields to be cleared at once.

  • valuesCount: Number of entries in values that should be cleared
  • values: Array of valuesCount structures to hold field values. Each value’s fieldId must be populated prior to this call

A nil error means any values in values were cleared. Note that you must check the nvmlReturn field of each value for each individual status.

Errors:

Wraps nvmlDeviceClearFieldValues.

func (Device) ClkMonStatus

func (d Device) ClkMonStatus(status *ClkMonStatus) error

ClkMonStatus retrieves the frequency monitor fault status for the device.

For Ampere or newer fully supported devices. Requires root user. See ClkMonStatus for details on decoding the status output.

See also: Device.ClkMonStatus

  • status: Reference in which to return the clkmon fault status

A nil error means status has been set.

Errors:

Wraps nvmlDeviceGetClkMonStatus.

func (Device) Clock

func (d Device) Clock(clockType ClockType, clockId ClockId) (uint32, error)

Clock retrieves the clock speed for the clock specified by the clock type and clock ID.

For Kepler or newer fully supported devices.

  • clockType: Identify which clock domain to query
  • clockId: Identify which clock in the domain to query
  • clockMHz: Reference in which to return the clock in MHz

A nil error means clockMHz has been set.

Errors:

Wraps nvmlDeviceGetClock.

func (Device) ClockInfo

func (d Device) ClockInfo(type_ ClockType) (uint32, error)

ClockInfo retrieves the current clock speeds for the device.

For Fermi or newer fully supported devices. See ClockType for details on available clock information.

  • type_: Identify which clock domain to query
  • clock: Reference in which to return the clock speed in MHz

A nil error means clock has been set.

Errors:

Wraps nvmlDeviceGetClockInfo.

func (Device) ClockOffsets

func (d Device) ClockOffsets(info *ClockOffset) error

ClockOffsets retrieves min, max and current clock offset of some clock domain for a given PState.

For Maxwell or newer fully supported devices.

Note: Device.GpcClkVfOffset, Device.MemClkVfOffset, Device.GpcClkMinMaxVfOffset and Device.MemClkMinMaxVfOffset will be deprecated in a future release. Use Device.ClockOffsets instead.

Requires CUDA 12.5 (driver r555) or later; see HasDeviceGetClockOffsets.

  • info: Structure specifying the clock type (input) and the pstate (input) retrieved clock offset value (output), min clock offset (output) and max clock offset (output)

Errors:

Wraps nvmlDeviceGetClockOffsets.

func (Device) ComputeInstanceId

func (d Device) ComputeInstanceId() (uint32, error)

ComputeInstanceId gets compute instance ID for the given MIG device handle.

Compute instance IDs are unique per GPU instance and remain valid until the compute instance is destroyed. For Ampere or newer fully supported devices. Supported on Linux only.

  • id: Compute instance ID

A nil error means instance ID was successfully retrieved.

Errors:

Wraps nvmlDeviceGetComputeInstanceId.

func (Device) ComputeMode

func (d Device) ComputeMode() (ComputeMode, error)

ComputeMode retrieves the current compute mode for the device or MIG device.

For all products. See ComputeMode for details on allowed compute modes.

Note: If MIG is enabled on a GPU, device must be MIG device handle.

See also: Device.SetComputeMode

  • mode: Reference in which to return the current compute mode

A nil error means mode has been set.

Errors:

Wraps nvmlDeviceGetComputeMode.

func (Device) ComputeRunningProcesses

func (d Device) ComputeRunningProcesses(buf []ProcessInfo) ([]ProcessInfo, error)

ComputeRunningProcesses gets information about processes with a compute context on a device.

For Fermi or newer fully supported devices. This function returns information only about compute running processes (e.g. CUDA application which have active context). Any graphics applications (e.g. using OpenGL, DirectX) won’t be listed by this function. To query the current number of running compute processes, call this function with *infoCount = 0. The return code will be ErrInsufficientSize, or Success if none are running. For this call infos is allowed to be NULL. The usedGpuMemory field returned is all of the memory used by the application. Keep in mind that information returned by this call is dynamic and the number of elements might change in time. Allocate more space for infos table in case new compute processes are spawned.

Note: In MIG mode, if device handle is provided, the API returns aggregate information, only if the caller has appropriate privileges. Per-instance information can be queried by using specific MIG device handles. Querying per-instance information using MIG device handles is not supported if the device is in vGPU Host virtualization mode.

See also: SystemGetProcessName

  • infoCount: Reference in which to provide the infos array size, and to return the number of returned elements
  • infos: Reference in which to return the process information

A nil error means infoCount and infos have been populated.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: if infoCount indicates that the infos array is too small infoCount will contain minimal amount of space necessary for the call to complete
  • ErrInvalidArgument: if device is invalid, either of infoCount or infos is NULL
  • ErrNotSupported: if this query is not supported by device
  • ErrNoPermission: if the user doesn’t have permission to perform this operation
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetComputeRunningProcesses, bound as nvmlDeviceGetComputeRunningProcesses_v3.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

Example

ExampleDevice_ComputeRunningProcesses lists the compute processes on a device. Passing the previous result back in reuses its backing array, so a polling loop settles into zero allocations.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	if err := nvml.Init(); err != nil {
		fmt.Println("NVML unavailable:", err)
		return
	}
	defer nvml.Shutdown()

	dev, err := nvml.NewDeviceByIndex(0)
	if err != nil {
		fmt.Println("no device:", err)
		return
	}
	var procs []nvml.ProcessInfo
	for i := 0; i < 3; i++ {
		procs, err = dev.ComputeRunningProcesses(procs)
		if err != nil {
			return
		}
		fmt.Println("processes:", len(procs))
	}
}

func (Device) ComputeRunningProcessesInto

func (d Device) ComputeRunningProcessesInto(buf []ProcessInfo) (int, error)

ComputeRunningProcessesInto stores information about processes with a compute context on d in buf and returns the number of entries stored. The caller owns buf; entries buf[:n] are valid after a nil error.

It makes exactly one call to nvmlDeviceGetComputeRunningProcesses_v3 with capacity len(buf). Unlike Device.ComputeRunningProcesses, it never retries, allocates no query buffer, and never sizes storage from a count NVML reports: buf is the only storage the call fills. This is not a promise of no heap allocation at all; a returned error, for one, is allocated. A zero length, or one that does not fit in a uint32, is refused before the call and before the NVML library is loaded. If the processes do not fit, it returns an error wrapping ErrInsufficientSize and stores nothing usable; it does not truncate the list. A returned count beyond len(buf) is likewise refused. Errors from the call wrap its Result, so errors.Is reports the NVML error.

One synchronous native call is not a hard wall-time bound: the driver decides how long the call takes, and it cannot be interrupted.

Example
package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	// The caller owns the storage and its length is the only capacity used.
	// An empty buffer is refused before any library or driver call, so this
	// example needs neither; it shows no device data.
	var buf []nvml.ProcessInfo
	n, err := nvml.Device(0).ComputeRunningProcessesInto(buf)
	fmt.Println(n, err)
}
Output:
0 query compute processes: empty buffer
Example (Device)

ExampleDevice_ComputeRunningProcessesInto_device requires an NVML driver and a device. It makes one bounded call; if more than 64 processes hold a compute context, it reports an error instead of a truncated list.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	if err := nvml.Init(); err != nil {
		fmt.Println("NVML unavailable:", err)
		return
	}
	defer nvml.Shutdown()

	device, err := nvml.NewDeviceByIndex(0)
	if err != nil {
		fmt.Println(err)
		return
	}
	buf := make([]nvml.ProcessInfo, 64)
	n, err := device.ComputeRunningProcessesInto(buf)
	if err != nil {
		fmt.Println(err)
		return
	}
	for _, p := range buf[:n] {
		fmt.Println(p.Pid)
	}
}

func (Device) ConfComputeGpuAttestationReport

func (d Device) ConfComputeGpuAttestationReport(gpuAtstReport *ConfComputeGpuAttestationReport) error

ConfComputeGpuAttestationReport gets Conf Computing GPU attestation report.

For Ampere or newer fully supported devices. Supported on Linux, Windows TCC.

  • gpuAtstReport: Reference in which to return the gpu attestation report

A nil error means gpu attestation report has been populated.

Errors:

Wraps nvmlDeviceGetConfComputeGpuAttestationReport.

func (Device) ConfComputeGpuCertificate

func (d Device) ConfComputeGpuCertificate(gpuCert *ConfComputeGpuCertificate) error

ConfComputeGpuCertificate gets Conf Computing GPU certificate details.

For Ampere or newer fully supported devices. Supported on Linux, Windows TCC.

  • gpuCert: Reference in which to return the gpu certificate information

A nil error means gpu certificate info has been populated.

Errors:

Wraps nvmlDeviceGetConfComputeGpuCertificate.

func (Device) ConfComputeMemSizeInfo

func (d Device) ConfComputeMemSizeInfo(memInfo *ConfComputeMemSizeInfo) error

ConfComputeMemSizeInfo gets Conf Computing Protected and Unprotected Memory Sizes.

For Ampere or newer fully supported devices. Supported on Linux, Windows TCC.

  • memInfo: Protected/Unprotected Memory sizes

A nil error means memInfo were successfully queried.

Errors:

Wraps nvmlDeviceGetConfComputeMemSizeInfo.

func (Device) ConfComputeProtectedMemoryUsage

func (d Device) ConfComputeProtectedMemoryUsage() (Memory, error)

ConfComputeProtectedMemoryUsage gets Conf Computing protected memory usage.

For Ampere or newer fully supported devices. Supported on Linux, Windows TCC.

  • memory: Reference in which to return the memory information

A nil error means memory has been populated.

Errors:

Wraps nvmlDeviceGetConfComputeProtectedMemoryUsage.

func (Device) CoolerInfo

func (d Device) CoolerInfo(coolerInfo *CoolerInfo) error

CoolerInfo retrieves the cooler’s information.

Returns a cooler’s control signal characteristics. The possible types are restricted, Variable and Toggle. See CoolerControl for details on available signal types. Returns objects that cooler cools. Targets may be GPU, Memory, Power Supply or All of these. See CoolerTarget for details on available targets. For Maxwell or newer fully supported devices. For all discrete products with dedicated fans.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetCoolerInfo.

  • coolerInfo: Structure specifying the cooler’s control signal characteristics (out) and the target that cooler cools (out)

Errors:

Wraps nvmlDeviceGetCoolerInfo.

func (Device) CpuAffinity

func (d Device) CpuAffinity(cpuSetSize uint32, cpuSet *uint) error

CpuAffinity retrieves an array of unsigned ints (sized to cpuSetSize) of bitmasks with the ideal CPU affinity for the device For example, if processors 0, 1, 32, and 33 are ideal for the device and cpuSetSize == 2, result[0] = 0x3, result[1] = 0x3 This is equivalent to calling Device.CpuAffinityWithinScope with AffinityScopeNode.

For Kepler or newer fully supported devices. Supported on Linux only.

  • cpuSetSize: The size of the cpuSet array that is safe to access
  • cpuSet: Array reference in which to return a bitmask of CPUs, 64 CPUs per unsigned long on 64-bit machines, 32 on 32-bit machines

A nil error means cpuAffinity has been filled.

Errors:

Wraps nvmlDeviceGetCpuAffinity.

func (Device) CpuAffinityWithinScope

func (d Device) CpuAffinityWithinScope(cpuSetSize uint32, cpuSet *uint, scope AffinityScope) error

CpuAffinityWithinScope retrieves an array of unsigned ints (sized to cpuSetSize) of bitmasks with the ideal CPU affinity within node or socket for the device.

For example, if processors 0, 1, 32, and 33 are ideal for the device and cpuSetSize == 2, result[0] = 0x3, result[1] = 0x3 For Kepler or newer fully supported devices. Supported on Linux only.

Note: If requested scope is not applicable to the target topology, the API will fall back to reporting the CPU affinity for the immediate non-I/O ancestor of the device.

  • cpuSetSize: The size of the cpuSet array that is safe to access
  • cpuSet: Array reference in which to return a bitmask of CPUs, 64 CPUs per unsigned long on 64-bit machines, 32 on 32-bit machines
  • scope: Scope that change the default behavior

A nil error means cpuAffinity has been filled.

Errors:

Wraps nvmlDeviceGetCpuAffinityWithinScope.

func (Device) CreatableVgpus

func (d Device) CreatableVgpus(buf []VgpuTypeId) ([]VgpuTypeId, error)

CreatableVgpus retrieves the currently creatable vGPU types on a physical GPU (device).

An array of creatable vGPU types for the physical GPU indicated by device is returned in the caller-supplied buffer pointed at by vgpuTypeIds. The element count of VgpuTypeId array is passed in vgpuCount, and vgpuCount is used to return the number of vGPU types written to the buffer. The creatable vGPU types for a device may differ over time, as there may be restrictions on what type of vGPU types can concurrently run on a device. For example, if only one vGPU type is allowed at a time on a device, then the creatable list will be restricted to whatever vGPU type is already running on the device. If the supplied buffer is not large enough to accommodate the vGPU type array, the function returns ErrInsufficientSize, with the element count of VgpuTypeId array required in vgpuCount. To query the number of vGPU types that can be created for the GPU, call this function with *vgpuCount = 0. The code will return ErrInsufficientSize, or Success if no vGPU types are creatable.

  • vgpuCount: Pointer to caller-supplied array size, and returns number of vGPU types
  • vgpuTypeIds: Pointer to caller-supplied array in which to return list of vGPU types

Errors:

Wraps nvmlDeviceGetCreatableVgpus.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) CreateGpuInstance

func (d Device) CreateGpuInstance(profileId uint32) (GpuInstance, error)

CreateGpuInstance creates GPU instance.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user. If the parent device is unbound, reset or the GPU instance is destroyed explicitly, the GPU instance handle would become invalid. The GPU instance must be recreated to acquire a valid handle.

Errors:

Wraps nvmlDeviceCreateGpuInstance.

func (Device) CreateGpuInstanceWithPlacement

func (d Device) CreateGpuInstanceWithPlacement(profileId uint32, placement *GpuInstancePlacement) (GpuInstance, error)

CreateGpuInstanceWithPlacement creates GPU instance with the specified placement.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user. If the parent device is unbound, reset or the GPU instance is destroyed explicitly, the GPU instance handle would become invalid. The GPU instance must be recreated to acquire a valid handle.

Errors:

Wraps nvmlDeviceCreateGpuInstanceWithPlacement.

func (Device) CudaComputeCapability

func (d Device) CudaComputeCapability() (int32, int32, error)

CudaComputeCapability retrieves the CUDA compute capability of the device.

For all products. Returns the major and minor compute capability version numbers of the device. The major and minor versions are equivalent to the CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR and CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR attributes that would be returned by CUDA’s cuDeviceGetAttribute().

  • major: Reference in which to return the major CUDA compute capability
  • minor: Reference in which to return the minor CUDA compute capability

A nil error means major and minor have been set.

Errors:

Wraps nvmlDeviceGetCudaComputeCapability.

func (Device) CurrPcieLinkGeneration

func (d Device) CurrPcieLinkGeneration() (uint32, error)

CurrPcieLinkGeneration retrieves the current PCIe link generation.

For Fermi or newer fully supported devices.

  • currLinkGen: Reference in which to return the current PCIe link generation

A nil error means currLinkGen has been populated.

Errors:

Wraps nvmlDeviceGetCurrPcieLinkGeneration.

func (Device) CurrPcieLinkWidth

func (d Device) CurrPcieLinkWidth() (uint32, error)

CurrPcieLinkWidth retrieves the current PCIe link width.

For Fermi or newer fully supported devices.

  • currLinkWidth: Reference in which to return the current PCIe link generation

A nil error means currLinkWidth has been populated.

Errors:

Wraps nvmlDeviceGetCurrPcieLinkWidth.

func (Device) CurrentClockFreqs

func (d Device) CurrentClockFreqs(currentClockFreqs *DeviceCurrentClockFreqs) error

CurrentClockFreqs retrieves a string with the associated current GPU Clock and Memory Clock values.

Not all tokens will be reported on all GPUs, and additional tokens may be added in the future.

Note: These clock values take into account the offset set by clients through /ref Device.SetClockOffsets. Clock values are returned as a comma-separated list of “token=value” pairs. Valid tokens: Token Value “perf” unsigned int - the Performance level “nvclock” unsigned int - the GPU clocks (in MHz) for the perf level “nvclockmin” unsigned int - the GPU clocks min (in MHz) for the perf level “nvclockmax” unsigned int - the GPU clocks max (in MHz) for the perf level “nvclockeditable” unsigned int - if the GPU clock domain is editable for the perf level “memclock” unsigned int - the memory clocks (in MHz) for the perf level “memclockmin” unsigned int - the memory clocks min (in MHz) for the perf level “memclockmax” unsigned int - the memory clocks max (in MHz) for the perf level “memclockeditable” unsigned int - if the memory clock domain is editable for the perf level “memtransferrate” unsigned int - the memory transfer rate (in MHz) for the perf level “memtransferratemin” unsigned int - the memory transfer rate min (in MHz) for the perf level “memtransferratemax” unsigned int - the memory transfer rate max (in MHz) for the perf level “memtransferrateeditable” unsigned int - if the memory transfer rate is editable for the perf level Example: nvclock=324, nvclockmin=324, nvclockmax=324, nvclockeditable=0, memclock=324, memclockmin=324, memclockmax=324, memclockeditable=0, memtransferrate=648, memtransferratemin=648, memtransferratemax=648, memtransferrateeditable=0 ;

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetCurrentClockFreqs.

  • currentClockFreqs: Reference in which to return the performance level string

A nil error means currentClockFreqs has been set.

Errors:

Wraps nvmlDeviceGetCurrentClockFreqs.

func (Device) CurrentClocksEventReasons

func (d Device) CurrentClocksEventReasons() (uint64, error)

CurrentClocksEventReasons retrieves current clocks event reasons.

For all fully supported products.

Note: More than one bit can be enabled at the same time. Multiple reasons can be affecting clocks at once.

See also: NvmlClocksEventReasons, Device.SupportedClocksEventReasons

  • clocksEventReasons: Reference in which to return bitmask of active clocks event reasons

A nil error means clocksEventReasons has been set.

Errors:

Wraps nvmlDeviceGetCurrentClocksEventReasons.

func (Device) CurrentClocksThrottleReasons deprecated

func (d Device) CurrentClocksThrottleReasons(clocksThrottleReasons *uint64) error

CurrentClocksThrottleReasons stores the reasons the device's clocks are currently throttled in clocksThrottleReasons.

Wraps nvmlDeviceGetCurrentClocksThrottleReasons.

Deprecated: Deprecated in CUDA 13.0. Use Device.CurrentClocksEventReasons instead.

func (Device) DecoderUtilization

func (d Device) DecoderUtilization() (uint32, uint32, error)

DecoderUtilization retrieves the current utilization and sampling size in microseconds for the Decoder.

For Kepler or newer fully supported devices.

Note: On MIG-enabled GPUs, querying decoder utilization is not currently supported.

  • utilization: Reference to an unsigned int for decoder utilization info
  • samplingPeriodUs: Reference to an unsigned int for the sampling period in US

A nil error means utilization has been populated.

Errors:

Wraps nvmlDeviceGetDecoderUtilization.

func (Device) DefaultApplicationsClock deprecated

func (d Device) DefaultApplicationsClock(clockType ClockType) (uint32, error)

DefaultApplicationsClock returns the device's default applications clock of the given type, in MHz.

Wraps nvmlDeviceGetDefaultApplicationsClock.

Deprecated: Deprecated in CUDA 13.0 and removed in CUDA 14.0. Applications clocks are deprecated and will be removed in CUDA 14.0.

func (Device) DefaultEccMode

func (d Device) DefaultEccMode(defaultMode *EnableState) error

DefaultEccMode retrieves the default ECC modes for the device.

For Fermi or newer fully supported devices. Only applicable to devices with ECC. Requires InforomEcc version 1.0 or higher. See EnableState for details on allowed modes.

See also: Device.SetEccMode

  • defaultMode: Reference in which to return the default ECC mode

A nil error means current and pending have been set.

Errors:

Wraps nvmlDeviceGetDefaultEccMode.

func (Device) DetailedEccErrors deprecated

func (d Device) DetailedEccErrors(errorType MemoryErrorType, counterType EccCounterType) (EccErrorCounts, error)

DetailedEccErrors retrieves the detailed ECC error counts for the device.

This API supports only a fixed set of ECC error locations On different GPU architectures different locations are supported See Device.MemoryErrorCounter For Fermi or newer fully supported devices. Only applicable to devices with ECC. Requires InforomEcc version 2.0 or higher to report aggregate location-based ECC counts. Requires InforomEcc version 1.0 or higher to report all other ECC counts. Requires ECC Mode to be enabled. Detailed errors provide separate ECC counts for specific parts of the memory system. Reports zero for unsupported ECC error counters when a subset of ECC error counters are supported. See MemoryErrorType for a description of available bit types. See EccCounterType for a description of available counter types. See EccErrorCounts for a description of provided detailed ECC counts.

See also: Device.ClearEccErrorCounts

  • errorType: Flag that specifies the type of the errors
  • counterType: Flag that specifies the counter-type of the errors
  • eccCounts: Reference in which to return the specified ECC errors

A nil error means eccCounts has been populated.

Errors:

Wraps nvmlDeviceGetDetailedEccErrors.

Deprecated: Deprecated in CUDA 13.0. Use Device.MemoryErrorCounter instead.

func (Device) DisplayActive

func (d Device) DisplayActive() (EnableState, error)

DisplayActive retrieves the display active state for the device.

For all products. This method indicates whether a display is initialized on the device. For example whether X Server is attached to this device and has allocated memory for the screen. Display can be active even when no monitor is physically attached. See EnableState for details on allowed modes.

  • isActive: Reference in which to return the display active state

A nil error means isActive has been set.

Errors:

Wraps nvmlDeviceGetDisplayActive.

func (Device) DisplayMode

func (d Device) DisplayMode() (EnableState, error)

DisplayMode retrieves the display mode for the device.

For all products. This method indicates whether a physical display (e.g. monitor) is currently connected to any of the device’s connectors. See EnableState for details on allowed modes.

  • display: Reference in which to return the display mode

A nil error means display has been set.

Errors:

Wraps nvmlDeviceGetDisplayMode.

func (Device) DramEncryptionMode

func (d Device) DramEncryptionMode(current *DramEncryptionInfo, pending *DramEncryptionInfo) error

DramEncryptionMode retrieves the current and pending DRAM Encryption modes for the device.

For Blackwell or newer fully supported devices. Only applicable to devices that support DRAM Encryption Requires InforomDen version 1.0 or higher. Changing DRAM Encryption modes requires a reboot. The “pending” DRAM Encryption mode refers to the target mode following the next reboot. See EnableState for details on allowed modes.

See also: Device.SetDramEncryptionMode

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetDramEncryptionMode.

  • current: Reference in which to return the current DRAM Encryption mode
  • pending: Reference in which to return the pending DRAM Encryption mode

A nil error means current and pending have been set.

Errors:

Wraps nvmlDeviceGetDramEncryptionMode.

func (Device) DriverModel

func (d Device) DriverModel(current *DriverModel, pending *DriverModel) error

DriverModel retrieves the current and pending driver model for the device.

For Kepler or newer fully supported devices. For windows only. On Windows platforms the device driver can run in either WDDM, MCDM or WDM (TCC) modes. If a display is attached to the device it must run in WDDM mode. MCDM mode is preferred if a display is not attached. TCC mode is deprecated. Driver-model availability is architecture-specific; attempting to set an unsupported driver model returns ErrNotSupported. See DriverModel for details on available driver models.

See also: nvmlDeviceSetDriverModel_v2()

  • current: Reference in which to return the current driver model
  • pending: Reference in which to return the pending driver model

A nil error means either current and/or pending have been set.

Errors:

Wraps nvmlDeviceGetDriverModel, bound to the first of nvmlDeviceGetDriverModel_v2, nvmlDeviceGetDriverModel that the library exports.

func (Device) DriverModelV1 deprecated

func (d Device) DriverModelV1(current *DriverModel, pending *DriverModel) error

DriverModelV1 wraps nvmlDeviceGetDriverModel_v1.

  • current: Reference in which to return the current driver model
  • pending: Reference in which to return the pending driver model

Wraps nvmlDeviceGetDriverModel_v1, bound as nvmlDeviceGetDriverModel.

Deprecated: NVIDIA removed this function in CUDA 12.5.

func (Device) DriverModelV2

func (d Device) DriverModelV2(current *DriverModel, pending *DriverModel) error

DriverModelV2 retrieves the current and pending driver model for the device.

For Kepler or newer fully supported devices. For windows only. On Windows platforms the device driver can run in either WDDM, MCDM or WDM (TCC) modes. If a display is attached to the device it must run in WDDM mode. MCDM mode is preferred if a display is not attached. TCC mode is deprecated. Driver-model availability is architecture-specific; attempting to set an unsupported driver model returns ErrNotSupported. See DriverModel for details on available driver models.

See also: nvmlDeviceSetDriverModel_v2()

Requires CUDA 12.5 (driver r555) or later; see HasDeviceGetDriverModelV2.

  • current: Reference in which to return the current driver model
  • pending: Reference in which to return the pending driver model

A nil error means either current and/or pending have been set.

Errors:

Wraps nvmlDeviceGetDriverModel, bound as nvmlDeviceGetDriverModel_v2.

func (Device) DynamicPstatesInfo

func (d Device) DynamicPstatesInfo(pDynamicPstatesInfo *GpuDynamicPstatesInfo) error

DynamicPstatesInfo retrieves performance monitor samples from the associated subdevice.

A nil error means pDynamicPstatesInfo has been set.

Errors:

Wraps nvmlDeviceGetDynamicPstatesInfo.

func (Device) EccMode

func (d Device) EccMode(current *EnableState, pending *EnableState) error

EccMode retrieves the current and pending ECC modes for the device.

For Fermi or newer fully supported devices. Only applicable to devices with ECC. Requires InforomEcc version 1.0 or higher. Changing ECC modes requires a reboot. The “pending” ECC mode refers to the target mode following the next reboot. See EnableState for details on allowed modes.

See also: Device.SetEccMode

  • current: Reference in which to return the current ECC mode
  • pending: Reference in which to return the pending ECC mode

A nil error means current and pending have been set.

Errors:

Wraps nvmlDeviceGetEccMode.

func (Device) EncoderCapacity

func (d Device) EncoderCapacity(encoderQueryType EncoderType) (uint32, error)

EncoderCapacity retrieves the current capacity of the device’s encoder, as a percentage of maximum encoder capacity with valid values in the range 0-100.

For Maxwell or newer fully supported devices.

  • encoderQueryType: Type of encoder to query
  • encoderCapacity: Reference to an unsigned int for the encoder capacity

A nil error means encoderCapacity is fetched.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if encoderCapacity is NULL, or device or encoderQueryType are invalid
  • ErrNotSupported: if device does not support the encoder specified in encodeQueryType
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetEncoderCapacity.

func (Device) EncoderSessions

func (d Device) EncoderSessions(buf []EncoderSessionInfo) ([]EncoderSessionInfo, error)

EncoderSessions retrieves information about active encoder sessions on a target device.

An array of active encoder sessions is returned in the caller-supplied buffer pointed at by sessionInfos. The array element count is passed in sessionCount, and sessionCount is used to return the number of sessions written to the buffer. If the supplied buffer is not large enough to accommodate the active session array, the function returns ErrInsufficientSize, with the element count of EncoderSessionInfo array required in sessionCount. To query the number of active encoder sessions, call this function with *sessionCount = 0. The code will return Success with number of active encoder sessions updated in *sessionCount. For Maxwell or newer fully supported devices.

  • sessionCount: Reference to caller supplied array size, and returns the number of sessions
  • sessionInfos: Reference in which to return the session information

A nil error means sessionInfos is fetched.

Errors:

Wraps nvmlDeviceGetEncoderSessions.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) EncoderStats

func (d Device) EncoderStats(sessionCount *uint32, averageFps *uint32, averageLatency *uint32) error

EncoderStats retrieves the current encoder statistics for a given device.

For Maxwell or newer fully supported devices.

  • sessionCount: Reference to an unsigned int for count of active encoder sessions
  • averageFps: Reference to an unsigned int for trailing average FPS of all active sessions
  • averageLatency: Reference to an unsigned int for encode latency in microseconds

A nil error means sessionCount, averageFps and averageLatency is fetched.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if sessionCount, or device or averageFps, or averageLatency is NULL
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetEncoderStats.

func (Device) EncoderUtilization

func (d Device) EncoderUtilization() (uint32, uint32, error)

EncoderUtilization retrieves the current utilization and sampling size in microseconds for the Encoder.

For Kepler or newer fully supported devices.

Note: On MIG-enabled GPUs, querying encoder utilization is not currently supported.

  • utilization: Reference to an unsigned int for encoder utilization info
  • samplingPeriodUs: Reference to an unsigned int for the sampling period in US

A nil error means utilization has been populated.

Errors:

Wraps nvmlDeviceGetEncoderUtilization.

func (Device) EnforcedPowerLimit

func (d Device) EnforcedPowerLimit() (uint32, error)

EnforcedPowerLimit gets the effective power limit that the driver enforces after taking into account all limiters.

Note: This can be different from the Device.PowerManagementLimit if other limits are set elsewhere This includes the out of band power limit interface For Kepler or newer fully supported devices.

  • limit: Reference in which to return the power management limit in milliwatts

A nil error means limit has been set.

Errors:

Wraps nvmlDeviceGetEnforcedPowerLimit.

func (Device) FBCSessions

func (d Device) FBCSessions(buf []FBCSessionInfo) ([]FBCSessionInfo, error)

FBCSessions retrieves information about active frame buffer capture sessions on a target device.

An array of active FBC sessions is returned in the caller-supplied buffer pointed at by sessionInfo. The array element count is passed in sessionCount, and sessionCount is used to return the number of sessions written to the buffer. If the supplied buffer is not large enough to accommodate the active session array, the function returns ErrInsufficientSize, with the element count of FBCSessionInfo array required in sessionCount. To query the number of active FBC sessions, call this function with *sessionCount = 0. The code will return Success with number of active FBC sessions updated in *sessionCount. For Maxwell or newer fully supported devices.

Note: hResolution, vResolution, averageFPS and averageLatency data for a FBC session returned in sessionInfo may be zero if there are no new frames captured since the session started.

  • sessionCount: Reference to caller supplied array size, and returns the number of sessions
  • sessionInfo: Reference in which to return the session information

A nil error means sessionInfo is fetched.

Errors:

Wraps nvmlDeviceGetFBCSessions.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) FBCStats

func (d Device) FBCStats(fbcStats *FBCStats) error

FBCStats retrieves the active frame buffer capture sessions statistics for a given device.

For Maxwell or newer fully supported devices.

  • fbcStats: Reference to FBCStats structure containing NvFBC stats

A nil error means fbcStats is fetched.

Errors:

Wraps nvmlDeviceGetFBCStats.

func (Device) FabricInfo

func (d Device) FabricInfo() (GpuFabricInfoV, error)

FabricInfo returns version 3 fabric information. It preserves the fabric status in the result, separately from the error returned by the query.

Example

ExampleDevice_FabricInfo requires an initialized NVML driver and device.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	device, err := nvml.NewDeviceByIndex(0)
	if err != nil {
		return
	}
	info, err := device.FabricInfo()
	fmt.Println(info.State, info.Status, err)
}

func (Device) FanControlPolicy

func (d Device) FanControlPolicy(fan uint32) (FanControlPolicy, error)

FanControlPolicy gets current fan control policy.

For Maxwell or newer fully supported devices. For all cuda-capable discrete products with fans

  • fan: The index of the target fan, zero indexed
  • policy: Reference in which to return the fan control policy

A nil error means policy has been populated.

Errors:

Wraps nvmlDeviceGetFanControlPolicy_v2.

func (Device) FanSpeed

func (d Device) FanSpeed() (uint32, error)

FanSpeed retrieves the intended operating speed of the device’s fan.

Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the output will not match the actual fan speed. For all discrete products with dedicated fans. The fan speed is expressed as a percentage of the product’s maximum noise tolerance fan speed. This value may exceed 100% in certain cases.

  • speed: Reference in which to return the fan speed percentage

A nil error means speed has been set.

Errors:

Wraps nvmlDeviceGetFanSpeed.

func (Device) FanSpeedRPM

func (d Device) FanSpeedRPM(fanSpeed *FanSpeedInfo) error

FanSpeedRPM retrieves the intended operating speed in rotations per minute (RPM) of the device’s specified fan.

For Maxwell or newer fully supported devices. For all discrete products with dedicated fans.

Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the output will not match the actual fan speed.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetFanSpeedRPM.

  • fanSpeed: Structure specifying the index of the target fan (input) and retrieved fan speed value (output)

Errors:

Wraps nvmlDeviceGetFanSpeedRPM.

func (Device) FanSpeedV1

func (d Device) FanSpeedV1() (uint32, error)

FanSpeedV1 retrieves the intended operating speed of the device’s fan.

Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the output will not match the actual fan speed. For all discrete products with dedicated fans. The fan speed is expressed as a percentage of the product’s maximum noise tolerance fan speed. This value may exceed 100% in certain cases.

  • speed: Reference in which to return the fan speed percentage

A nil error means speed has been set.

Errors:

Wraps nvmlDeviceGetFanSpeed.

func (Device) FanSpeedV2

func (d Device) FanSpeedV2(fan uint32) (uint32, error)

FanSpeedV2 retrieves the intended operating speed of the device’s specified fan.

Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the output will not match the actual fan speed. For all discrete products with dedicated fans. The fan speed is expressed as a percentage of the product’s maximum noise tolerance fan speed. This value may exceed 100% in certain cases.

  • fan: The index of the target fan, zero indexed
  • speed: Reference in which to return the fan speed percentage

A nil error means speed has been set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid, fan is not an acceptable index, or speed is NULL
  • ErrNotSupported: if the device does not have a fan or is newer than Maxwell
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetFanSpeed_v2.

func (Device) FieldValues

func (d Device) FieldValues(valuesCount int32, values *FieldValue) error

FieldValues requests values for a list of fields for a device.

This API allows multiple fields to be queried at once. If any of the underlying fieldIds are populated by the same driver call, the results for those field IDs will be populated from a single call rather than making a driver call for each fieldId.

  • valuesCount: Number of entries in values that should be retrieved
  • values: Array of valuesCount structures to hold field values. Each value’s fieldId must be populated prior to this call

A nil error means any values in values were populated. Note that you must check the nvmlReturn field of each value for each individual status.

Errors:

  • ErrInvalidArgument: if device is invalid or values is NULL previousField Value Enums nextFrame Buffer Capture Structures

Wraps nvmlDeviceGetFieldValues.

func (Device) FieldValuesFor

func (d Device) FieldValuesFor(ids ...uint32) ([]FieldValue, error)

FieldValuesFor queries fields in the given order and preserves each entry's NvmlReturn. An empty list makes no call. At most 65536 fields may be requested.

Example
package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	// Empty requests require neither a loaded driver nor a device.
	values, err := nvml.Device(0).FieldValuesFor()
	fmt.Println(len(values), err)
}
Output:
0 <nil>

func (Device) FreezeNvLinkUtilizationCounter deprecated

func (d Device) FreezeNvLinkUtilizationCounter(link uint32, counter uint32, freeze EnableState) error

FreezeNvLinkUtilizationCounter freezes or unfreezes an NVLink utilization counter.

Freeze the NVLINK utilization counters Both the receive and transmit counters are operated on by this function For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be queried
  • counter: Specifies the counter that should be frozen (0 or 1)
  • freeze: FeatureEnabled = freeze the receive and transmit counters FeatureDisabled = unfreeze the receive and transmit counters

A nil error means counters were successfully frozen or unfrozen.

Errors:

Wraps nvmlDeviceFreezeNvLinkUtilizationCounter.

Deprecated: Deprecated in CUDA 13.0. Freezing NVLINK utilization counters is no longer supported.

func (Device) GpcClkMinMaxVfOffset

func (d Device) GpcClkMinMaxVfOffset() (int32, int32, error)

GpcClkMinMaxVfOffset retrieves the GPCCLK min max VF offset value.

  • minOffset: The retrieved GPCCLK VF min offset value
  • maxOffset: The retrieved GPCCLK VF max offset value

A nil error means offset has been successfully queried.

Errors:

Wraps nvmlDeviceGetGpcClkMinMaxVfOffset.

func (Device) GpcClkVfOffset

func (d Device) GpcClkVfOffset() (int32, error)

GpcClkVfOffset retrieves the GPCCLK VF offset value.

  • offset: The retrieved GPCCLK VF offset value

A nil error means offset has been successfully queried.

Errors:

Wraps nvmlDeviceGetGpcClkVfOffset.

func (Device) GpmMigSampleGet

func (d Device) GpmMigSampleGet(gpuInstanceId uint32, gpmSample GpmSample) error

GpmMigSampleGet reads a sample of GPM metrics into the provided gpmSample buffer for a MIG GPU Instance.

After two samples are gathered, you can call nvmlGpmMetricGet on those samples to retrive metrics For Hopper or newer fully supported devices.

Note: The interval between two Device.GpmMigSampleGet calls should be greater than 100ms due to the internal sample refresh rate.

  • gpuInstanceId: MIG GPU Instance ID
  • gpmSample: Buffer to read samples into

Wraps nvmlGpmMigSampleGet.

func (Device) GpmQueryDeviceSupport

func (d Device) GpmQueryDeviceSupport(gpmSupport *GpmSupport) error

GpmQueryDeviceSupport indicates whether the supplied device supports GPM.

For Hopper or newer fully supported devices.

Note: This API supports the device handle and MIG device handle.

  • gpmSupport: Structure to indicate GPM support GpmSupport. Indicates GPM support per system for the supplied device

Wraps nvmlGpmQueryDeviceSupport.

func (Device) GpmQueryIfStreamingEnabled

func (d Device) GpmQueryIfStreamingEnabled() (uint32, error)

GpmQueryIfStreamingEnabled gets GPM stream state.

For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.

A nil error means current GPM stream state were successfully queried.

Errors:

Wraps nvmlGpmQueryIfStreamingEnabled.

func (Device) GpmSetStreamingEnabled

func (d Device) GpmSetStreamingEnabled(state uint32) error

GpmSetStreamingEnabled sets GPM stream state.

For Hopper or newer fully supported devices. Supported on Linux, Windows TCC.

A nil error means current GPM stream state is successfully set.

Errors:

Wraps nvmlGpmSetStreamingEnabled.

func (Device) GpmSupported

func (d Device) GpmSupported() (bool, error)

GpmSupported queries GPM support using the required structure version.

Example

ExampleDevice_GpmSupported requires an initialized NVML driver and device.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	device, err := nvml.NewDeviceByIndex(0)
	if err != nil {
		return
	}
	supported, err := device.GpmSupported()
	fmt.Println(supported, err)
}

func (Device) GpuFabricInfo deprecated

func (d Device) GpuFabricInfo(gpuFabricInfo *GpuFabricInfo) error

GpuFabricInfo gets fabric information associated with the device.

For Hopper or newer fully supported devices. On Hopper + NVSwitch systems, GPU is registered with the NVIDIA Fabric Manager Upon successful registration, the GPU is added to the NVLink fabric to enable peer-to-peer communication. This API reports the current state of the GPU in the NVLink fabric along with other useful information.

  • gpuFabricInfo: Information about GPU fabric state

Errors:

Wraps nvmlDeviceGetGpuFabricInfo.

Deprecated: Deprecated in CUDA 13.0. Use Device.GpuFabricInfoV instead.

func (Device) GpuFabricInfoV

func (d Device) GpuFabricInfoV(gpuFabricInfo *GpuFabricInfoV2) error

GpuFabricInfoV returns the device's GPU fabric information in a versioned structure, of version 2 or later.

Versioned wrapper around Device.GpuFabricInfo that accepts a versioned GpuFabricInfoV2 or later output structure.

For Hopper or newer fully supported devices.

Note: The caller must set the GpuFabricInfoV2.version field to the appropriate version prior to calling this function.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetGpuFabricInfoV.

  • gpuFabricInfo: Information about GPU fabric state

Errors:

Wraps nvmlDeviceGetGpuFabricInfoV.

Note: This plain method uses the floor V2 payload. Version must be GpuFabricInfoV2Version. Newer V3 payloads use GpuFabricInfoVWithV3Buffer. No version retries are performed.

func (Device) GpuFabricInfoV1 deprecated

func (d Device) GpuFabricInfoV1(gpuFabricInfo *GpuFabricInfo) error

GpuFabricInfoV1 gets fabric information associated with the device.

For Hopper or newer fully supported devices. On Hopper + NVSwitch systems, GPU is registered with the NVIDIA Fabric Manager Upon successful registration, the GPU is added to the NVLink fabric to enable peer-to-peer communication. This API reports the current state of the GPU in the NVLink fabric along with other useful information.

  • gpuFabricInfo: Information about GPU fabric state

Errors:

Wraps nvmlDeviceGetGpuFabricInfo.

Deprecated: Deprecated in CUDA 13.0. Use Device.GpuFabricInfoV instead.

func (Device) GpuFabricInfoV4

func (d Device) GpuFabricInfoV4(gpuFabricInfo *GpuFabricInfoV4) error

GpuFabricInfoV4 retrieves GPU fabric information including per-type clique assignments.

Returns fabric clique data via GpuFabricInfoV4. Each entry in the cliques array is a (type, id) pair representing a single clique assignment. The number of valid entries is given by numCliques. Entries are sorted by ascending type (NVML_GPU_FABRIC_CLIQUE_TYPE_*), then by ascending clique id within each type. On Hopper systems, the driver reports Unicast Pointer and Multicast Pointer cliques. On Blackwell and Rubin, Unicast Logical Endpoint and Multicast Logical Endpoint are additionally reported.

For Hopper or newer fully supported devices.

Requires CUDA 13.4 (driver r615) or later; see HasDeviceGetGpuFabricInfoV4.

  • gpuFabricInfo: Information about GPU fabric state including per-type cliques

Errors:

Wraps nvmlDeviceGetGpuFabricInfo_v4.

func (Device) GpuFabricInfoVWithV3Buffer

func (device Device) GpuFabricInfoVWithV3Buffer(out *GpuFabricInfoV) error

GpuFabricInfoVWithV3Buffer uses the explicit V3 fabric payload (CUDA 13.0). It binds nvmlDeviceGetGpuFabricInfoV, not a separately versioned C function. Version must be GpuFabricInfoV3Version; unsupported versions are returned as errors without retry. V2 callers use Device.GpuFabricInfoV.

Example

ExampleDevice_GpuFabricInfoVWithV3Buffer queries a device's NVLink fabric state. The caller stamps Version with the layout it was compiled against.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	if err := nvml.Init(); err != nil {
		fmt.Println("NVML unavailable:", err)
		return
	}
	defer nvml.Shutdown()

	dev, err := nvml.NewDeviceByIndex(0)
	if err != nil {
		fmt.Println("no device:", err)
		return
	}
	info := nvml.GpuFabricInfoV{Version: nvml.GpuFabricInfoV3Version}
	if err := dev.GpuFabricInfoVWithV3Buffer(&info); err != nil {
		fmt.Println("fabric info:", err)
		return
	}
	fmt.Println("fabric:", info.State, "clique:", info.CliqueId)
}

func (Device) GpuInstanceById

func (d Device) GpuInstanceById(id uint32) (GpuInstance, error)

GpuInstanceById gets GPU instances for given instance ID.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user.

  • id: The GPU instance ID
  • gpuInstance: Returns GPU instance

Errors:

Wraps nvmlDeviceGetGpuInstanceById.

func (Device) GpuInstanceId

func (d Device) GpuInstanceId() (uint32, error)

GpuInstanceId gets GPU instance ID for the given MIG device handle.

GPU instance IDs are unique per device and remain valid until the GPU instance is destroyed. For Ampere or newer fully supported devices. Supported on Linux only.

  • id: GPU instance ID

A nil error means instance ID was successfully retrieved.

Errors:

Wraps nvmlDeviceGetGpuInstanceId.

func (Device) GpuInstanceList

func (d Device) GpuInstanceList(profileID uint32) ([]GpuInstance, error)

GpuInstanceList returns the instances of profileID, using the profile's maximum instance count to allocate the required buffer. At most 65536 instances are accepted. Returned handles remain owned by the caller.

Example

ExampleDevice_GpuInstanceList requires an initialized MIG device.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	device, err := nvml.NewDeviceByIndex(0)
	if err != nil {
		return
	}
	profile, err := device.GpuInstanceProfileInfo(0)
	if err != nil {
		return
	}
	instances, err := device.GpuInstanceList(profile.Id)
	fmt.Println(len(instances), err)
}

func (Device) GpuInstancePossiblePlacements

func (d Device) GpuInstancePossiblePlacements(profileId uint32, placements *GpuInstancePlacement, count *uint32) error

GpuInstancePossiblePlacements gets GPU instance placements.

A placement represents the location of a GPU instance within a device. This API only returns all the possible placements for the given profile regardless of whether MIG is enabled or not. A created GPU instance occupies memory slices described by its placement. Creation of new GPU instance will fail if there is overlap with the already occupied memory slices. For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user.

  • profileId: The GPU instance profile ID. See Device.GpuInstanceProfileInfo
  • placements: Returns placements allowed for the profile. Can be NULL to discover number of allowed placements for this profile. If non-NULL must be large enough to accommodate the placements supported by the profile
  • count: Returns number of allowed placemenets for the profile

Errors:

Wraps nvmlDeviceGetGpuInstancePossiblePlacements, bound as nvmlDeviceGetGpuInstancePossiblePlacements_v2.

func (Device) GpuInstanceProfileInfo

func (d Device) GpuInstanceProfileInfo(profile uint32) (GpuInstanceProfileInfo, error)

GpuInstanceProfileInfo gets GPU instance profile information.

Information provided by this API is immutable throughout the lifetime of a MIG mode. For Ampere or newer fully supported devices. Supported on Linux only.

Note: This API can be used to enumerate all MIG profiles supported by NVML in a forward compatible way by invoking it on profile values starting from 0, until the API returns ErrInvalidArgument.

  • profile: One of the NVML_GPU_INSTANCE_PROFILE_*
  • info: Returns detailed profile information

Errors:

Wraps nvmlDeviceGetGpuInstanceProfileInfo.

func (Device) GpuInstanceProfileInfoByIdV

func (d Device) GpuInstanceProfileInfoByIdV(profileId uint32) (GpuInstanceProfileInfoV2, error)

GpuInstanceProfileInfoByIdV GPU instance profile query function that accepts profile ID, instead of profile name.

It accepts a versioned GpuInstanceProfileInfoV2 or later output structure. For Ampere or newer fully supported devices. Supported on Linux only.

Note: The caller must set the GpuInstanceProfileInfoV2.version field to the appropriate version prior to calling this function.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceGetGpuInstanceProfileInfoByIdV.

  • profileId: One of the profile IDs
  • info: Returns detailed profile information

Errors:

Wraps nvmlDeviceGetGpuInstanceProfileInfoByIdV.

func (Device) GpuInstanceProfileInfoV

func (d Device) GpuInstanceProfileInfoV(profile uint32) (GpuInstanceProfileInfoV2, error)

GpuInstanceProfileInfoV returns information about a GPU instance profile in a versioned structure, of version 2 or later.

Versioned wrapper around Device.GpuInstanceProfileInfo that accepts a versioned GpuInstanceProfileInfoV2 or later output structure.

For Ampere or newer fully supported devices. Supported on Linux only.

Note: The caller must set the GpuInstanceProfileInfoV2.version field to the appropriate version prior to calling this function.

  • profile: One of the NVML_GPU_INSTANCE_PROFILE_*
  • info: Returns detailed profile information

Errors:

Wraps nvmlDeviceGetGpuInstanceProfileInfoV.

func (Device) GpuInstanceRemainingCapacity

func (d Device) GpuInstanceRemainingCapacity(profileId uint32, count *uint32) error

GpuInstanceRemainingCapacity gets GPU instance profile capacity.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user.

Errors:

Wraps nvmlDeviceGetGpuInstanceRemainingCapacity.

func (Device) GpuInstances

func (d Device) GpuInstances(profileId uint32, gpuInstances *GpuInstance, count *uint32) error

GpuInstances gets GPU instances for given profile ID.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user.

Errors:

Wraps nvmlDeviceGetGpuInstances.

func (Device) GpuMaxPcieLinkGeneration

func (d Device) GpuMaxPcieLinkGeneration() (uint32, error)

GpuMaxPcieLinkGeneration retrieves the maximum PCIe link generation supported by this device.

For Fermi or newer fully supported devices.

  • maxLinkGenDevice: Reference in which to return the max PCIe link generation

A nil error means maxLinkGenDevice has been populated.

Errors:

Wraps nvmlDeviceGetGpuMaxPcieLinkGeneration.

func (Device) GpuOperationMode

func (d Device) GpuOperationMode(current *GpuOperationMode, pending *GpuOperationMode) error

GpuOperationMode retrieves the current GOM and pending GOM (the one that GPU will switch to after reboot).

For GK110 M-class and X-class Tesla products from the Kepler family. Modes GomLowDp and GomAllOn are supported on fully supported GeForce products. Not supported on Quadro and Tesla C-class products.

See also: GpuOperationMode, Device.SetGpuOperationMode

  • current: Reference in which to return the current GOM
  • pending: Reference in which to return the pending GOM

A nil error means mode has been populated.

Errors:

Wraps nvmlDeviceGetGpuOperationMode.

func (Device) GpuUptime

func (d Device) GpuUptime(uptime *GpuUptimeV1) error

GpuUptime wraps nvmlDeviceGetGpuUptime_v1.

Requires CUDA 13.5 (driver r620) or later; see HasDeviceGetGpuUptime.

  • uptime: Reference in which to return the GPU uptime

func (Device) GraphicsRunningProcesses

func (d Device) GraphicsRunningProcesses(buf []ProcessInfo) ([]ProcessInfo, error)

GraphicsRunningProcesses gets information about processes with a graphics context on a device.

For Kepler or newer fully supported devices. This function returns information only about graphics based processes (eg. applications using OpenGL, DirectX) To query the current number of running graphics processes, call this function with *infoCount = 0. The return code will be ErrInsufficientSize, or Success if none are running. For this call infos is allowed to be NULL. The usedGpuMemory field returned is all of the memory used by the application. Keep in mind that information returned by this call is dynamic and the number of elements might change in time. Allocate more space for infos table in case new graphics processes are spawned.

Note: In MIG mode, if device handle is provided, the API returns aggregate information, only if the caller has appropriate privileges. Per-instance information can be queried by using specific MIG device handles. Querying per-instance information using MIG device handles is not supported if the device is in vGPU Host virtualization mode.

See also: SystemGetProcessName

  • infoCount: Reference in which to provide the infos array size, and to return the number of returned elements
  • infos: Reference in which to return the process information

A nil error means infoCount and infos have been populated.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: if infoCount indicates that the infos array is too small infoCount will contain minimal amount of space necessary for the call to complete
  • ErrInvalidArgument: if device is invalid, either of infoCount or infos is NULL
  • ErrNotSupported: if this query is not supported by device
  • ErrNoPermission: if the user doesn’t have permission to perform this operation
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetGraphicsRunningProcesses, bound as nvmlDeviceGetGraphicsRunningProcesses_v3.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) GraphicsRunningProcessesInto

func (d Device) GraphicsRunningProcessesInto(buf []ProcessInfo) (int, error)

GraphicsRunningProcessesInto stores information about processes with a graphics context on d in buf and returns the number of entries stored. It makes exactly one call to nvmlDeviceGetGraphicsRunningProcesses_v3 and has the bounds and errors of Device.ComputeRunningProcessesInto. One synchronous native call is not a hard wall-time bound.

Example
package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	// A zero-length buffer is refused before any library or driver call, so
	// this example needs neither; it shows no device data.
	buf := []nvml.ProcessInfo{}
	n, err := nvml.Device(0).GraphicsRunningProcessesInto(buf)
	fmt.Println(n, err)
}
Output:
0 query graphics processes: empty buffer

func (Device) GridLicensableFeatures

func (d Device) GridLicensableFeatures(pGridLicensableFeatures *GridLicensableFeatures) error

GridLicensableFeatures retrieves the vGPU Software licensable features.

Identifies whether the system supports vGPU Software Licensing. If it does, return the list of licensable feature(s) and their current license status.

  • pGridLicensableFeatures: Pointer to structure in which vGPU software licensable features are returned

A nil error means licensable features are successfully retrieved.

Errors:

Wraps nvmlDeviceGetGridLicensableFeatures, bound as nvmlDeviceGetGridLicensableFeatures_v4.

func (Device) GspFirmwareMode

func (d Device) GspFirmwareMode(isEnabled *uint32, defaultMode *uint32) error

GspFirmwareMode retrieves GSP firmware mode.

The caller passes in integer pointers. GSP firmware enablement and default mode information is returned with corresponding parameters. The return value in isEnabled and defaultMode should be treated as boolean.

  • isEnabled: Pointer to specify if GSP firmware is enabled
  • defaultMode: Pointer to specify if GSP firmware is supported by default on device

A nil error means GSP firmware mode is sucessfully retrieved.

Errors:

Wraps nvmlDeviceGetGspFirmwareMode.

func (Device) GspFirmwareVersion

func (d Device) GspFirmwareVersion(version *byte) error

GspFirmwareVersion retrieves GSP firmware version.

The caller passes in buffer via version and corresponding GSP firmware numbered version is returned with the same parameter in string format.

  • version: The retrieved GSP firmware version

A nil error means GSP firmware version is sucessfully retrieved.

Errors:

Wraps nvmlDeviceGetGspFirmwareVersion.

func (Device) HandleFromMigDeviceHandle

func (d Device) HandleFromMigDeviceHandle() (Device, error)

HandleFromMigDeviceHandle gets parent device handle from a MIG device handle.

For Ampere or newer fully supported devices. Supported on Linux only.

  • device: Device handle

A nil error means device handle was successfully created.

Errors:

Wraps nvmlDeviceGetDeviceHandleFromMigDeviceHandle.

func (Device) HostVgpuMode

func (d Device) HostVgpuMode(pHostVgpuMode *HostVgpuMode) error

HostVgpuMode queries if SR-IOV host operation is supported on a vGPU supported device.

Checks whether SR-IOV host capability is supported by the device and the driver, and indicates device is in SR-IOV mode if both of these conditions are true.

  • pHostVgpuMode: Reference in which to return the current vGPU mode

A nil error means device’s vGPU mode has been successfully retrieved.

Errors:

Wraps nvmlDeviceGetHostVgpuMode.

func (Device) Hostname

func (d Device) Hostname(hostname *HostnameV1) error

Hostname gets the hostname for the device.

For Blackwell or newer fully supported devices. Supported on Linux only. Retrieves the hostname string for the GPU device that was set using Device.SetHostname.

See also: Device.SetHostname

Requires CUDA 13.0 (driver r580) or later; see HasDeviceGetHostname.

  • hostname: Reference to the caller-provided HostnameV1 struct to return the hostname

A nil error means the hostname was retrieved successfully.

Errors:

Wraps nvmlDeviceGetHostname_v1.

func (Device) Index

func (d Device) Index() (uint32, error)

Index retrieves the NVML index of this device.

For all products. Valid indices are derived from the accessibleDevices count returned by DeviceGetCount. For example, if accessibleDevices is 2 the valid indices are 0 and 1, corresponding to GPU 0 and GPU 1. The order in which NVML enumerates devices has no guarantees of consistency between reboots. For that reason it is recommended that devices be looked up by their PCI ids or GPU UUID. See NewDeviceByPciBusId and NewDeviceByUUID. When used with MIG device handles this API returns indices that can be passed to Device.MigDeviceHandleByIndex to retrieve an identical handle. MIG device indices are unique within a device.

Note: The NVML index may not correlate with other APIs, such as the CUDA device index.

See also: NewDeviceByIndex, DeviceGetCount

  • index: Reference in which to return the NVML index of the device

A nil error means index has been set.

Errors:

Wraps nvmlDeviceGetIndex.

func (Device) InforomConfigurationChecksum

func (d Device) InforomConfigurationChecksum() (uint32, error)

InforomConfigurationChecksum retrieves the checksum of the configuration stored in the device’s infoROM.

For all products with an inforom. Can be used to make sure that two GPUs have the exact same configuration. Current checksum takes into account configuration stored in PWR and ECC infoROM objects. Checksum can change between driver releases or when user changes configuration (e.g. disable/enable ECC)

  • checksum: Reference in which to return the infoROM configuration checksum

A nil error means checksum has been set.

Errors:

Wraps nvmlDeviceGetInforomConfigurationChecksum.

func (Device) InforomImageVersion

func (d Device) InforomImageVersion() (string, error)

InforomImageVersion retrieves the global infoROM image version.

For all products with an inforom. Image version just like VBIOS version uniquely describes the exact version of the infoROM flashed on the board in contrast to infoROM object version which is only an indicator of supported features. Version string will not exceed 16 characters in length (including the NULL terminator). See DeviceInforomVersionBufferSize.

See also: Device.InforomVersion

  • version: Reference in which to return the infoROM image version
  • length: The maximum allowed length of the string returned in version

A nil error means version has been set.

Errors:

Wraps nvmlDeviceGetInforomImageVersion.

func (Device) InforomVersion

func (d Device) InforomVersion(object InforomObject) (string, error)

InforomVersion retrieves the version information for the device’s infoROM object.

For all products with an inforom. Fermi and higher parts have non-volatile on-board memory for persisting device info, such as aggregate ECC counts. The version of the data structures in this memory may change from time to time. It will not exceed 16 characters in length (including the NULL terminator). See DeviceInforomVersionBufferSize. See InforomObject for details on the available infoROM objects.

See also: Device.InforomImageVersion

  • object: The target infoROM object
  • version: Reference in which to return the infoROM version
  • length: The maximum allowed length of the string returned in version

A nil error means version has been set.

Errors:

Wraps nvmlDeviceGetInforomVersion.

func (Device) IrqNum

func (d Device) IrqNum() (uint32, error)

IrqNum gets the device’s interrupt number.

  • irqNum: The interrupt number associated with the specified device

A nil error means irq number is successfully retrieved.

Errors:

Wraps nvmlDeviceGetIrqNum.

func (Device) IsMigDeviceHandle

func (d Device) IsMigDeviceHandle() (uint32, error)

IsMigDeviceHandle tests if the given handle refers to a MIG device.

A MIG device handle is an NVML abstraction which maps to a MIG compute instance. These overloaded references can be used (with some restrictions) interchangeably with a GPU device handle to execute queries at a per-compute instance granularity. For Ampere or newer fully supported devices. Supported on Linux only.

  • isMigDevice: True when handle refers to a MIG device

A nil error means device status was successfully retrieved.

Errors:

Wraps nvmlDeviceIsMigDeviceHandle.

func (Device) JpgUtilization

func (d Device) JpgUtilization() (uint32, uint32, error)

JpgUtilization retrieves the current utilization and sampling size in microseconds for the JPG.

For Turing or newer fully supported devices.

Note: On MIG-enabled GPUs, querying decoder utilization is not currently supported.

  • utilization: Reference to an unsigned int for jpg utilization info
  • samplingPeriodUs: Reference to an unsigned int for the sampling period in US

A nil error means utilization has been populated.

Errors:

Wraps nvmlDeviceGetJpgUtilization.

func (Device) LastBBXFlushTime

func (d Device) LastBBXFlushTime(timestamp *uint64, durationUs *uint) error

LastBBXFlushTime retrieves the timestamp and the duration of the last flush of the BBX (blackbox) infoROM object during the current run.

For all products with an inforom.

See also: Device.InforomVersion

Requires CUDA 12.3 (driver r545) or later; see HasDeviceGetLastBBXFlushTime.

  • timestamp: The start timestamp of the last BBX Flush
  • durationUs: The duration (us) of the last BBX Flush

A nil error means timestamp and durationUs are successfully retrieved.

Errors:

Wraps nvmlDeviceGetLastBBXFlushTime.

func (Device) LockNvlinkRemapTable

func (d Device) LockNvlinkRemapTable() (NvlinkLockRemapTableV1, error)

LockNvlinkRemapTable wraps nvmlDeviceLockNvlinkRemapTable_v1.

Requires CUDA 13.5 (driver r620) or later; see HasDeviceLockNvlinkRemapTable.

func (Device) MPSComputeRunningProcesses

func (d Device) MPSComputeRunningProcesses(buf []ProcessInfo) ([]ProcessInfo, error)

MPSComputeRunningProcesses gets information about processes with a Multi-Process Service (MPS) compute context on a device.

For Volta or newer fully supported devices. This function returns information only about compute running processes (e.g. CUDA application which have active context) utilizing MPS. Any graphics applications (e.g. using OpenGL, DirectX) won’t be listed by this function. To query the current number of running compute processes, call this function with *infoCount = 0. The return code will be ErrInsufficientSize, or Success if none are running. For this call infos is allowed to be NULL. The usedGpuMemory field returned is all of the memory used by the application. Keep in mind that information returned by this call is dynamic and the number of elements might change in time. Allocate more space for infos table in case new compute processes are spawned.

Note: In MIG mode, if device handle is provided, the API returns aggregate information, only if the caller has appropriate privileges. Per-instance information can be queried by using specific MIG device handles. Querying per-instance information using MIG device handles is not supported if the device is in vGPU Host virtualization mode.

See also: SystemGetProcessName

  • infoCount: Reference in which to provide the infos array size, and to return the number of returned elements
  • infos: Reference in which to return the process information

A nil error means infoCount and infos have been populated.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: if infoCount indicates that the infos array is too small infoCount will contain minimal amount of space necessary for the call to complete
  • ErrInvalidArgument: if device is invalid, either of infoCount or infos is NULL
  • ErrNotSupported: if this query is not supported by device
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetMPSComputeRunningProcesses, bound as nvmlDeviceGetMPSComputeRunningProcesses_v3.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) MPSComputeRunningProcessesInto

func (d Device) MPSComputeRunningProcessesInto(buf []ProcessInfo) (int, error)

MPSComputeRunningProcessesInto stores information about processes with a Multi-Process Service compute context on d in buf and returns the number of entries stored. It makes exactly one call to nvmlDeviceGetMPSComputeRunningProcesses_v3 and has the bounds and errors of Device.ComputeRunningProcessesInto. An entry does not identify an MPS server or client relationship. One synchronous native call is not a hard wall-time bound.

Example
package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	// Capacity beyond the length is not used: the length is zero, so the
	// buffer is refused before any library or driver call. This example needs
	// neither and shows no device data.
	buf := make([]nvml.ProcessInfo, 0, 64)
	n, err := nvml.Device(0).MPSComputeRunningProcessesInto(buf)
	fmt.Println(n, err)
}
Output:
0 query mps compute processes: empty buffer

func (Device) MarginTemperature

func (d Device) MarginTemperature() (MarginTemperature, error)

MarginTemperature retrieves the thermal margin temperature (distance to nearest slowdown threshold).

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetMarginTemperature.

  • marginTempInfo: Versioned structure in which to return the temperature reading

A nil error means the margin temperature was retrieved successfully.

Errors:

Wraps nvmlDeviceGetMarginTemperature.

func (Device) MaxClockInfo

func (d Device) MaxClockInfo(type_ ClockType) (uint32, error)

MaxClockInfo retrieves the maximum clock speeds for the device.

For Fermi or newer fully supported devices. See ClockType for details on available clock information.

Note: Current P0 clocks (reported by Device.ClockInfo) can differ from max clocks by a few MHz.

  • type_: Identify which clock domain to query
  • clock: Reference in which to return the clock speed in MHz

A nil error means clock has been set.

Errors:

Wraps nvmlDeviceGetMaxClockInfo.

func (Device) MaxCustomerBoostClock

func (d Device) MaxCustomerBoostClock(clockType ClockType) (uint32, error)

MaxCustomerBoostClock retrieves the customer defined maximum boost clock speed specified by the given clock type.

For Pascal or newer fully supported devices.

  • clockType: Identify which clock domain to query
  • clockMHz: Reference in which to return the clock in MHz

A nil error means clockMHz has been set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid or clockMHz is NULL or clockType is invalid
  • ErrNotSupported: if the device or the clockType on this device does not support this feature
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetMaxCustomerBoostClock.

func (Device) MaxMigDeviceCount

func (d Device) MaxMigDeviceCount(count *uint32) error

MaxMigDeviceCount gets the maximum number of MIG devices that can exist under a given parent NVML device.

Returns zero if MIG is not supported or enabled. For Ampere or newer fully supported devices. Supported on Linux only.

  • count: Count of MIG devices

A nil error means count was successfully retrieved.

Errors:

Wraps nvmlDeviceGetMaxMigDeviceCount.

func (Device) MaxPcieLinkGeneration

func (d Device) MaxPcieLinkGeneration() (uint32, error)

MaxPcieLinkGeneration retrieves the maximum PCIe link generation possible with this device and system.

I.E. for a generation 2 PCIe device attached to a generation 1 PCIe bus the max link generation this function will report is generation 1. For Fermi or newer fully supported devices.

  • maxLinkGen: Reference in which to return the max PCIe link generation

A nil error means maxLinkGen has been populated.

Errors:

Wraps nvmlDeviceGetMaxPcieLinkGeneration.

func (Device) MaxPcieLinkWidth

func (d Device) MaxPcieLinkWidth() (uint32, error)

MaxPcieLinkWidth retrieves the maximum PCIe link width possible with this device and system.

I.E. for a device with a 16x PCIe bus width attached to a 8x PCIe system bus this function will report a max link width of 8. For Fermi or newer fully supported devices.

  • maxLinkWidth: Reference in which to return the max PCIe link generation

A nil error means maxLinkWidth has been populated.

Errors:

Wraps nvmlDeviceGetMaxPcieLinkWidth.

func (Device) MemClkMinMaxVfOffset

func (d Device) MemClkMinMaxVfOffset() (int32, int32, error)

MemClkMinMaxVfOffset retrieves the MemClk (Memory Clock) min max VF offset value.

  • minOffset: The retrieved MemClk VF min offset value
  • maxOffset: The retrieved MemClk VF max offset value

A nil error means offset has been successfully queried.

Errors:

Wraps nvmlDeviceGetMemClkMinMaxVfOffset.

func (Device) MemClkVfOffset

func (d Device) MemClkVfOffset() (int32, error)

MemClkVfOffset retrieves the MemClk (Memory Clock) VF offset value.

  • offset: The retrieved MemClk VF offset value

A nil error means offset has been successfully queried.

Errors:

Wraps nvmlDeviceGetMemClkVfOffset.

func (Device) MemoryAffinity

func (d Device) MemoryAffinity(nodeSetSize uint32, nodeSet *uint, scope AffinityScope) error

MemoryAffinity retrieves an array of unsigned ints (sized to nodeSetSize) of bitmasks with the ideal memory affinity within node or socket for the device.

For example, if NUMA node 0, 1 are ideal within the socket for the device and nodeSetSize == 1, result[0] = 0x3 For Kepler or newer fully supported devices. Supported on Linux only.

Note: If requested scope is not applicable to the target topology, the API will fall back to reporting the memory affinity for the immediate non-I/O ancestor of the device.

  • nodeSetSize: The size of the nodeSet array that is safe to access
  • nodeSet: Array reference in which to return a bitmask of NODEs, 64 NODEs per unsigned long on 64-bit machines, 32 on 32-bit machines
  • scope: Scope that change the default behavior

A nil error means NUMA node Affinity has been filled.

Errors:

Wraps nvmlDeviceGetMemoryAffinity.

func (Device) MemoryBusWidth

func (d Device) MemoryBusWidth() (uint32, error)

MemoryBusWidth gets the device’s memory bus width.

  • busWidth: The devices’s memory bus width

A nil error means the memory bus width is successfully retrieved.

Errors:

Wraps nvmlDeviceGetMemoryBusWidth.

func (Device) MemoryErrorCounter

func (d Device) MemoryErrorCounter(errorType MemoryErrorType, counterType EccCounterType, locationType MemoryLocation, count *uint64) error

MemoryErrorCounter retrieves the requested memory error counter for the device.

For Fermi or newer fully supported devices. Requires InforomEcc version 2.0 or higher to report aggregate location-based memory error counts. Requires InforomEcc version 1.0 or higher to report all other memory error counts. Only applicable to devices with ECC. Requires ECC Mode to be enabled. See MemoryErrorType for a description of available memory error types. See EccCounterType for a description of available counter types. See MemoryLocation for a description of available counter locations.

Note: On MIG-enabled GPUs, per instance information can be queried using specific MIG device handles. Per instance information is currently only supported for non-DRAM uncorrectable volatile errors. Querying volatile errors using device handles is currently not supported.

  • errorType: Flag that specifies the type of error
  • counterType: Flag that specifies the counter-type of the errors
  • locationType: Specifies the location of the counter
  • count: Reference in which to return the ECC counter

A nil error means count has been populated.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device, bitTyp,e counterType or locationType is invalid, or count is NULL
  • ErrNotSupported: if the device does not support ECC error reporting in the specified memory
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetMemoryErrorCounter.

func (Device) MemoryInfo

func (d Device) MemoryInfo() (Memory, error)

MemoryInfo retrieves the amount of used, free, reserved and total memory available on the device, in bytes.

The reserved amount is supported on version 2 only. For all products. Enabling ECC reduces the amount of total available memory, due to the extra required parity bits. Under WDDM most device memory is allocated and managed on startup by Windows. Under Linux and Windows TCC, the reported amount of used memory is equal to the sum of memory allocated by all active channels on the device. See MemoryV2 for details on available memory info.

Note: In MIG mode, if device handle is provided, the API returns aggregate information, only if the caller has appropriate privileges. Per-instance information can be queried by using specific MIG device handles.

Note: Device.MemoryInfoV2 adds additional memory information.

Note: On systems where GPUs are NUMA nodes, the accuracy of FB memory utilization provided by this API depends on the memory accounting of the operating system. This is because FB memory is managed by the operating system instead of the NVIDIA GPU driver. Typically, pages allocated from FB memory are not released even after the process terminates to enhance performance. In scenarios where the operating system is under memory pressure, it may resort to utilizing FB memory. Such actions can result in discrepancies in the accuracy of memory reporting.

Note: On certain SOC platforms, the integrated GPU (iGPU) does not use a dedicated framebuffer but instead shares memory with the system. As a result, ErrNotSupported will be returned in this case.

  • memory: Reference in which to return the memory information

A nil error means memory has been populated.

Errors:

Wraps nvmlDeviceGetMemoryInfo.

func (Device) MemoryInfoV1

func (d Device) MemoryInfoV1() (Memory, error)

MemoryInfoV1 retrieves the amount of used, free, reserved and total memory available on the device, in bytes.

The reserved amount is supported on version 2 only. For all products. Enabling ECC reduces the amount of total available memory, due to the extra required parity bits. Under WDDM most device memory is allocated and managed on startup by Windows. Under Linux and Windows TCC, the reported amount of used memory is equal to the sum of memory allocated by all active channels on the device. See MemoryV2 for details on available memory info.

Note: In MIG mode, if device handle is provided, the API returns aggregate information, only if the caller has appropriate privileges. Per-instance information can be queried by using specific MIG device handles.

Note: Device.MemoryInfoV2 adds additional memory information.

Note: On systems where GPUs are NUMA nodes, the accuracy of FB memory utilization provided by this API depends on the memory accounting of the operating system. This is because FB memory is managed by the operating system instead of the NVIDIA GPU driver. Typically, pages allocated from FB memory are not released even after the process terminates to enhance performance. In scenarios where the operating system is under memory pressure, it may resort to utilizing FB memory. Such actions can result in discrepancies in the accuracy of memory reporting.

Note: On certain SOC platforms, the integrated GPU (iGPU) does not use a dedicated framebuffer but instead shares memory with the system. As a result, ErrNotSupported will be returned in this case.

  • memory: Reference in which to return the memory information

A nil error means memory has been populated.

Errors:

Wraps nvmlDeviceGetMemoryInfo.

func (Device) MemoryInfoV2

func (d Device) MemoryInfoV2() (MemoryV2, error)

MemoryInfoV2 retrieves the amount of used, free, reserved and total memory available on the device, in bytes.

Device.MemoryInfoV2 accounts separately for reserved memory and includes it in the used memory amount. For all products. Enabling ECC reduces the amount of total available memory, due to the extra required parity bits. Under WDDM most device memory is allocated and managed on startup by Windows. Under Linux and Windows TCC, the reported amount of used memory is equal to the sum of memory allocated by all active channels on the device.

Note: In MIG mode, if device handle is provided, the API returns aggregate information, only if the caller has appropriate privileges. Per-instance information can be queried by using specific MIG device handles.

Note: On systems where GPUs are NUMA nodes, the accuracy of FB memory utilization provided by this API depends on the memory accounting of the operating system. This is because FB memory is managed by the operating system instead of the NVIDIA GPU driver. Typically, pages allocated from FB memory are not released even after the process terminates to enhance performance. In scenarios where the operating system is under memory pressure, it may resort to utilizing FB memory. Such actions can result in discrepancies in the accuracy of memory reporting.

Note: On certain SOC platforms, the integrated GPU (iGPU) does not use a dedicated framebuffer but instead shares memory with the system. As a result, ErrNotSupported will be returned in this case.

  • memory: Reference in which to return the memory information

A nil error means memory has been populated.

Errors:

Wraps nvmlDeviceGetMemoryInfo_v2.

func (Device) MemoryLimits

func (d Device) MemoryLimits(nameSpace uintptr) (GetMemoryLimitsV1, error)

MemoryLimits gets the memory limits of the device for the cgroup partition.

This method will get the current memory limits of the device for the specified cgroup partition, as well as the current memory used against the limits. For all products. For Linux only.

Note: MIG handles are not supported

Requires CUDA 13.4 (driver r615) or later; see HasDeviceGetMemoryLimits.

A nil error means the operation was successful.

Errors:

Wraps nvmlDeviceGetMemoryLimits_v1.

func (Device) MigDeviceHandleByIndex

func (d Device) MigDeviceHandleByIndex(index uint32) (Device, error)

MigDeviceHandleByIndex gets MIG device handle for the given index under its parent NVML device.

If the compute instance is destroyed either explicitly or by destroying, resetting or unbinding the parent GPU instance or the GPU device itself the MIG device handle would remain invalid and must be requested again using this API. Handles may be reused and their properties can change in the process. For Ampere or newer fully supported devices. Supported on Linux only.

  • index: Index of the MIG device
  • migDevice: Reference to the MIG device handle

A nil error means migDevice handle was successfully created.

Errors:

Wraps nvmlDeviceGetMigDeviceHandleByIndex.

func (Device) MigMode

func (d Device) MigMode() (uint32, uint32, error)

MigMode gets MIG mode for the device.

For Ampere or newer fully supported devices. Changing MIG modes may require device unbind or reset. The “pending” MIG mode refers to the target mode following the next activation trigger.

Errors:

Wraps nvmlDeviceGetMigMode.

func (Device) MinMaxClockOfPState

func (d Device) MinMaxClockOfPState(type_ ClockType, pstate Pstates, minClockMHz *uint32, maxClockMHz *uint32) error

MinMaxClockOfPState retrieves min and max clocks of some clock domain for a given PState.

  • type_: Clock domain
  • pstate: PState to query
  • minClockMHz: Reference in which to return min clock frequency
  • maxClockMHz: Reference in which to return max clock frequency

Errors:

Wraps nvmlDeviceGetMinMaxClockOfPState.

func (Device) MinMaxFanSpeed

func (d Device) MinMaxFanSpeed() (uint32, uint32, error)

MinMaxFanSpeed retrieves the min and max fan speed that user can set for the GPU fan.

For all cuda-capable discrete products with fans

  • minSpeed: The minimum speed allowed to set
  • maxSpeed: The maximum speed allowed to set

A nil error means speed has been adjusted.

Errors:

Wraps nvmlDeviceGetMinMaxFanSpeed.

func (Device) MinorNumber

func (d Device) MinorNumber() (uint32, error)

MinorNumber retrieves minor number for the device.

The minor number for the device is such that the Nvidia device node file for each GPU will have the form /dev/nvidia[minor number]. For all products. Supported only for Linux

  • minorNumber: Reference in which to return the minor number for the device

A nil error means the minor number is successfully retrieved.

Errors:

Wraps nvmlDeviceGetMinorNumber.

func (Device) ModuleId

func (d Device) ModuleId() (uint32, error)

ModuleId gets a unique identifier for the device module on the baseboard.

This API retrieves a unique identifier for each GPU module that exists on a given baseboard. For non-baseboard products, this ID would always be 0.

  • moduleId: Unique identifier for the GPU module

A nil error means moduleId has been successfully retrieved.

Errors:

Wraps nvmlDeviceGetModuleId.

func (Device) MultiGpuBoard

func (d Device) MultiGpuBoard() (uint32, error)

MultiGpuBoard retrieves whether the device is on a Multi-GPU Board Devices that are on multi-GPU boards will set multiGpuBool to a non-zero value.

For Fermi or newer fully supported devices.

  • multiGpuBool: Reference in which to return a zero or non-zero value to indicate whether the device is on a multi GPU board

A nil error means multiGpuBool has been set.

Errors:

Wraps nvmlDeviceGetMultiGpuBoard.

func (Device) Name

func (d Device) Name() (string, error)

Name retrieves the name of this device.

For all products. The name is an alphanumeric string that denotes a particular product, e.g. Tesla C2070. It will not exceed 96 characters in length (including the NULL terminator). See DeviceNameV2BufferSize. When used with MIG device handles the API returns MIG device names which can be used to identify devices based on their attributes.

  • name: Reference in which to return the product name
  • length: The maximum allowed length of the string returned in name

A nil error means name has been set.

Errors:

Wraps nvmlDeviceGetName.

func (Device) NumFans

func (d Device) NumFans() (uint32, error)

NumFans retrieves the number of fans on the device.

For all discrete products with dedicated fans.

  • numFans: The number of fans

A nil error means fan number query was successful.

Errors:

Wraps nvmlDeviceGetNumFans.

func (Device) NumGpuCores

func (d Device) NumGpuCores() (uint32, error)

NumGpuCores gets the device’s core count.

Note: On MIG-enabled GPUs, querying the device’s core count is currently not supported using this API. Please use Device.GpuInstanceProfileInfo to fetch the MIG device’s core count.

  • numCores: The number of cores for the specified device

A nil error means GPU core count is successfully retrieved.

Errors:

Wraps nvmlDeviceGetNumGpuCores.

func (Device) NumaNodeId

func (d Device) NumaNodeId() (uint32, error)

NumaNodeId gets the NUMA node of the given GPU device.

This only applies to platforms where the GPUs are NUMA nodes.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetNumaNodeId.

  • node: NUMA node ID of the device

A nil error means the NUMA node is retrieved successfully.

Errors:

Wraps nvmlDeviceGetNumaNodeId.

func (Device) NvLinkCapability

func (d Device) NvLinkCapability(link uint32, capability NvLinkCapability) (uint32, error)

NvLinkCapability retrieves the requested capability from the device’s NvLink for the link specified Please refer to the NvLinkCapability structure for the specific caps that can be queried The return value should be treated as a boolean.

For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be queried
  • capability: Specifies the NvLinkCapability to be queried
  • capResult: A boolean for the queried capability indicating that feature is available

A nil error means capResult has been set.

Errors:

Wraps nvmlDeviceGetNvLinkCapability.

func (Device) NvLinkErrorCounter

func (d Device) NvLinkErrorCounter(link uint32, counter NvLinkErrorCounter) (uint64, error)

NvLinkErrorCounter retrieves the specified error counter value Please refer to NvLinkErrorCounter for error counters that are available.

For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be queried
  • counter: Specifies the NvLink counter to be queried
  • counterValue: Returned counter value

A nil error means counter has been set.

Errors:

Wraps nvmlDeviceGetNvLinkErrorCounter.

func (Device) NvLinkInfo

func (d Device) NvLinkInfo() (NvLinkInfo, error)

NvLinkInfo queries NVLINK information associated with this device.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceGetNvLinkInfo.

A nil error means query is success.

Errors:

Wraps nvmlDeviceGetNvLinkInfo.

func (Device) NvLinkInfoV1

func (d Device) NvLinkInfoV1() (NvLinkInfo, error)

NvLinkInfoV1 queries NVLINK information associated with this device.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceGetNvLinkInfoV1.

A nil error means query is success.

Errors:

Wraps nvmlDeviceGetNvLinkInfo.

func (Device) NvLinkInfoV3

func (d Device) NvLinkInfoV3() (NvLinkInfoV3, error)

NvLinkInfoV3 queries NVLINK information associated with this device.

Requires CUDA 13.5 (driver r620) or later; see HasDeviceGetNvLinkInfoV3.

A nil error means query is success.

Errors:

Wraps nvmlDeviceGetNvLinkInfo_v3.

func (Device) NvLinkRemoteDeviceType

func (d Device) NvLinkRemoteDeviceType(link uint32, pNvLinkDeviceType *IntNvLinkDeviceType) error

NvLinkRemoteDeviceType gets the NVLink device type of the remote device connected over the given link.

  • link: The NVLink link index on the target GPU
  • pNvLinkDeviceType: Pointer in which the output remote device type is returned

A nil error means pNvLinkDeviceType has been set.

Errors:

Wraps nvmlDeviceGetNvLinkRemoteDeviceType.

func (Device) NvLinkRemotePciInfo

func (d Device) NvLinkRemotePciInfo(link uint32) (PciInfo, error)

NvLinkRemotePciInfo retrieves the PCI information for the remote node on a NvLink link Note: pciSubSystemId is not filled in this function and is indeterminate.

For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be queried
  • pci: PciInfo of the remote node for the specified link

A nil error means pci has been set.

Errors:

Wraps nvmlDeviceGetNvLinkRemotePciInfo, bound as nvmlDeviceGetNvLinkRemotePciInfo_v2.

func (Device) NvLinkState

func (d Device) NvLinkState(link uint32) (EnableState, error)

NvLinkState retrieves the state of the device’s NvLink for the link specified.

For Pascal or newer fully supported devices.

A nil error means isActive has been set.

Errors:

Wraps nvmlDeviceGetNvLinkState.

func (Device) NvLinkTelemetrySamples

func (d Device) NvLinkTelemetrySamples(telemetryCount uint32, telemetrySamples uintptr) (NvlinkTelemetrySamplesV1, error)

NvLinkTelemetrySamples retrieves a batch of historical NVLink per-link telemetry samples.

Samples are taken at approximately 100 ms intervals. Intended for use with periodic polling every ~2 seconds. Longer polling intervals are possible, but can result in dropped samples if the supported `sampleCount` is too low for the given polling interval.

%RUBIN_OR_NEWER%

Requires CUDA 13.4 (driver r615) or later; see HasDeviceGetNvLinkTelemetrySamples.

A nil error means the call succeeded.

Errors:

  • ErrGpuIsLost: If the target GPU has fallen off the bus or is otherwise inaccessible.
  • ErrInvalidArgument: If any required pointer is NULL, a given enum value is out of range, a slot’s linkId is out of range, a slot’s sampleCount is non-zero with a NULL samples pointer, or a slot’s sampleCount is greater than the supported sampleCount for the given link.
  • ErrNotSupported: If the given device does not support this API.
  • ErrUnknown: On any unexpected error.

Wraps nvmlDeviceGetNvLinkTelemetrySamples_v1.

func (Device) NvLinkUtilizationControl deprecated

func (d Device) NvLinkUtilizationControl(link uint32, counter uint32, control *NvLinkUtilizationControl) error

NvLinkUtilizationControl gets the NVLINK utilization counter control information for the specified counter, 0 or 1.

Please refer to NvLinkUtilizationControl for the structure definition For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be queried
  • counter: Specifies the counter that should be set (0 or 1)
  • control: A reference to the NvLinkUtilizationControl to place information

A nil error means the control has been set successfully.

Errors:

Wraps nvmlDeviceGetNvLinkUtilizationControl.

Deprecated: Deprecated in CUDA 13.0. Use NvLinkUtilizationControl instead. Getting utilization counter control is no longer supported.

func (Device) NvLinkUtilizationCounter deprecated

func (d Device) NvLinkUtilizationCounter(link uint32, counter uint32, rxcounter *uint64, txcounter *uint64) error

NvLinkUtilizationCounter retrieves the NVLINK utilization counter based on the current control for a specified counter.

In general it is good practice to use Device.SetNvLinkUtilizationControl before reading the utilization counters as they have no default state For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be queried
  • counter: Specifies the counter that should be read (0 or 1)
  • rxcounter: Receive counter return value
  • txcounter: Transmit counter return value

A nil error means rxcounter and txcounter have been successfully set.

Errors:

Wraps nvmlDeviceGetNvLinkUtilizationCounter.

Deprecated: Deprecated in CUDA 13.0. Use Device.FieldValues instead. Use Device.FieldValues with NVML_FI_DEV_NVLINK_THROUGHPUT_* as field values instead.

func (Device) NvLinkVersion

func (d Device) NvLinkVersion(link uint32) (uint32, error)

NvLinkVersion retrieves the version of the device’s NvLink for the link specified.

For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be queried
  • version: Requested NvLink version from NvlinkVersion

A nil error means version has been set.

Errors:

Wraps nvmlDeviceGetNvLinkVersion.

func (Device) NvlinkBwMode

func (d Device) NvlinkBwMode(getBwMode *NvlinkGetBwMode) error

NvlinkBwMode gets the NvLink Reduced Bandwidth Mode for the device.

For Blackwell or newer fully supported devices.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetNvlinkBwMode.

Errors:

Wraps nvmlDeviceGetNvlinkBwMode.

func (Device) NvlinkNvlePrivateInfo

func (d Device) NvlinkNvlePrivateInfo() (NvlinkNvlePrivateInfoV1, error)

NvlinkNvlePrivateInfo wraps nvmlDeviceGetNvlinkNvlePrivateInfo_v1.

Requires CUDA 13.5 (driver r620) or later; see HasDeviceGetNvlinkNvlePrivateInfo.

func (Device) NvlinkRemapTableInfo

func (d Device) NvlinkRemapTableInfo() (NvlinkGetRemapTableInfoV1, error)

NvlinkRemapTableInfo wraps nvmlDeviceGetNvlinkRemapTableInfo_v1.

Requires CUDA 13.5 (driver r620) or later; see HasDeviceGetNvlinkRemapTableInfo.

func (Device) NvlinkSupportedBwModes

func (d Device) NvlinkSupportedBwModes(supportedBwMode *NvlinkSupportedBwModes) error

NvlinkSupportedBwModes gets the supported NvLink Reduced Bandwidth Modes of the device.

For Blackwell or newer fully supported devices.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetNvlinkSupportedBwModes.

Errors:

Wraps nvmlDeviceGetNvlinkSupportedBwModes.

func (Device) OfaUtilization

func (d Device) OfaUtilization() (uint32, uint32, error)

OfaUtilization retrieves the current utilization and sampling size in microseconds for the OFA (Optical Flow Accelerator)

For Turing or newer fully supported devices.

Note: On MIG-enabled GPUs, querying decoder utilization is not currently supported.

  • utilization: Reference to an unsigned int for ofa utilization info
  • samplingPeriodUs: Reference to an unsigned int for the sampling period in US

A nil error means utilization has been populated.

Errors:

Wraps nvmlDeviceGetOfaUtilization.

func (Device) OnSameBoard

func (d Device) OnSameBoard(device2 Device) (int32, error)

OnSameBoard checks if the GPU devices are on the same physical board.

For all fully supported products.

  • device2: The second GPU device
  • onSameBoard: Reference in which to return the status. Non-zero indicates that the GPUs are on the same board

A nil error means onSameBoard has been set.

Errors:

Wraps nvmlDeviceOnSameBoard.

func (Device) P2PStatus

func (d Device) P2PStatus(device2 Device, p2pIndex GpuP2PCapsIndex, p2pStatus *GpuP2PStatus) error

P2PStatus retrieves the status for a given p2p capability index between a given pair of GPU.

  • device2: The second device
  • p2pIndex: p2p Capability Index being looked for between device1 and device2
  • p2pStatus: Reference in which to return the status of the p2pIndex between device1 and device2

A nil error means p2pStatus has been populated.

Errors:

Wraps nvmlDeviceGetP2PStatus.

func (Device) PciInfo

func (d Device) PciInfo() (PciInfo, error)

PciInfo retrieves the PCI attributes of this device.

For all products. See PciInfo for details on the available PCI info.

  • pci: Reference in which to return the PCI info

A nil error means pci has been populated.

Errors:

Wraps nvmlDeviceGetPciInfo, bound as nvmlDeviceGetPciInfo_v3.

func (Device) PciInfoExt

func (d Device) PciInfoExt() (PciInfoExt, error)

PciInfoExt retrieves PCI attributes of this device.

For all products. See PciInfoExt for details on the available PCI info.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetPciInfoExt.

  • pci: Reference in which to return the PCI info

A nil error means pci has been populated.

Errors:

Wraps nvmlDeviceGetPciInfoExt.

func (Device) PcieLinkMaxSpeed

func (d Device) PcieLinkMaxSpeed() (uint32, error)

PcieLinkMaxSpeed gets the device’s PCIE Max Link speed in MBPS.

  • maxSpeed: The devices’s PCIE Max Link speed in MBPS

A nil error means PCIe Max Link Speed is successfully retrieved.

Errors:

Wraps nvmlDeviceGetPcieLinkMaxSpeed.

func (Device) PcieReplayCounter

func (d Device) PcieReplayCounter() (uint32, error)

PcieReplayCounter retrieves the PCIe replay counter.

For Kepler or newer fully supported devices.

  • value: Reference in which to return the counter’s value

A nil error means value has been set.

Errors:

Wraps nvmlDeviceGetPcieReplayCounter.

func (Device) PcieSpeed

func (d Device) PcieSpeed() (uint32, error)

PcieSpeed gets the device’s PCIe Link speed in Mbps.

  • pcieSpeed: The devices’s PCIe Max Link speed in Mbps

A nil error means pcieSpeed has been retrieved.

Errors:

Wraps nvmlDeviceGetPcieSpeed.

func (Device) PcieThroughput

func (d Device) PcieThroughput(counter PcieUtilCounter) (uint32, error)

PcieThroughput retrieves PCIe utilization information.

This function is querying a byte counter over a 20ms interval and thus is the PCIe throughput over that interval. For Maxwell or newer fully supported devices. This method is not supported in virtual machines running virtual GPU (vGPU).

  • counter: The specific counter that should be queried PcieUtilCounter
  • value: Reference in which to return throughput in KB/s

A nil error means value has been set.

Errors:

Wraps nvmlDeviceGetPcieThroughput.

func (Device) Pdi

func (d Device) Pdi() (Pdi, error)

Pdi retrieves the Per Device Identifier (PDI) associated with this device.

For Pascal or newer fully supported devices. See Pdi for more information on the struct.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceGetPdi.

  • pdi: Reference to the caller-provided structure to return the GPU PDI

A nil error means pdi has been set.

Errors:

Wraps nvmlDeviceGetPdi.

func (Device) PerfMetricsGetSamples

func (d Device) PerfMetricsGetSamples() (PerfMetricsSamplesV1, error)

PerfMetricsGetSamples gets Performance Metric samples.

See PerfMetricsSamplesV1 for more information on the struct.

Requires CUDA 13.4 (driver r615) or later; see HasDevicePerfMetricsGetSamples.

Errors:

Wraps nvmlDevicePerfMetricsGetSamples_v1.

func (Device) PerformanceModes

func (d Device) PerformanceModes(perfModes *DevicePerfModes) error

PerformanceModes retrieves a performance mode string with all the performance modes defined for this device along with their associated GPU Clock and Memory Clock values.

Not all tokens will be reported on all GPUs, and additional tokens may be added in the future. For backwards compatibility we still provide nvclock and memclock; those are the same as nvclockmin and memclockmin.

Note: These clock values take into account the offset set by clients through /ref Device.SetClockOffsets. Maximum available Pstate (P15) shows the minimum performance level (0) and vice versa. Each performance modes are returned as a comma-separated list of “token=value” pairs. Each set of performance mode tokens are separated by a “;”. Valid tokens: Token Value “perf” unsigned int - the Performance level “nvclock” unsigned int - the GPU clocks (in MHz) for the perf level “nvclockmin” unsigned int - the GPU clocks min (in MHz) for the perf level “nvclockmax” unsigned int - the GPU clocks max (in MHz) for the perf level “nvclockeditable” unsigned int - if the GPU clock domain is editable for the perf level “memclock” unsigned int - the memory clocks (in MHz) for the perf level “memclockmin” unsigned int - the memory clocks min (in MHz) for the perf level “memclockmax” unsigned int - the memory clocks max (in MHz) for the perf level “memclockeditable” unsigned int - if the memory clock domain is editable for the perf level “memtransferrate” unsigned int - the memory transfer rate (in MHz) for the perf level “memtransferratemin” unsigned int - the memory transfer rate min (in MHz) for the perf level “memtransferratemax” unsigned int - the memory transfer rate max (in MHz) for the perf level “memtransferrateeditable” unsigned int - if the memory transfer rate is editable for the perf level Example: perf=0, nvclock=324, nvclockmin=324, nvclockmax=324, nvclockeditable=0, memclock=324, memclockmin=324, memclockmax=324, memclockeditable=0, memtransferrate=648, memtransferratemin=648, memtransferratemax=648, memtransferrateeditable=0 ; perf=1, nvclock=324, nvclockmin=324, nvclockmax=640, nvclockeditable=0, memclock=810, memclockmin=810, memclockmax=810, memclockeditable=0, memtransferrate=1620, memtransferrate=1620, memtransferrate=1620, memtransferrateeditable=0 ;

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetPerformanceModes.

  • perfModes: Reference in which to return the performance level string

A nil error means perfModes has been set.

Errors:

Wraps nvmlDeviceGetPerformanceModes.

func (Device) PerformanceState

func (d Device) PerformanceState() (Pstates, error)

PerformanceState retrieves the current performance state for the device.

For Fermi or newer fully supported devices. See Pstates for details on allowed performance states.

  • pState: Reference in which to return the performance state reading

A nil error means pState has been set.

Errors:

Wraps nvmlDeviceGetPerformanceState.

func (Device) PersistenceMode

func (d Device) PersistenceMode() (EnableState, error)

PersistenceMode retrieves the persistence mode associated with this device.

For all products. For Linux only. When driver persistence mode is enabled the driver software state is not torn down when the last client disconnects. By default this feature is disabled. See EnableState for details on allowed modes.

See also: Device.SetPersistenceMode

  • mode: Reference in which to return the current driver persistence mode

A nil error means mode has been set.

Errors:

Wraps nvmlDeviceGetPersistenceMode.

func (Device) PgpuMetadataString

func (d Device) PgpuMetadataString(pgpuMetadata *byte, bufferSize *uint32) error

PgpuMetadataString returns the properties of the physical GPU indicated by the device in an ascii-encoded string format.

The caller passes in a buffer via pgpuMetadata, with the size of the buffer in bufferSize. If the string is too large to fit in the supplied buffer, the function returns ErrInsufficientSize with the size needed in bufferSize.

  • pgpuMetadata: Pointer to caller-supplied buffer into which pgpuMetadata is written
  • bufferSize: Pointer to size of pgpuMetadata buffer

A nil error means GPU metadata structure was successfully returned.

Errors:

  • ErrInsufficientSize: pgpuMetadata buffer is too small, required size is returned in bufferSize
  • ErrInvalidArgument: If bufferSize is NULL or device is invalid; if pgpuMetadata is NULL and the value of bufferSize is not 0.
  • ErrNotSupported: If vGPU is not supported by the system
  • ErrUnknown: On any unexpected error

Wraps nvmlDeviceGetPgpuMetadataString.

func (Device) PlatformInfo

func (d Device) PlatformInfo(platformInfo *PlatformInfo) error

PlatformInfo gets platform information of this device.

For Blackwell or newer fully supported devices. See PlatformInfo for more information on the struct.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetPlatformInfo.

  • platformInfo: Pointer to the caller-provided structure of PlatformInfo

A nil error means platformInfo has been retrieved.

Errors:

Wraps nvmlDeviceGetPlatformInfo.

func (Device) PowerManagementDefaultLimit

func (d Device) PowerManagementDefaultLimit() (uint32, error)

PowerManagementDefaultLimit retrieves default power management limit on this device, in milliwatts.

Default power management limit is a power management limit that the device boots with. For Kepler or newer fully supported devices.

  • defaultLimit: Reference in which to return the default power management limit in milliwatts

A nil error means defaultLimit has been set.

Errors:

Wraps nvmlDeviceGetPowerManagementDefaultLimit.

func (Device) PowerManagementLimit

func (d Device) PowerManagementLimit() (uint32, error)

PowerManagementLimit retrieves the power management limit associated with this device.

For Fermi or newer fully supported devices. The power limit defines the upper boundary for the card’s power draw. If the card’s total power draw reaches this limit the power management algorithm kicks in. This reading is only available if power management mode is supported. See Device.PowerManagementMode.

  • limit: Reference in which to return the power management limit in milliwatts

A nil error means limit has been set.

Errors:

Wraps nvmlDeviceGetPowerManagementLimit.

func (Device) PowerManagementLimitConstraints

func (d Device) PowerManagementLimitConstraints(minLimit *uint32, maxLimit *uint32) error

PowerManagementLimitConstraints retrieves information about possible values of power management limits on this device.

For Kepler or newer fully supported devices.

See also: Device.SetPowerManagementLimit

  • minLimit: Reference in which to return the minimum power management limit in milliwatts
  • maxLimit: Reference in which to return the maximum power management limit in milliwatts

A nil error means minLimit and maxLimit have been set.

Errors:

Wraps nvmlDeviceGetPowerManagementLimitConstraints.

func (Device) PowerManagementMode deprecated

func (d Device) PowerManagementMode() (EnableState, error)

PowerManagementMode retrieves the power management mode associated with this device.

For products from the Fermi family.

For from the Kepler or newer families.

This flag indicates whether any power management algorithm is currently active on the device. An enabled state does not necessarily mean the device is being actively throttled — only that that the driver will do so if the appropriate conditions are met. See EnableState for details on allowed modes.

  • mode: Reference in which to return the current power management mode

A nil error means mode has been set.

Errors:

Wraps nvmlDeviceGetPowerManagementMode.

Deprecated: Deprecated in CUDA 13.0. Use EnableState instead.

func (Device) PowerMizerMode

func (d Device) PowerMizerMode(powerMizerMode *DevicePowerMizerModesV1) error

PowerMizerMode retrieves current power mizer mode on this device.

PowerMizerMode provides a hint to the driver as to how to manage the performance of the GPU. For Maxwell or newer fully supported devices.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceGetPowerMizerMode.

  • powerMizerMode: Reference in which to return the power mizer mode

A nil error means powerMizerMode has been populated.

Errors:

Wraps nvmlDeviceGetPowerMizerMode_v1.

func (Device) PowerSmoothingActivatePresetProfile

func (d Device) PowerSmoothingActivatePresetProfile(profile *PowerSmoothingProfile) error

PowerSmoothingActivatePresetProfile activates a preset profile for datacenter power smoothing.

Activiate a specific preset profile for datacenter power smoothing.

The API only sets the active preset profile based on the input profileId, and ignores the other parameters of the structure. Requires root/admin permissions. For Blackwell or newer fully supported devices.

Requires CUDA 12.8 (driver r570) or later; see HasDevicePowerSmoothingActivatePresetProfile.

  • profile: Reference to PowerSmoothingProfile. Note that only profile->profileId is used and the rest of the structure is ignored

A nil error means the Desired Profile was successfully set.

Errors:

Wraps nvmlDevicePowerSmoothingActivatePresetProfile.

func (Device) PowerSmoothingSetState

func (d Device) PowerSmoothingSetState(state *PowerSmoothingState) error

PowerSmoothingSetState enables or disables the Power Smoothing Feature.

Requires root/admin permissions. For Blackwell or newer fully supported devices. See EnableState for details on allowed states

Requires CUDA 12.8 (driver r570) or later; see HasDevicePowerSmoothingSetState.

A nil error means the feature state was successfully set.

Errors:

Wraps nvmlDevicePowerSmoothingSetState.

func (Device) PowerSmoothingUpdatePresetProfileParam

func (d Device) PowerSmoothingUpdatePresetProfileParam(profile *PowerSmoothingProfile) error

PowerSmoothingUpdatePresetProfileParam updates the value of a specific profile parameter contained within PowerSmoothingProfile.

Requires root/admin permissions. For Blackwell or newer fully supported devices. PowerSmoothingProfileParamPercentTmpFloor expects a value as a percentage from 00.00-100.00% PowerSmoothingProfileParamRampUpRate expects a value in W/s PowerSmoothingProfileParamRampDownRate expects a value in W/s PowerSmoothingProfileParamRampDownHysteresis expects a value in ms

Requires CUDA 12.8 (driver r570) or later; see HasDevicePowerSmoothingUpdatePresetProfileParam.

A nil error means the Active Profile was successfully set.

Errors:

Wraps nvmlDevicePowerSmoothingUpdatePresetProfileParam.

func (Device) PowerSource

func (d Device) PowerSource() (PowerSource, error)

PowerSource gets the devices power source.

  • powerSource: The power source of the device

A nil error means the current power source was successfully retrieved.

Errors:

Wraps nvmlDeviceGetPowerSource.

func (Device) PowerState deprecated

func (d Device) PowerState() (Pstates, error)

PowerState returns the device's current performance state.

This function exposes an incorrect generalization. Retrieve the current performance state for the device. For Fermi or newer fully supported devices. See Pstates for details on allowed performance states.

  • pState: Reference in which to return the performance state reading

A nil error means pState has been set.

Errors:

Wraps nvmlDeviceGetPowerState.

Deprecated: Deprecated in CUDA 13.0. Use Device.PerformanceState instead.

func (Device) PowerUsage

func (d Device) PowerUsage() (uint32, error)

PowerUsage retrieves power usage for this GPU in milliwatts and its associated circuitry (e.g.

memory) For Fermi or newer fully supported devices. On Fermi and Kepler GPUs the reading is accurate to within +/- 5% of current power draw. On Ampere (except GA100) or newer GPUs, the API returns power averaged over 1 sec interval. On GA100 and older architectures, instantaneous power is returned. See FieldDevPowerAverage and FieldDevPowerInstant to query specific power values. It is only available if power management mode is supported. See Device.PowerManagementMode.

  • power: Reference in which to return the power usage information

A nil error means power has been populated.

Errors:

Wraps nvmlDeviceGetPowerUsage.

func (Device) ProcessUtilization

func (d Device) ProcessUtilization(lastSeenTimeStamp uint64, buf []ProcessUtilizationSample) ([]ProcessUtilizationSample, error)

ProcessUtilization retrieves the current utilization and process ID.

For Maxwell or newer fully supported devices. Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, and video decoder for processes running. Utilization values are returned as an array of utilization sample structures in the caller-supplied buffer pointed at by utilization. One utilization sample structure is returned per process running, that had some non-zero utilization during the last sample period. It includes the CPU timestamp at which the samples were recorded. Individual utilization values are returned as “unsigned int” values. If no valid sample entries are found since the lastSeenTimeStamp, ErrNotFound is returned. To read utilization values, first determine the size of buffer required to hold the samples by invoking the function with utilization set to NULL. The caller should allocate a buffer of size processSamplesCount * sizeof(ProcessUtilizationSample). Invoke the function again with the allocated buffer passed in utilization, and processSamplesCount set to the number of entries the buffer is sized for. On successful return, the function updates processSamplesCount with the number of process utilization sample structures that were actually written. This may differ from a previously read value as instances are created or destroyed. lastSeenTimeStamp represents the CPU timestamp in microseconds at which utilization samples were last read. Set it to 0 to read utilization based on all the samples maintained by the driver’s internal sample buffer. Set lastSeenTimeStamp to a timeStamp retrieved from a previous query to read utilization since the previous query.

Note: On MIG-enabled GPUs, querying process utilization is not currently supported.

  • utilization: Pointer to caller-supplied buffer in which guest process utilization samples are returned
  • processSamplesCount: Pointer to caller-supplied array size, and returns number of processes running
  • lastSeenTimeStamp: Return only samples with timestamp greater than lastSeenTimeStamp

A nil error means utilization has been populated.

Errors:

Wraps nvmlDeviceGetProcessUtilization.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) ProcessesUtilization

func (d Device) ProcessesUtilization(lastSeen uint64) ([]ProcessUtilizationInfoV1, error)

ProcessesUtilization returns process samples newer than lastSeen, in CPU timestamp microseconds. It retries a growing buffer at most four times and rejects counts above 65536. ErrNotFound and other driver errors are preserved. NVML does not support this query on MIG-enabled devices.

Example

ExampleDevice_ProcessesUtilization requires an initialized NVML driver.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	device, err := nvml.NewDeviceByIndex(0)
	if err != nil {
		return
	}
	samples, err := device.ProcessesUtilization(0)
	fmt.Println(len(samples), err)
}

func (Device) ProcessesUtilizationInfo

func (d Device) ProcessesUtilizationInfo(procesesUtilInfo *ProcessesUtilizationInfo) error

ProcessesUtilizationInfo retrieves the recent utilization and process ID for all running processes.

For Maxwell or newer fully supported devices. Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, and video decoder, jpeg decoder, OFA (Optical Flow Accelerator) for all running processes. Utilization values are returned as an array of utilization sample structures in the caller-supplied buffer pointed at by procesesUtilInfo->procUtilArray. One utilization sample structure is returned per process running, that had some non-zero utilization during the last sample period. It includes the CPU timestamp at which the samples were recorded. Individual utilization values are returned as “unsigned int” values. The caller should allocate a buffer of size processSamplesCount * sizeof(nvmlProcessUtilizationInfo_t). If the buffer is too small, the API will return ErrInsufficientSize, with the recommended minimal buffer size at procesesUtilInfo->processSamplesCount. The caller should invoke the function again with the allocated buffer passed in procesesUtilInfo->procUtilArray, and procesesUtilInfo->processSamplesCount set to the number no less than the recommended value by the previous API return. On successful return, the function updates procesesUtilInfo->processSamplesCount with the number of process utilization info structures that were actually written. This may differ from a previously read value as instances are created or destroyed. procesesUtilInfo->lastSeenTimeStamp represents the CPU timestamp in microseconds at which utilization samples were last read. Set it to 0 to read utilization based on all the samples maintained by the driver’s internal sample buffer. Set procesesUtilInfo->lastSeenTimeStamp to a timeStamp retrieved from a previous query to read utilization since the previous query. procesesUtilInfo->version is the version number of the structure ProcessesUtilizationInfo, the caller should set the correct version number to retrieve the specific version of processes utilization information.

Note: On MIG-enabled GPUs, querying process utilization is not currently supported.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetProcessesUtilizationInfo.

A nil error means procesesUtilInfo->procUtilArray has been populated.

Errors:

  • ErrArgumentVersionMismatch: If the version of procesesUtilInfo is invalid
  • ErrGpuIsLost: If the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: If procesesUtilInfo->procUtilArray is NULL, or the buffer size of procesesUtilInfo->procUtilArray is too small. The caller should check the minimul array size from the returned procesesUtilInfo->processSamplesCount, and call the function again with a buffer no smaller than procesesUtilInfo->processSamplesCount * sizeof(nvmlProcessUtilizationInfo_t)
  • ErrInvalidArgument: If device is invalid, or procesesUtilInfo is NULL
  • ErrNotFound: If sample entries are not found
  • ErrNotSupported: If the device does not support this feature
  • ErrUninitialized: If the library has not been successfully initialized
  • ErrUnknown: On any unexpected error

Wraps nvmlDeviceGetProcessesUtilizationInfo.

func (Device) ReadPRMCounters

func (d Device) ReadPRMCounters(counterList *PRMCounterListV1) error

ReadPRMCounters reads a list of GPU PRM Counters.

For Blackwell or newer fully supported devices. Supported on Linux only.

Requires CUDA 13.1 (driver r590) or later; see HasDeviceReadPRMCounters.

  • counterList: Structure holding the input parameters as well as the retrieved counter values

Errors:

Wraps nvmlDeviceReadPRMCounters_v1.

func (Device) ReadWritePRM

func (d Device) ReadWritePRM(buffer *PRMTLVV1) error

ReadWritePRM reads or writes a GPU PRM register.

The input is assumed to be in TLV format in network byte order. For Blackwell or newer fully supported devices. Supported on Linux only.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceReadWritePRM.

  • buffer: Structure holding the input data in TLV format as well as the PRM register contents in TLV format (in the case of a successful read operation). Note: the input data and any returned data shall be in network byte order

Errors:

  • ErrInvalidArgument: if device or buffer are invalid
  • ErrNotSupported: if this feature is not supported by the device previousNvmlClocksEventReasons nextPower Profile Information
  • ErrNoPermission: if user does not have permission to perform this operation

Wraps nvmlDeviceReadWritePRM_v1.

func (Device) RegisterEvents

func (d Device) RegisterEvents(eventTypes uint64, set EventSet) error

RegisterEvents starts recording of events on a specified devices and add the events to specified EventSet.

For Fermi or newer fully supported devices. ECC events are available only on ECC-enabled devices (see Device.TotalEccErrors) Power capping events are available only on Power Management enabled devices (see Device.PowerManagementMode) For Linux only. This call starts recording of events on specific device. All events that occurred before this call are not recorded. Checking if some event occurred can be done with EventSet.Wait If function reports ErrUnknown, event set is in undefined state and should be freed. If function reports ErrNotSupported, event set can still be used. None of the requested eventTypes are registered in that case.

See also: Event Types, Device.SupportedEventTypes, EventSet.Wait, EventSet.Close

  • eventTypes: Bitmask of Event Types to record
  • set: Set to which add new event types

A nil error means the event has been set.

Errors:

Wraps nvmlDeviceRegisterEvents.

func (Device) RemappedRows

func (d Device) RemappedRows() (uint32, uint32, uint32, uint32, error)

RemappedRows gets number of remapped rows.

The number of rows reported will be based on the cause of the remapping. isPending indicates whether or not there are pending remappings. A reset will be required to actually remap the row. failureOccurred will be set if a row remapping ever failed in the past. A pending remapping won’t affect future work on the GPU since error-containment and dynamic page blacklisting will take care of that. For Ampere or newer fully supported devices.

Note: On MIG-enabled GPUs with active instances, querying the number of remapped rows is not supported

  • corrRows: Reference for number of rows remapped due to correctable errors
  • uncRows: Reference for number of rows remapped due to uncorrectable errors
  • isPending: Reference for whether or not remappings are pending
  • failureOccurred: Reference that is set when a remapping has failed in the past

Errors:

Wraps nvmlDeviceGetRemappedRows.

func (Device) RemappedRowsV1

func (d Device) RemappedRowsV1() (uint32, uint32, uint32, uint32, error)

RemappedRowsV1 gets number of remapped rows.

The number of rows reported will be based on the cause of the remapping. isPending indicates whether or not there are pending remappings. A reset will be required to actually remap the row. failureOccurred will be set if a row remapping ever failed in the past. A pending remapping won’t affect future work on the GPU since error-containment and dynamic page blacklisting will take care of that. For Ampere or newer fully supported devices.

Note: On MIG-enabled GPUs with active instances, querying the number of remapped rows is not supported

  • corrRows: Reference for number of rows remapped due to correctable errors
  • uncRows: Reference for number of rows remapped due to uncorrectable errors
  • isPending: Reference for whether or not remappings are pending
  • failureOccurred: Reference that is set when a remapping has failed in the past

Errors:

Wraps nvmlDeviceGetRemappedRows.

func (Device) RemappedRowsV2

func (d Device) RemappedRowsV2() (RemappedRowsInfoV2, error)

RemappedRowsV2 gets the status of row remapper.

For Ampere or newer fully supported devices.

Note: On MIG-enabled GPUs with active instances, querying the number of remapped rows is not supported

Requires CUDA 13.2 (driver r595) or later; see HasDeviceGetRemappedRowsV2.

Errors:

Wraps nvmlDeviceGetRemappedRows_v2.

func (Device) RepairStatus

func (d Device) RepairStatus() (RepairStatus, error)

RepairStatus gets the repair status for TPC/Channel repair.

For Ampere or newer fully supported devices.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceGetRepairStatus.

Errors:

Wraps nvmlDeviceGetRepairStatus.

func (Device) ResetApplicationsClocks deprecated

func (d Device) ResetApplicationsClocks() error

ResetApplicationsClocks resets the device's applications clocks to their defaults.

Please use Device.ResetMemoryLockedClocks for Memory Clocks and Device.ResetGpuLockedClocks for Graphics Clocks.

Wraps nvmlDeviceResetApplicationsClocks.

Deprecated: Deprecated in CUDA 13.0 and removed in CUDA 14.0. Use Device.ResetMemoryLockedClocks instead. Applications clocks are deprecated and will be removed in CUDA 14.0.

func (Device) ResetGpuLockedClocks

func (d Device) ResetGpuLockedClocks() error

ResetGpuLockedClocks resets the gpu clock to the default value.

This is the gpu clock that will be used after system reboot or driver reload. Default values are idle clocks. For Volta or newer fully supported devices.

See also: Device.SetGpuLockedClocks

A nil error means new settings were successfully set.

Errors:

Wraps nvmlDeviceResetGpuLockedClocks.

func (Device) ResetMemoryLockedClocks

func (d Device) ResetMemoryLockedClocks() error

ResetMemoryLockedClocks resets the memory clock to the default value.

This is the memory clock that will be used after system reboot or driver reload. Default values are idle clocks. For Ampere or newer fully supported devices.

See also: Device.SetMemoryLockedClocks

A nil error means new settings were successfully set.

Errors:

Wraps nvmlDeviceResetMemoryLockedClocks.

func (Device) ResetNvLinkErrorCounters

func (d Device) ResetNvLinkErrorCounters(link uint32) error

ResetNvLinkErrorCounters resets all error counters to zero Please refer to NvLinkErrorCounter for the list of error counters that are reset.

For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be queried

A nil error means the reset is successful.

Errors:

Wraps nvmlDeviceResetNvLinkErrorCounters.

func (Device) ResetNvLinkUtilizationCounter deprecated

func (d Device) ResetNvLinkUtilizationCounter(link uint32, counter uint32) error

ResetNvLinkUtilizationCounter resets the NVLINK utilization counters Both the receive and transmit counters are operated on by this function

For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be reset
  • counter: Specifies the counter that should be reset (0 or 1)

A nil error means counters were successfully reset.

Errors:

Wraps nvmlDeviceResetNvLinkUtilizationCounter.

Deprecated: Deprecated in CUDA 13.0. Resetting NVLINK utilization counters is no longer supported.

func (Device) RetiredPages

func (d Device) RetiredPages(cause PageRetirementCause, pageCount *uint32, addresses *uint64) error

RetiredPages returns the list of retired pages by source, including pages that are pending retirement The address information provided from this API is the hardware address of the page that was retired.

Note that this does not match the virtual address used in CUDA, but will match the address information in Xid 63 For Kepler or newer fully supported devices.

  • cause: Filter page addresses by cause of retirement
  • pageCount: Reference in which to provide the addresses buffer size, and to return the number of retired pages that match cause Set to 0 to query the size without allocating an addresses buffer
  • addresses: Buffer to write the page addresses into

A nil error means pageCount was populated and addresses was filled.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: if pageCount indicates the buffer is not large enough to store all the matching page addresses. pageCount is set to the needed size.
  • ErrInvalidArgument: if device is invalid, pageCount is NULL, cause is invalid, or addresses is NULL
  • ErrNotSupported: if the device doesn’t support this feature
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetRetiredPages.

func (Device) RetiredPagesPendingStatus

func (d Device) RetiredPagesPendingStatus(isPending *EnableState) error

RetiredPagesPendingStatus checks if any pages are pending retirement and need a reboot to fully retire.

For Kepler or newer fully supported devices.

  • isPending: Reference in which to return the pending status

A nil error means isPending was populated.

Errors:

Wraps nvmlDeviceGetRetiredPagesPendingStatus.

func (Device) RetiredPagesV1

func (d Device) RetiredPagesV1(cause PageRetirementCause, pageCount *uint32, addresses *uint64) error

RetiredPagesV1 returns the list of retired pages by source, including pages that are pending retirement The address information provided from this API is the hardware address of the page that was retired.

Note that this does not match the virtual address used in CUDA, but will match the address information in Xid 63 For Kepler or newer fully supported devices.

  • cause: Filter page addresses by cause of retirement
  • pageCount: Reference in which to provide the addresses buffer size, and to return the number of retired pages that match cause Set to 0 to query the size without allocating an addresses buffer
  • addresses: Buffer to write the page addresses into

A nil error means pageCount was populated and addresses was filled.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: if pageCount indicates the buffer is not large enough to store all the matching page addresses. pageCount is set to the needed size.
  • ErrInvalidArgument: if device is invalid, pageCount is NULL, cause is invalid, or addresses is NULL
  • ErrNotSupported: if the device doesn’t support this feature
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetRetiredPages.

func (Device) RetiredPagesV2

func (d Device) RetiredPagesV2(cause PageRetirementCause) (addresses, timestamps []uint64, err error)

RetiredPagesV2 returns the list of retired pages by source, including pages that are pending retirement The address information provided from this API is the hardware address of the page that was retired.

Note that this does not match the virtual address used in CUDA, but will match the address information in Xid 63 For Kepler or newer fully supported devices.

Note: Device.RetiredPagesV2 adds an additional timestamps parameter to return the time of each page’s retirement. This is supported for Pascal and newer architecture.

  • cause: Filter page addresses by cause of retirement
  • pageCount: Reference in which to provide the addresses buffer size, and to return the number of retired pages that match cause Set to 0 to query the size without allocating an addresses buffer
  • addresses: Buffer to write the page addresses into
  • timestamps: Buffer to write the timestamps of page retirement, additional for _v2

A nil error means pageCount was populated and addresses was filled.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: if pageCount indicates the buffer is not large enough to store all the matching page addresses. pageCount is set to the needed size.
  • ErrInvalidArgument: if device is invalid, pageCount is NULL, cause is invalid, or addresses is NULL
  • ErrNotSupported: if the device doesn’t support this feature
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetRetiredPages_v2.

The returned slices are grown together until they hold all retired pages.

func (Device) RowRemapperHistogram

func (d Device) RowRemapperHistogram(values *RowRemapperHistogramValues) error

RowRemapperHistogram gets the row remapper histogram.

Returns the remap availability for each bank on the GPU.

  • values: Histogram values

Errors:

Wraps nvmlDeviceGetRowRemapperHistogram.

func (Device) RunningProcessDetailList

func (d Device) RunningProcessDetailList(plist *ProcessDetailList) error

RunningProcessDetailList gets information about running processes on a device for input context.

For Hopper or newer fully supported devices. This function returns information only about running processes (e.g. CUDA application which have active context). To determine the size of the plist->procArray array to allocate, call the function with plist->numProcArrayEntries set to zero and plist->procArray set to NULL. The return code will be either ErrInsufficientSize (if there are valid processes of type plist->mode to report on, in which case the plist->numProcArrayEntries field will indicate the required number of entries in the array) or Success (if no processes of type plist->mode exist). The usedGpuMemory field returned is all of the memory used by the application. The usedGpuCcProtectedMemory field returned is all of the protected memory used by the application. Keep in mind that information returned by this call is dynamic and the number of elements might change in time. Allocate more space for plist->procArray table in case new processes are spawned.

Note: In MIG mode, if device handle is provided, the API returns aggregate information, only if the caller has appropriate privileges. Per-instance information can be queried by using specific MIG device handles. Querying per-instance information using MIG device handles is not supported if the device is in vGPU Host virtualization mode. Protected memory usage is currently not available in MIG mode and in windows.

  • plist: Reference in which to process detail list plist->version The api version plist->mode The process mode plist->procArray Reference in which to return the process information plist->numProcArrayEntries Proc array size of returned entries

A nil error means plist->numprocArrayEntries and plist->procArray have been populated.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: if plist->numprocArrayEntries indicates that the plist->procArray is too small plist->numprocArrayEntries will contain minimal amount of space necessary for the call to complete
  • ErrInvalidArgument: if device is invalid, plist is NULL, plist->version is invalid, plist->mode is invalid,
  • ErrNotSupported: if this query is not supported by device
  • ErrNoPermission: if the user doesn’t have permission to perform this operation
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetRunningProcessDetailList.

func (Device) Samples

func (d Device) Samples(type_ SamplingType, lastSeenTimeStamp uint64, buf []Sample) ([]Sample, ValueType, error)

Samples gets recent samples for the GPU.

For Kepler or newer fully supported devices. Based on type, this method can be used to fetch the power, utilization or clock samples maintained in the buffer by the driver. Power, Utilization and Clock samples are returned as type “unsigned int” for the union Value. To get the size of samples that user needs to allocate, the method is invoked with samples set to NULL. The returned samplesCount will provide the number of samples that can be queried. The user needs to allocate the buffer with size as samplesCount * sizeof(Sample). lastSeenTimeStamp represents CPU timestamp in microseconds. Set it to 0 to fetch all the samples maintained by the underlying buffer. Set lastSeenTimeStamp to one of the timeStamps retrieved from the date of the previous query to get more recent samples. This method fetches the number of entries which can be accommodated in the provided samples array, and the reference samplesCount is updated to indicate how many samples were actually retrieved. The advantage of using this method for samples in contrast to polling via existing methods is to get get higher frequency data at lower polling cost.

Note: On MIG-enabled GPUs, querying the following sample types, GpuUtilizationSamples, MemoryUtilizationSamples EncUtilizationSamples and DecUtilizationSamples, is not currently supported.

  • type_: Type of sampling event
  • lastSeenTimeStamp: Return only samples with timestamp greater than lastSeenTimeStamp
  • sampleValType: Output parameter to represent the type of sample value as described in nvmlSampleVal_t
  • sampleCount: Reference to provide the number of elements which can be queried in samples array
  • samples: Reference in which samples are returned

A nil error means samples are successfully retrieved.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid, samplesCount is NULL or reference to sampleCount is 0 for non null samples
  • ErrNotFound: if sample entries are not found
  • ErrNotSupported: if this query is not supported by the device
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetSamples.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) Serial

func (d Device) Serial() (string, error)

Serial retrieves the globally unique board serial number associated with this device’s board.

For all products with an inforom. The serial number is an alphanumeric string that will not exceed 30 characters (including the NULL terminator). This number matches the serial number tag that is physically attached to the board. See DeviceSerialBufferSize.

  • serial: Reference in which to return the board/module serial number
  • length: The maximum allowed length of the string returned in serial

A nil error means serial has been set.

Errors:

Wraps nvmlDeviceGetSerial.

func (Device) SetAPIRestriction

func (d Device) SetAPIRestriction(apiType RestrictedAPI, isRestricted EnableState) error

SetAPIRestriction changes the root/admin restructions on certain APIs.

See RestrictedAPI for the list of supported APIs. This method can be used by a root/admin user to give non-root/admin access to certain otherwise-restricted APIs. The new setting lasts for the lifetime of the NVIDIA driver; it is not persistent. See Device.APIRestriction to query the current restriction settings. For Kepler or newer fully supported devices. Requires root/admin permissions.

See also: RestrictedAPI

  • apiType: Target API type for this operation
  • isRestricted: The target restriction

A nil error means isRestricted has been set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid or apiType incorrect
  • ErrNotSupported: if the device does not support changing API restrictions or the device does not support the feature that api restrictions are being set for (E.G. Enabling/disabling auto boosted clocks is not supported by the device)
  • ErrNoPermission: if the user doesn’t have permission to perform this operation
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceSetAPIRestriction.

func (Device) SetAccountingMode

func (d Device) SetAccountingMode(mode EnableState) error

SetAccountingMode enables or disables per process accounting.

For Kepler or newer fully supported devices. Requires root/admin permissions. See Device.AccountingMode See Device.AccountingStats See Device.ClearAccountingPids

Note: This setting is not persistent and will default to disabled after driver unloads. Enable persistence mode to be sure the setting doesn’t switch off to disabled.

Note: Enabling accounting mode has no negative impact on the GPU performance.

Note: Disabling accounting clears all accounting pids information.

Note: On MIG-enabled GPUs, accounting mode would be set to DISABLED and changing it is not supported.

  • mode: The target accounting mode

A nil error means the new mode has been set.

Errors:

Wraps nvmlDeviceSetAccountingMode.

func (Device) SetAdaptiveTgpMode

func (d Device) SetAdaptiveTgpMode(mode EnableState) error

SetAdaptiveTgpMode requests to enable or disables Adaptive TGP Mode for a GPU.

RUBIN_OR_NEWER% Requires root/admin privileges. Adaptive TGP Mode assigns tailored power budgets to two binned GPU parts within the same module, reducing node-to-node and rack-to-rack performance variation. An out-of-band administrator policy may override the in-band request; use Device.AdaptiveTgpModeInfo to query the arbitrated state.

See also: Device.AdaptiveTgpModeInfo

Requires CUDA 13.4 (driver r615) or later; see HasDeviceSetAdaptiveTgpMode.

A nil error means the request was accepted.

Errors:

Wraps nvmlDeviceSetAdaptiveTgpMode_v1.

func (Device) SetApplicationsClocks deprecated

func (d Device) SetApplicationsClocks(memClockMHz uint32, graphicsClockMHz uint32) error

SetApplicationsClocks sets the device's memory and graphics applications clocks, in MHz.

Please use Device.SetMemoryLockedClocks for Memory Clocks and Device.SetGpuLockedClocks for Graphics Clocks.

Wraps nvmlDeviceSetApplicationsClocks.

Deprecated: Deprecated in CUDA 13.0 and removed in CUDA 14.0. Use Device.SetMemoryLockedClocks instead. Applications clocks are deprecated and will be removed in CUDA 14.0.

func (Device) SetAutoBoostedClocksEnabled

func (d Device) SetAutoBoostedClocksEnabled(enabled EnableState) error

SetAutoBoostedClocksEnabled tries to set the current state of Auto Boosted clocks on a device.

For Kepler or newer fully supported devices. Auto Boosted clocks are enabled by default on some hardware, allowing the GPU to run at higher clock rates to maximize performance as thermal limits allow. Auto Boosted clocks should be disabled if fixed clock rates are desired. Non-root users may use this API by default but can be restricted by root from using this API by calling Device.SetAPIRestriction with apiType=[RestrictedApiSetAutoBoostedClocks]. Note: Persistence Mode is required to modify current Auto Boost settings, therefore, it must be enabled. On Pascal and newer hardware, Auto Boosted clocks are controlled through application clocks. Use Device.SetApplicationsClocks and Device.ResetApplicationsClocks to control Auto Boost behavior.

  • enabled: What state to try to set Auto Boosted clocks of the target device to

A nil error means the Auto Boosted clocks were successfully set to the state specified by enabled.

Errors:

Wraps nvmlDeviceSetAutoBoostedClocksEnabled.

func (Device) SetClockOffsets

func (d Device) SetClockOffsets(info *ClockOffset) error

SetClockOffsets controls current clock offset of some clock domain for a given PState.

For Maxwell or newer fully supported devices. Requires privileged user.

Requires CUDA 12.5 (driver r555) or later; see HasDeviceSetClockOffsets.

  • info: Structure specifying the clock type (input), the pstate (input) and clock offset value (input)

Errors:

Wraps nvmlDeviceSetClockOffsets.

func (Device) SetComputeMode

func (d Device) SetComputeMode(mode ComputeMode) error

SetComputeMode sets the compute mode for the device or MIG device.

For all products. Requires root/admin permissions. The compute mode determines whether a GPU can be used for compute operations and whether it can be shared across contexts. This operation takes effect immediately. Under Linux it is not persistent across reboots and always resets to “Default”. Under windows it is persistent. Under windows compute mode may only be set to DEFAULT when running in WDDM See ComputeMode for details on available compute modes.

Note: If MIG is enabled on a GPU, device must be MIG device handle.

See also: Device.ComputeMode

  • mode: The target compute mode

A nil error means the compute mode was set.

Errors:

Wraps nvmlDeviceSetComputeMode.

func (Device) SetConfComputeUnprotectedMemSize

func (d Device) SetConfComputeUnprotectedMemSize(sizeKiB uint64) error

SetConfComputeUnprotectedMemSize sets Conf Computing Unprotected Memory Size.

For Ampere or newer fully supported devices. Supported on Linux, Windows TCC.

  • sizeKiB: Unprotected Memory size to be set in KiB

A nil error means sizeKiB successfully set.

Errors:

Wraps nvmlDeviceSetConfComputeUnprotectedMemSize.

func (Device) SetCpuAffinity

func (d Device) SetCpuAffinity() error

SetCpuAffinity sets the ideal affinity for the calling thread and device using the guidelines given in Device.CpuAffinity.

Note, this is a change as of version 8.0. Older versions set the affinity for a calling process and all children. Currently supports up to 1024 processors. For Kepler or newer fully supported devices. Supported on Linux only.

A nil error means the calling process has been successfully bound.

Errors:

Wraps nvmlDeviceSetCpuAffinity.

func (Device) SetDefaultAutoBoostedClocksEnabled

func (d Device) SetDefaultAutoBoostedClocksEnabled(enabled EnableState, flags uint32) error

SetDefaultAutoBoostedClocksEnabled tries to set the default state of Auto Boosted clocks on a device.

This is the default state that Auto Boosted clocks will return to when no compute running processes (e.g. CUDA application which have an active context) are running For Kepler or newer non-GeForce fully supported devices and Maxwell or newer GeForce devices. Requires root/admin permissions. Auto Boosted clocks are enabled by default on some hardware, allowing the GPU to run at higher clock rates to maximize performance as thermal limits allow. Auto Boosted clocks should be disabled if fixed clock rates are desired. On Pascal and newer hardware, Auto Boosted clocks are controlled through application clocks. Use Device.SetApplicationsClocks and Device.ResetApplicationsClocks to control Auto Boost behavior.

  • enabled: What state to try to set default Auto Boosted clocks of the target device to
  • flags: Flags that change the default behavior. Currently Unused

A nil error means the Auto Boosted clock’s default state was successfully set to the state specified by enabled.

Errors:

Wraps nvmlDeviceSetDefaultAutoBoostedClocksEnabled.

func (Device) SetDefaultFanSpeed

func (d Device) SetDefaultFanSpeed(fan uint32) error

SetDefaultFanSpeed sets the speed of the fan control policy to default.

For all cuda-capable discrete products with fans

  • fan: The index of the fan, starting at zero

A nil error means speed has been adjusted.

Errors:

Wraps nvmlDeviceSetDefaultFanSpeed_v2.

func (Device) SetDramEncryptionMode

func (d Device) SetDramEncryptionMode(dramEncryption *DramEncryptionInfo) error

SetDramEncryptionMode sets the DRAM Encryption mode for the device.

For Kepler or newer fully supported devices. Only applicable to devices that support DRAM Encryption. Requires InforomDen version 1.0 or higher. Requires root/admin permissions. The DRAM Encryption mode determines whether the GPU enables its DRAM Encryption support. This operation takes effect after the next reboot. See EnableState for details on available modes.

See also: Device.DramEncryptionMode

Requires CUDA 12.8 (driver r570) or later; see HasDeviceSetDramEncryptionMode.

  • dramEncryption: The target DRAM Encryption mode

A nil error means the DRAM Encryption mode was set.

Errors:

Wraps nvmlDeviceSetDramEncryptionMode.

func (Device) SetDriverModel

func (d Device) SetDriverModel(driverModel DriverModel, flags uint32) error

SetDriverModel sets the driver model for the device.

For Fermi or newer fully supported devices. For windows only. Requires root/admin permissions. On Windows platforms the device driver can run in either WDDM or WDM (TCC) mode. If a display is attached to the device it must run in WDDM mode. Driver-model availability is architecture-specific; attempting to set an unsupported driver model returns ErrNotSupported. It is possible to force the change to WDM (TCC) while the display is still attached with a force flag (nvmlFlagForce). This should only be done if the host is subsequently powered down and the display is detached from the device before the next reboot. This operation takes effect after the next reboot. Windows driver model may only be set to WDDM when running in DEFAULT compute mode. Change driver model to WDDM is not supported when GPU doesn’t support graphics acceleration or will not support it after reboot. See Device.SetGpuOperationMode. See DriverModel for details on available driver models. See nvmlFlagDefault and nvmlFlagForce

See also: Device.DriverModel

  • driverModel: The target driver model
  • flags: Flags that change the default behavior

A nil error means the driver model has been set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid or driverModel is invalid
  • ErrNotSupported: if the platform is not windows or the device does not support this feature
  • ErrNoPermission: if the user doesn’t have permission to perform this operation
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceSetDriverModel.

func (Device) SetEccMode

func (d Device) SetEccMode(ecc EnableState) error

SetEccMode sets the ECC mode for the device.

For Kepler or newer fully supported devices. Only applicable to devices with ECC. Requires InforomEcc version 1.0 or higher. Requires root/admin permissions. The ECC mode determines whether the GPU enables its ECC support. This operation takes effect after the next reboot. See EnableState for details on available modes.

See also: Device.EccMode

  • ecc: The target ECC mode

A nil error means the ECC mode was set.

Errors:

Wraps nvmlDeviceSetEccMode.

func (Device) SetFanControlPolicy

func (d Device) SetFanControlPolicy(fan uint32, policy FanControlPolicy) error

SetFanControlPolicy sets current fan control policy.

For Maxwell or newer fully supported devices. Requires privileged user. For all cuda-capable discrete products with fans

  • fan: The index of the fan, starting at zero
  • policy: The fan control policy to set

A nil error means policy has been set.

Errors:

Wraps nvmlDeviceSetFanControlPolicy.

func (Device) SetFanSpeed

func (d Device) SetFanSpeed(fan uint32, speed uint32) error

SetFanSpeed sets the speed of a specified fan.

WARNING: This function changes the fan control policy to manual. It means that YOU have to monitor the temperature and adjust the fan speed accordingly. If you set the fan speed too low you can burn your GPU! Use Device.SetDefaultFanSpeed to restore default control policy. For all cuda-capable discrete products with fans that are Maxwell or Newer. return

  • Success if the fan speed has been set
  • ErrUninitialized if the library has not been successfully initialized
  • ErrInvalidArgument if the device is not valid, or the speed is outside acceptable ranges, or if the fan index doesn’t reference an actual fan.
  • ErrNotSupported if the device is older than Maxwell.
  • ErrUnknown if there was an unexpected error.

Parameters:

  • fan: The index of the fan, starting at zero
  • speed: The target speed of the fan [0-100] in % of max speed

Wraps nvmlDeviceSetFanSpeed_v2.

func (Device) SetGpcClkVfOffset deprecated

func (d Device) SetGpcClkVfOffset(offset int32) error

SetGpcClkVfOffset sets the device's GPCCLK VF offset.

It works on Maxwell onwards GPU architectures. Set the GPCCLK VF offset value

  • offset: The GPCCLK VF offset value to set

A nil error means offset has been set.

Errors:

Wraps nvmlDeviceSetGpcClkVfOffset.

Deprecated: Deprecated in CUDA 13.0. Use Device.SetClockOffsets instead.

func (Device) SetGpuLockedClocks

func (d Device) SetGpuLockedClocks(minGpuClockMHz uint32, maxGpuClockMHz uint32) error

SetGpuLockedClocks sets clocks that device will lock to.

Sets the clocks that the device will be running at to the value in the range of minGpuClockMHz to maxGpuClockMHz. Can be used as a setting to request constant performance. This can be called with a pair of integer clock frequencies in MHz, or a pair of /ref ClockLimitId values. See the table below for valid combinations of these values. minGpuClock | maxGpuClock | Effect ————+———-—+———————————————–— tdp | tdp | Lock clock to TDP unlimited | tdp | Upper bound is TDP but clock may drift below this tdp | unlimited | Lower bound is TDP but clock may boost above this unlimited | unlimited | Unlocked (== Device.ResetGpuLockedClocks) If one arg takes one of these values, the other must be one of these values as well. Mixed numeric and symbolic calls return ErrInvalidArgument. Requires root/admin permissions. After system reboot or driver reload GPU clocks go back to their default value. See Device.ResetGpuLockedClocks. For Volta or newer fully supported devices.

  • minGpuClockMHz: Requested minimum gpu clock in MHz
  • maxGpuClockMHz: Requested maximum gpu clock in MHz

A nil error means new settings were successfully set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid or minGpuClockMHz and maxGpuClockMHz is not a valid clock combination
  • ErrNotSupported: if the device doesn’t support this feature
  • ErrNoPermission: if the user doesn’t have permission to perform this operation
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceSetGpuLockedClocks.

func (Device) SetGpuOperationMode

func (d Device) SetGpuOperationMode(mode GpuOperationMode) error

SetGpuOperationMode sets new GOM.

See GpuOperationMode for details. For GK110 M-class and X-class Tesla products from the Kepler family. Modes GomLowDp and GomAllOn are supported on fully supported GeForce products. Not supported on Quadro and Tesla C-class products. Requires root/admin permissions. Changing GOMs requires a reboot. The reboot requirement might be removed in the future. Compute only GOMs don’t support graphics acceleration. Under windows switching to these GOMs when pending driver model is WDDM is not supported. See Device.SetDriverModel.

See also: GpuOperationMode, Device.GpuOperationMode

  • mode: Target GOM

A nil error means mode has been set.

Errors:

Wraps nvmlDeviceSetGpuOperationMode.

func (Device) SetHostname

func (d Device) SetHostname(hostname *HostnameV1) error

SetHostname sets the hostname for the device.

For Blackwell or newer fully supported devices. Requires root/admin permissions. Supported on Linux only. Sets a hostname string for the GPU device. This operation takes effect immediately. The hostname is not stored persistently across GPU resets or driver reloads.

See also: Device.Hostname

Requires CUDA 13.0 (driver r580) or later; see HasDeviceSetHostname.

  • hostname: Reference to the caller-provided HostnameV1 struct containing the hostname

A nil error means the hostname was set successfully.

Errors:

Wraps nvmlDeviceSetHostname_v1.

func (Device) SetMemClkVfOffset deprecated

func (d Device) SetMemClkVfOffset(offset int32) error

SetMemClkVfOffset sets the device's memory clock VF offset.

It works on Maxwell onwards GPU architectures. Set the MemClk (Memory Clock) VF offset value. It requires elevated privileges.

  • offset: The MemClk VF offset value to set

A nil error means offset has been set.

Errors:

Wraps nvmlDeviceSetMemClkVfOffset.

Deprecated: Deprecated in CUDA 13.0. Use Device.SetClockOffsets instead.

func (Device) SetMemoryLimits

func (d Device) SetMemoryLimits(limits *SetMemoryLimitsV1) error

SetMemoryLimits sets the memory limits of the device for the cgroup partition.

This method will set the memory limits of the device for the specified cgroup partition. The limits will indicate the amount of memory that can be allocated for the device for use of an application in that cgroup. For all products. For Linux only. Requires root/admin permissions.

Note: MIG handles are not supported

Requires CUDA 13.4 (driver r615) or later; see HasDeviceSetMemoryLimits.

A nil error means the operation was successful.

Errors:

Wraps nvmlDeviceSetMemoryLimits_v1.

func (Device) SetMemoryLockedClocks

func (d Device) SetMemoryLockedClocks(minMemClockMHz uint32, maxMemClockMHz uint32) error

SetMemoryLockedClocks sets memory clocks that device will lock to.

Sets the device’s memory clocks to the value in the range of minMemClockMHz to maxMemClockMHz. Can be used as a setting to request constant performance. Requires root/admin permissions. After system reboot or driver reload memory clocks go back to their default value. See Device.ResetMemoryLockedClocks. For Ampere or newer fully supported devices.

  • minMemClockMHz: Requested minimum memory clock in MHz
  • maxMemClockMHz: Requested maximum memory clock in MHz

A nil error means new settings were successfully set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid or minGpuClockMHz and maxGpuClockMHz is not a valid clock combination
  • ErrNotSupported: if the device doesn’t support this feature
  • ErrNoPermission: if the user doesn’t have permission to perform this operation
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceSetMemoryLockedClocks.

func (Device) SetMigMode

func (d Device) SetMigMode(mode uint32, activationStatus *Result) error

SetMigMode sets MIG mode for the device.

For Ampere or newer fully supported devices. Requires root user. This mode determines whether a GPU instance can be created. This API may unbind or reset the device to activate the requested mode. Thus, the attributes associated with the device, such as minor number, might change. The caller of this API is expected to query such attributes again. On certain platforms like pass-through virtualization, where reset functionality may not be exposed directly, VM reboot is required. activationStatus would return ErrResetRequired for such cases. activationStatus would return the appropriate error code upon unsuccessful activation. For example, if device unbind fails because the device isn’t idle, ErrInUse would be returned. The caller of this API is expected to idle the device and retry setting the mode.

Note: On Windows, only disabling MIG mode is supported. activationStatus would return ErrNotSupported as GPU reset is not supported on Windows through this API.

Errors:

Wraps nvmlDeviceSetMigMode.

func (Device) SetNvLinkDeviceLowPowerThreshold

func (d Device) SetNvLinkDeviceLowPowerThreshold(info *NvLinkPowerThres) error

SetNvLinkDeviceLowPowerThreshold sets NvLink Low Power Threshold for device.

For Hopper or newer fully supported devices.

A nil error means the Threshold is successfully set.

Errors:

Wraps nvmlDeviceSetNvLinkDeviceLowPowerThreshold.

func (Device) SetNvLinkUtilizationControl deprecated

func (d Device) SetNvLinkUtilizationControl(link uint32, counter uint32, control *NvLinkUtilizationControl, reset uint32) error

SetNvLinkUtilizationControl sets the NVLINK utilization counter control information for the specified counter, 0 or 1.

Please refer to NvLinkUtilizationControl for the structure definition. Performs a reset of the counters if the reset parameter is non-zero. For Pascal or newer fully supported devices.

  • link: Specifies the NvLink link to be queried
  • counter: Specifies the counter that should be set (0 or 1)
  • control: A reference to the NvLinkUtilizationControl to set
  • reset: Resets the counters on set if non-zero

A nil error means the control has been set successfully.

Errors:

Wraps nvmlDeviceSetNvLinkUtilizationControl.

Deprecated: Deprecated in CUDA 13.0. Use NvLinkUtilizationControl instead. Setting utilization counter control is no longer supported.

func (Device) SetNvlinkBwMode

func (d Device) SetNvlinkBwMode(setBwMode *NvlinkSetBwMode) error

SetNvlinkBwMode sets the NvLink Reduced Bandwidth Mode for the device.

For Blackwell or newer fully supported devices.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceSetNvlinkBwMode.

A nil error means the Bandwidth mode was successfully set.

Errors:

Wraps nvmlDeviceSetNvlinkBwMode.

func (Device) SetNvlinkBwModeAsync

func (d Device) SetNvlinkBwModeAsync(bSetBest uint32, bwMode uint32) (NvlinkSetBwModeAsyncV1, error)

SetNvlinkBwModeAsync sets the NvLink Reduced Bandwidth Mode asynchronously for the device.

Polling should be done by checking for GpuFabricStateCompleted from Device.GpuFabricInfoV. RUBIN_OR_NEWER%

See also: Device.GpuFabricInfoV

Requires CUDA 13.4 (driver r615) or later; see HasDeviceSetNvlinkBwModeAsync.

A nil error means the Bandwidth mode was successfully set.

Errors:

Wraps nvmlDeviceSetNvlinkBwModeAsync_v1.

func (Device) SetNvlinkNvleReady

func (d Device) SetNvlinkNvleReady(setNvleReady *NvlinkSetNvleReadyV1) error

SetNvlinkNvleReady wraps nvmlDeviceSetNvlinkNvleReady_v1.

Requires CUDA 13.5 (driver r620) or later; see HasDeviceSetNvlinkNvleReady.

func (Device) SetPersistenceMode

func (d Device) SetPersistenceMode(mode EnableState) error

SetPersistenceMode sets the persistence mode for the device.

For all products. For Linux only. Requires root/admin permissions. The persistence mode determines whether the GPU driver software is torn down after the last client exits. This operation takes effect immediately. It is not persistent across reboots. After each reboot the persistence mode is reset to “Disabled”. See EnableState for available modes. After calling this API with mode set to FeatureDisabled on a device that has its own NUMA memory, the given device handle will no longer be valid, and to continue to interact with this device, a new handle should be obtained from one of the nvmlDeviceGetHandleBy*() APIs. This limitation is currently only applicable to devices that have a coherent NVLink connection to system memory.

See also: Device.PersistenceMode

  • mode: The target persistence mode

A nil error means the persistence mode was set.

Errors:

Wraps nvmlDeviceSetPersistenceMode.

func (Device) SetPowerManagementLimit

func (d Device) SetPowerManagementLimit(limit uint32) error

SetPowerManagementLimit sets new power limit of this device.

For Kepler or newer fully supported devices. Requires root/admin permissions. See Device.PowerManagementLimitConstraints to check the allowed ranges of values.

Note: Limit is not persistent across reboots or driver unloads. Enable persistent mode to prevent driver from unloading when no application is using the device.

See also: Device.PowerManagementLimitConstraints, Device.PowerManagementDefaultLimit

  • limit: Power management limit in milliwatts to set

A nil error means limit has been set.

Errors:

Wraps nvmlDeviceSetPowerManagementLimit.

func (Device) SetPowerManagementLimitV1

func (d Device) SetPowerManagementLimitV1(limit uint32) error

SetPowerManagementLimitV1 sets new power limit of this device.

For Kepler or newer fully supported devices. Requires root/admin permissions. See Device.PowerManagementLimitConstraints to check the allowed ranges of values.

Note: Limit is not persistent across reboots or driver unloads. Enable persistent mode to prevent driver from unloading when no application is using the device.

See also: Device.PowerManagementLimitConstraints, Device.PowerManagementDefaultLimit

  • limit: Power management limit in milliwatts to set

A nil error means limit has been set.

Errors:

Wraps nvmlDeviceSetPowerManagementLimit.

func (Device) SetPowerManagementLimitV2

func (d Device) SetPowerManagementLimitV2(powerValue *PowerValueV2) error

SetPowerManagementLimitV2 sets new power limit of this device.

For Kepler or newer fully supported devices. Requires root/admin permissions. See Device.PowerManagementLimitConstraints to check the allowed ranges of values. See PowerValueV2 for more information on the struct. This API replaces Device.SetPowerManagementLimit. It can be used as a drop-in replacement for the older version.

Note: Limit is not persistent across reboots or driver unloads. Enable persistent mode to prevent driver from unloading when no application is using the device.

See also: FieldDevPowerAverage, FieldDevPowerInstant, FieldDevPowerMinLimit, FieldDevPowerMaxLimit, FieldDevPowerCurrentLimit

  • powerValue: Power management limit in milliwatts to set

A nil error means limit has been set.

Errors:

Wraps nvmlDeviceSetPowerManagementLimit_v2.

func (Device) SetPowerMizerMode

func (d Device) SetPowerMizerMode(powerMizerMode *DevicePowerMizerModesV1) error

SetPowerMizerMode sets the new power mizer mode.

For Maxwell or newer fully supported devices.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceSetPowerMizerMode.

  • powerMizerMode: Reference in which to set the power mizer mode

A nil error means powerMizerMode has been populated.

Errors:

Wraps nvmlDeviceSetPowerMizerMode_v1.

func (Device) SetRusdSettings

func (d Device) SetRusdSettings(settings *RusdSettingsV1) error

SetRusdSettings sets Read-only user shared data (RUSD) settings for GPU.

Requires root/admin permissions.

Requires CUDA 13.1 (driver r590) or later; see HasDeviceSetRusdSettings.

A nil error means the RUSD setting was successfully set.

Errors:

Wraps nvmlDeviceSetRusdSettings_v1.

func (Device) SetTemperatureThreshold

func (d Device) SetTemperatureThreshold(thresholdType TemperatureThresholds, temp *int32) error

SetTemperatureThreshold sets the temperature threshold for the GPU with the specified threshold type in degrees C.

For Maxwell or newer fully supported devices. See TemperatureThresholds for details on available temperature thresholds.

  • thresholdType: The type of threshold value to be set
  • temp: Reference which hold the value to be set

A nil error means temp has been set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid, thresholdType is invalid or temp is NULL
  • ErrNotSupported: if the device does not have a temperature sensor or is unsupported
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error previousConstants nextDevice Enums

Wraps nvmlDeviceSetTemperatureThreshold.

func (Device) SetVgpuCapabilities

func (d Device) SetVgpuCapabilities(capability DeviceVgpuCapability, state EnableState) error

SetVgpuCapabilities sets the desirable vGPU capability of a device.

Refer to the DeviceVgpuCapability structure for the specific capabilities that can be set. See EnableState for available state.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceSetVgpuCapabilities.

Errors:

Wraps nvmlDeviceSetVgpuCapabilities.

func (Device) SetVgpuHeterogeneousMode

func (d Device) SetVgpuHeterogeneousMode(pHeterogeneousMode *VgpuHeterogeneousMode) error

SetVgpuHeterogeneousMode enables or disables vGPU heterogeneous mode for the device.

When in heterogeneous mode, a vGPU can concurrently host timesliced vGPUs with differing framebuffer sizes. API would return an appropriate error code upon unsuccessful activation. For example, the heterogeneous mode set will fail with error ErrInUse if any vGPU instance is active on the device. The caller of this API is expected to shutdown the vGPU VMs and retry setting the mode. On KVM platform, setting heterogeneous mode is allowed, if no MDEV device is created on the device, else will fail with same error ErrInUse. On successful return, the function updates the vGPU heterogeneous mode with the user provided pHeterogeneousMode->mode. pHeterogeneousMode->version is the version number of the structure VgpuHeterogeneousMode, the caller should set the correct version number to set the vGPU heterogeneous mode.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceSetVgpuHeterogeneousMode.

Errors:

Wraps nvmlDeviceSetVgpuHeterogeneousMode.

func (Device) SetVgpuSchedulerState deprecated

func (d Device) SetVgpuSchedulerState(pSchedulerState *VgpuSchedulerSetState) error

SetVgpuSchedulerState sets the vGPU scheduler state.

For Pascal or newer fully supported devices. The scheduler state change won’t persist across module load/unload. Scheduler state and params will be allowed to set only when no VM is running. In VgpuSchedulerSetState, IFF enableARRMode is enabled then provide avgFactorForARR and frequency as input. If enableARRMode is disabled then provide timeslice as input.

  • pSchedulerState: vGPU pSchedulerState to set

A nil error means vGPU scheduler state has been successfully set.

Errors:

  • ErrInvalidArgument: If pSchedulerState is NULL or device is invalid
  • ErrNotSupported: If MIG is enabled or device not in vGPU host mode or if any vGPU instance currently exists on the device
  • ErrResetRequired: If setting pSchedulerState failed with fatal error, reboot is required to overcome from this error.
  • ErrUnknown: On any unexpected error

Wraps nvmlDeviceSetVgpuSchedulerState.

Deprecated: Deprecated in CUDA 13.0. Use Device.SetVgpuSchedulerStateV2 instead.

func (Device) SetVgpuSchedulerStateV1 deprecated

func (d Device) SetVgpuSchedulerStateV1(pSchedulerState *VgpuSchedulerSetState) error

SetVgpuSchedulerStateV1 sets the vGPU scheduler state.

For Pascal or newer fully supported devices. The scheduler state change won’t persist across module load/unload. Scheduler state and params will be allowed to set only when no VM is running. In VgpuSchedulerSetState, IFF enableARRMode is enabled then provide avgFactorForARR and frequency as input. If enableARRMode is disabled then provide timeslice as input.

  • pSchedulerState: vGPU pSchedulerState to set

A nil error means vGPU scheduler state has been successfully set.

Errors:

  • ErrInvalidArgument: If pSchedulerState is NULL or device is invalid
  • ErrNotSupported: If MIG is enabled or device not in vGPU host mode or if any vGPU instance currently exists on the device
  • ErrResetRequired: If setting pSchedulerState failed with fatal error, reboot is required to overcome from this error.
  • ErrUnknown: On any unexpected error

Wraps nvmlDeviceSetVgpuSchedulerState.

Deprecated: Deprecated in CUDA 13.0. Use Device.SetVgpuSchedulerStateV2 instead.

func (Device) SetVgpuSchedulerStateV2

func (d Device) SetVgpuSchedulerStateV2(pSchedulerState *VgpuSchedulerStateV2) error

SetVgpuSchedulerStateV2 sets the vGPU scheduler state.

For Pascal or newer fully supported devices. The scheduler state change won’t persist across module load/unload. Scheduler state and params will be allowed to set only when no VM is running.

Requires CUDA 13.2 (driver r595) or later; see HasDeviceSetVgpuSchedulerStateV2.

  • pSchedulerState: vGPU pSchedulerState to set

A nil error means vGPU scheduler state has been successfully set.

Errors:

  • ErrInvalidArgument: If pSchedulerState is NULL or device is invalid
  • ErrNotSupported: If MIG is enabled or device not in vGPU host mode or if any vGPU instance currently exists on the device
  • ErrResetRequired: If setting pSchedulerState failed with fatal error, reboot is required to overcome from this error.
  • ErrUnknown: On any unexpected error

Wraps nvmlDeviceSetVgpuSchedulerState_v2.

func (Device) SetVirtualizationMode

func (d Device) SetVirtualizationMode(virtualMode GpuVirtualizationMode) error

SetVirtualizationMode is used to set the virtualization mode corresponding to the GPU.

For Kepler or newer fully supported devices.

  • virtualMode: virtualization mode. One of NVML_GPU_VIRTUALIZATION_?

A nil error means virtualMode is set.

Errors:

Wraps nvmlDeviceSetVirtualizationMode.

func (Device) SetupNvlinkNvleEncryptionKey

func (d Device) SetupNvlinkNvleEncryptionKey(encryptionKey *NvlinkSetupNvleEncryptionKeyV1) error

SetupNvlinkNvleEncryptionKey wraps nvmlDeviceSetupNvlinkNvleEncryptionKey_v1.

Requires CUDA 13.5 (driver r620) or later; see HasDeviceSetupNvlinkNvleEncryptionKey.

func (Device) SramEccErrorStatus

func (d Device) SramEccErrorStatus(status *EccSramErrorStatus) error

SramEccErrorStatus gets SRAM ECC error status of this device.

For Ampere or newer fully supported devices. Requires root/admin permissions. See EccSramErrorStatus for more information on the struct.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetSramEccErrorStatus.

  • status: Returns SRAM ECC error status

A nil error means limit has been set.

Errors:

Wraps nvmlDeviceGetSramEccErrorStatus.

func (Device) SramUniqueUncorrectedEccErrorCounts

func (d Device) SramUniqueUncorrectedEccErrorCounts(errorCounts *EccSramUniqueUncorrectedErrorCounts) error

SramUniqueUncorrectedEccErrorCounts retrieves the counts of SRAM unique uncorrected ECC errors.

For Blackwell or newer fully supported devices. Reads SRAM unique uncorrected ECC error counts. The total number of unique errors is returned by errorCounts->entryCount. Error counts are returned as an array of in the caller-supplied buffer pointed at by errorCounts->entries. Each error count entry holds the location/address of the unique error, the error count and whether the error is parity or not. To read SRAM unique uncorrected ECC error counts, first determine the size of buffer required to hold the error counts by invoking the function with errorCounts->entries set to NULL. The required array size is returned in errorCounts->entryCount . The caller should allocate a buffer of size “errorCounts->entryCount * sizeof(EccSramUniqueUncorrectedErrorCounts)”. Invoke the function again with the allocated buffer passed in errorCounts->entries. This time errorCounts->entryCount will be taken as the entry array size that caller allocates for errorCounts->entries. On successful return of the second query, the function updates errorCounts->entries with all unique errors. This may fail if errorCounts->entryCount is smaller than the actual number of unique errors. This can happen in cases like new errors occur since the previous query of errorCounts->entryCount. No matter the query succeeds or not, the latest number of unique errors will be returned in errorCounts->entryCount.

Note: The query is only supported when ECC mode is enabled.

Requires CUDA 13.0 (driver r580) or later; see HasDeviceGetSramUniqueUncorrectedEccErrorCounts.

  • errorCounts: Pointer to caller-supplied array which returns the unique error count entries

A nil error means utilization has been populated.

Errors:

Wraps nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts.

func (Device) SupportedClocksEventReasons

func (d Device) SupportedClocksEventReasons() (uint64, error)

SupportedClocksEventReasons retrieves bitmask of supported clocks event reasons that can be returned by Device.CurrentClocksEventReasons.

For all fully supported products. This method is not supported in virtual machines running virtual GPU (vGPU).

See also: NvmlClocksEventReasons, Device.CurrentClocksEventReasons

  • supportedClocksEventReasons: Reference in which to return bitmask of supported clocks event reasons

A nil error means supportedClocksEventReasons has been set.

Errors:

Wraps nvmlDeviceGetSupportedClocksEventReasons.

func (Device) SupportedClocksThrottleReasons deprecated

func (d Device) SupportedClocksThrottleReasons(supportedClocksThrottleReasons *uint64) error

SupportedClocksThrottleReasons stores the clocks throttle reasons the device supports in supportedClocksThrottleReasons.

Wraps nvmlDeviceGetSupportedClocksThrottleReasons.

Deprecated: Deprecated in CUDA 13.0. Use Device.SupportedClocksEventReasons instead.

func (Device) SupportedEventTypes

func (d Device) SupportedEventTypes() (uint64, error)

SupportedEventTypes returns information about events supported on device.

For Fermi or newer fully supported devices. Events are not supported on Windows. So this function returns an empty mask on Windows.

See also: Event Types, Device.RegisterEvents

  • eventTypes: Reference in which to return bitmask of supported events

A nil error means the eventTypes has been set.

Errors:

Wraps nvmlDeviceGetSupportedEventTypes.

func (Device) SupportedGraphicsClocks

func (d Device) SupportedGraphicsClocks(memoryClockMHz uint32, buf []uint32) ([]uint32, error)

SupportedGraphicsClocks retrieves the list of possible graphics clocks that can be used as an argument for Device.SetGpuLockedClocks.

For Kepler or newer fully supported devices.

See also: Device.SetGpuLockedClocks

  • memoryClockMHz: Memory clock for which to return possible graphics clocks
  • count: Reference in which to provide the clocksMHz array size, and to return the number of elements
  • clocksMHz: Reference in which to return the clocks in MHz

A nil error means count and clocksMHz have been populated.

Errors:

Wraps nvmlDeviceGetSupportedGraphicsClocks.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) SupportedMemoryClocks

func (d Device) SupportedMemoryClocks(buf []uint32) ([]uint32, error)

SupportedMemoryClocks retrieves the list of possible memory clocks that can be used as an argument for Device.SetMemoryLockedClocks.

For Kepler or newer fully supported devices.

See also: Device.SetMemoryLockedClocks

  • count: Reference in which to provide the clocksMHz array size, and to return the number of elements
  • clocksMHz: Reference in which to return the clock in MHz

A nil error means count and clocksMHz have been populated.

Errors:

Wraps nvmlDeviceGetSupportedMemoryClocks.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) SupportedPerformanceStates

func (d Device) SupportedPerformanceStates(pstates *Pstates, size uint32) error

SupportedPerformanceStates gets all supported Performance States (P-States) for the device.

The returned array would contain a contiguous list of valid P-States supported by the device. If the number of supported P-States is fewer than the size of the array supplied missing elements would contain PstateUnknown. The number of elements in the returned list will never exceed MaxGpuPerfPstates.

  • pstates: Container to return the list of performance states supported by device
  • size: Size of the supplied pstates array in bytes

A nil error means pstates array has been retrieved.

Errors:

Wraps nvmlDeviceGetSupportedPerformanceStates.

func (Device) SupportedVgpus

func (d Device) SupportedVgpus(buf []VgpuTypeId) ([]VgpuTypeId, error)

SupportedVgpus retrieves the supported vGPU types on a physical GPU (device).

An array of supported vGPU types for the physical GPU indicated by device is returned in the caller-supplied buffer pointed at by vgpuTypeIds. The element count of VgpuTypeId array is passed in vgpuCount, and vgpuCount is used to return the number of vGPU types written to the buffer. If the supplied buffer is not large enough to accommodate the vGPU type array, the function returns ErrInsufficientSize, with the element count of VgpuTypeId array required in vgpuCount. To query the number of vGPU types supported for the GPU, call this function with *vgpuCount = 0. The code will return ErrInsufficientSize, or Success if no vGPU types are supported.

  • vgpuCount: Pointer to caller-supplied array size, and returns number of vGPU types
  • vgpuTypeIds: Pointer to caller-supplied array in which to return list of vGPU types

Errors:

Wraps nvmlDeviceGetSupportedVgpus.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) TargetFanSpeed

func (d Device) TargetFanSpeed(fan uint32) (uint32, error)

TargetFanSpeed retrieves the intended target speed of the device’s specified fan.

Normally, the driver dynamically adjusts the fan based on the needs of the GPU. But when user set fan speed using Device.SetFanSpeed, the driver will attempt to make the fan achieve the setting in Device.SetFanSpeed. The actual current speed of the fan is reported in Device.FanSpeedV2. For all discrete products with dedicated fans. The fan speed is expressed as a percentage of the product’s maximum noise tolerance fan speed. This value may exceed 100% in certain cases.

  • fan: The index of the target fan, zero indexed
  • targetSpeed: Reference in which to return the fan speed percentage

A nil error means speed has been set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid, fan is not an acceptable index, or speed is NULL
  • ErrNotSupported: if the device does not have a fan or is newer than Maxwell
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetTargetFanSpeed.

func (Device) Temperature deprecated

func (d Device) Temperature(sensorType TemperatureSensors) (uint32, error)

Temperature returns the temperature of the given sensor, in degrees Celsius.

Wraps nvmlDeviceGetTemperature.

Deprecated: Deprecated in CUDA 13.0. Use Device.TemperatureV instead.

func (Device) TemperatureThreshold

func (d Device) TemperatureThreshold(thresholdType TemperatureThresholds) (uint32, error)

TemperatureThreshold retrieves the temperature threshold for the GPU with the specified threshold type in degrees C.

For Kepler or newer fully supported devices. See TemperatureThresholds for details on available temperature thresholds.

Note: This API is no longer the preferred interface for retrieving the following temperature thresholds on Ada and later architectures: TemperatureThresholdShutdown, TemperatureThresholdSlowdown, TemperatureThresholdMemMax and TemperatureThresholdGpuMax. Support for reading these temperature thresholds for Ada and later architectures would be removed from this API in future releases. Please use Device.FieldValues with NVML_FI_DEV_TEMPERATURE_* fields to retrieve temperature thresholds on these architectures.

  • thresholdType: The type of threshold value queried
  • temp: Reference in which to return the temperature reading

A nil error means temp has been set.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInvalidArgument: if device is invalid, thresholdType is invalid or temp is NULL
  • ErrNotSupported: if the device does not have a temperature sensor or is unsupported
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetTemperatureThreshold.

func (Device) TemperatureV

func (d Device) TemperatureV(temperature *Temperature) error

TemperatureV retrieves the current temperature readings (in degrees C) for the given device.

For all products.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceGetTemperatureV.

  • temperature: Structure specifying the sensor type (input) and retrieved temperature value (output)

A nil error means temp has been set.

Errors:

Wraps nvmlDeviceGetTemperatureV.

func (Device) ThermalSettings

func (d Device) ThermalSettings(sensorIndex uint32, pThermalSettings *GpuThermalSettings) error

ThermalSettings is used to execute a list of thermal system instructions.

  • sensorIndex: The index of the thermal sensor
  • pThermalSettings: Reference in which to return the thermal sensor information

A nil error means pThermalSettings has been set.

Errors:

Wraps nvmlDeviceGetThermalSettings.

func (Device) TopologyCommonAncestor

func (d Device) TopologyCommonAncestor(device2 Device, pathInfo *GpuTopologyLevel) error

TopologyCommonAncestor retrieves the common ancestor for two devices For all products.

Supported on Linux only.

  • device2: The identifier of the second device
  • pathInfo: A GpuTopologyLevel that gives the path type

A nil error means pathInfo has been set.

Errors:

Wraps nvmlDeviceGetTopologyCommonAncestor.

func (Device) TopologyNearestGpus

func (d Device) TopologyNearestGpus(level GpuTopologyLevel, buf []Device) ([]Device, error)

TopologyNearestGpus retrieves the set of GPUs that are nearest to a given device at a specific interconnectivity level For all products.

Supported on Linux only.

  • level: The GpuTopologyLevel level to search for other GPUs
  • 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 at level

A nil error means deviceArray or count (if initially zero) has been set.

Errors:

  • ErrInvalidArgument: if device, level, or count is invalid, or deviceArray is NULL with a non-zero count
  • ErrNotSupported: if the device or OS does not support this feature
  • ErrUnknown: an error has occurred in underlying topology discovery

Wraps nvmlDeviceGetTopologyNearestGpus.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) TotalEccErrors

func (d Device) TotalEccErrors(errorType MemoryErrorType, counterType EccCounterType) (uint64, error)

TotalEccErrors retrieves the total ECC error counts for the device.

For Fermi or newer fully supported devices. Only applicable to devices with ECC. Requires InforomEcc version 1.0 or higher. Requires ECC Mode to be enabled. The total error count is the sum of errors across each of the separate memory systems, i.e. the total set of errors across the entire device. See MemoryErrorType for a description of available error types. See EccCounterType for a description of available counter types.

See also: Device.ClearEccErrorCounts

  • errorType: Flag that specifies the type of the errors
  • counterType: Flag that specifies the counter-type of the errors
  • eccCounts: Reference in which to return the specified ECC errors

A nil error means eccCounts has been set.

Errors:

Wraps nvmlDeviceGetTotalEccErrors.

func (Device) TotalEnergyConsumption

func (d Device) TotalEnergyConsumption() (uint64, error)

TotalEnergyConsumption retrieves total energy consumption for this GPU in millijoules (mJ) since the driver was last reloaded.

For Volta or newer fully supported devices.

  • energy: Reference in which to return the energy consumption information

A nil error means energy has been populated.

Errors:

Wraps nvmlDeviceGetTotalEnergyConsumption.

func (Device) UUID

func (d Device) UUID() (string, error)

UUID retrieves the globally unique immutable UUID associated with this device, as a 5 part hexadecimal string, that augments the immutable, board serial identifier.

For all products. The UUID is a globally unique identifier. It is the only available identifier for pre-Fermi-architecture products. It does NOT correspond to any identifier printed on the board. It will not exceed 96 characters in length (including the NULL terminator). See DeviceUuidV2BufferSize. When used with MIG device handles the API returns globally unique UUIDs which can be used to identify MIG devices across both GPU and MIG devices. UUIDs are immutable for the lifetime of a MIG device.

  • uuid: Reference in which to return the GPU UUID
  • length: The maximum allowed length of the string returned in uuid

A nil error means uuid has been set.

Errors:

Wraps nvmlDeviceGetUUID.

func (Device) UnrepairableMemoryFlag

func (d Device) UnrepairableMemoryFlag() (UnrepairableMemoryStatusV1, error)

UnrepairableMemoryFlag gets the unrepairable memory flag for a given GPU.

For Hopper or newer fully supported devices.

Requires CUDA 13.1 (driver r590) or later; see HasDeviceGetUnrepairableMemoryFlag.

Errors:

Wraps nvmlDeviceGetUnrepairableMemoryFlag_v1.

func (Device) UtilizationRates

func (d Device) UtilizationRates() (Utilization, error)

UtilizationRates retrieves the current utilization rates for the device’s major subsystems.

For Fermi or newer fully supported devices. See Utilization for details on available utilization rates.

Note: During driver initialization when ECC is enabled one can see high GPU and Memory Utilization readings. This is caused by ECC Memory Scrubbing mechanism that is performed during driver initialization.

Note: On MIG-enabled GPUs, querying device utilization rates is not currently supported.

  • utilization: Reference in which to return the utilization information

A nil error means utilization has been populated.

Errors:

Wraps nvmlDeviceGetUtilizationRates.

func (Device) ValidateInforom

func (d Device) ValidateInforom() error

ValidateInforom reads the infoROM from the flash and verifies the checksums.

For all products with an inforom.

A nil error means infoROM is not corrupted.

Errors:

Wraps nvmlDeviceValidateInforom.

func (Device) VbiosVersion

func (d Device) VbiosVersion() (string, error)

VbiosVersion gets VBIOS version of the device.

For all products. The VBIOS version may change from time to time. It will not exceed 32 characters in length (including the NULL terminator). See DeviceVbiosVersionBufferSize.

  • version: Reference to which to return the VBIOS version
  • length: The maximum allowed length of the string returned in version

A nil error means version has been set.

Errors:

Wraps nvmlDeviceGetVbiosVersion.

func (Device) VgpuCapabilities

func (d Device) VgpuCapabilities(capability DeviceVgpuCapability) (uint32, error)

VgpuCapabilities retrieves the requested vGPU capability for GPU.

Refer to the DeviceVgpuCapability structure for the specific capabilities that can be queried. The return value reports a non-zero value indicating that the capability is supported, and also reports the capability’s data based on the queried capability. For Maxwell or newer fully supported devices.

  • capability: Specifies the DeviceVgpuCapability to be queried
  • capResult: Specifies that the queried capability is supported, and also returns capability’s data

Errors:

Wraps nvmlDeviceGetVgpuCapabilities.

func (Device) VgpuForceGspUnload

func (d Device) VgpuForceGspUnload() error

VgpuForceGspUnload executes a forced GSP unload operation on a device.

For Ada or newer fully supported devices. Forces the unload of the GSP firmware on a device currently operating in vGPU mode. This operation forcibly removes the GSP from the targeted GPU and terminates all GSP operations.

Note: This is a disruptive operation that will impact any active vGPU instances and should only be used when absolutely necessary, such as during error recovery or maintenance operations.

Warning: This operation may result in a temporary loss of GPU functionality and should be used with caution.

Requires CUDA 13.2 (driver r595) or later; see HasDeviceVgpuForceGspUnload.

A nil error means GSP reset completed successfully.

Errors:

Wraps nvmlDeviceVgpuForceGspUnload.

func (Device) VgpuHeterogeneousMode

func (d Device) VgpuHeterogeneousMode(pHeterogeneousMode *VgpuHeterogeneousMode) error

VgpuHeterogeneousMode gets the vGPU heterogeneous mode for the device.

When in heterogeneous mode, a vGPU can concurrently host timesliced vGPUs with differing framebuffer sizes. On successful return, the function returns pHeterogeneousMode->mode with the current vGPU heterogeneous mode. pHeterogeneousMode->version is the version number of the structure VgpuHeterogeneousMode, the caller should set the correct version number to retrieve the vGPU heterogeneous mode. pHeterogeneousMode->mode can either be FeatureEnabled or FeatureDisabled.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetVgpuHeterogeneousMode.

Errors:

Wraps nvmlDeviceGetVgpuHeterogeneousMode.

func (Device) VgpuInstancesUtilizationInfo

func (d Device) VgpuInstancesUtilizationInfo(vgpuUtilInfo *VgpuInstancesUtilizationInfo) error

VgpuInstancesUtilizationInfo retrieves recent utilization for vGPU instances running on a physical GPU (device).

For Kepler or newer fully supported devices. Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, video decoder, jpeg decoder, and OFA for vGPU instances running on a device. Utilization values are returned as an array of utilization sample structures in the caller-supplied buffer pointed at by vgpuUtilInfo->vgpuUtilArray. One utilization sample structure is returned per vGPU instance, and includes the CPU timestamp at which the samples were recorded. Individual utilization values are returned as “unsigned int” values in Value unions. The function sets the caller-supplied vgpuUtilInfo->sampleValType to ValueTypeUnsignedInt to indicate the returned value type. To read utilization values, first determine the size of buffer required to hold the samples by invoking the function with vgpuUtilInfo->vgpuUtilArray set to NULL. The function will return ErrInsufficientSize, with the current vGPU instance count in vgpuUtilInfo->vgpuInstanceCount, or Success if the current vGPU instance count is zero. The caller should allocate a buffer of size vgpuUtilInfo->vgpuInstanceCount * sizeof(nvmlVgpuInstanceUtilizationInfo_t). Invoke the function again with the allocated buffer passed in vgpuUtilInfo->vgpuUtilArray, and vgpuUtilInfo->vgpuInstanceCount set to the number of entries the buffer is sized for. On successful return, the function updates vgpuUtilInfo->vgpuInstanceCount with the number of vGPU utilization sample structures that were actually written. This may differ from a previously read value as vGPU instances are created or destroyed. vgpuUtilInfo->lastSeenTimeStamp represents the CPU timestamp in microseconds at which utilization samples were last read. Set it to 0 to read utilization based on all the samples maintained by the driver’s internal sample buffer. Set vgpuUtilInfo->lastSeenTimeStamp to a timeStamp retrieved from a previous query to read utilization since the previous query.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetVgpuInstancesUtilizationInfo.

A nil error means utilization samples are successfully retrieved.

Errors:

  • ErrArgumentVersionMismatch: If the version of vgpuUtilInfo is invalid
  • ErrGpuIsLost: If the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: If vgpuUtilInfo->vgpuUtilArray is NULL, or the buffer size of vgpuUtilInfo->vgpuInstanceCount is too small. The caller should check the current vGPU instance count from the returned vgpuUtilInfo->vgpuInstanceCount, and call the function again with a buffer of size vgpuUtilInfo->vgpuInstanceCount * sizeof(nvmlVgpuInstanceUtilizationInfo_t)
  • ErrInvalidArgument: If device is invalid, vgpuUtilInfo is NULL, or vgpuUtilInfo->vgpuInstanceCount is 0
  • ErrNotFound: If sample entries are not found
  • ErrNotSupported: If vGPU is not supported by the device
  • ErrUninitialized: If the library has not been successfully initialized
  • ErrUnknown: On any unexpected error

Wraps nvmlDeviceGetVgpuInstancesUtilizationInfo.

func (Device) VgpuMetadata

func (d Device) VgpuMetadata(pgpuMetadata *VgpuPgpuMetadata, bufferSize *uint32) error

VgpuMetadata returns a vGPU metadata structure for the physical GPU indicated by device.

The structure contains information about the GPU and the currently installed NVIDIA host driver version that’s controlling it, together with an opaque data section containing internal state. The caller passes in a buffer via pgpuMetadata, with the size of the buffer in bufferSize. If the pgpuMetadata structure is too large to fit in the supplied buffer, the function returns ErrInsufficientSize with the size needed in bufferSize.

  • pgpuMetadata: Pointer to caller-supplied buffer into which pgpuMetadata is written
  • bufferSize: Pointer to size of pgpuMetadata buffer

A nil error means GPU metadata structure was successfully returned.

Errors:

  • ErrInsufficientSize: pgpuMetadata buffer is too small, required size is returned in bufferSize
  • ErrInvalidArgument: if bufferSize is NULL or device is invalid; if pgpuMetadata is NULL and the value of bufferSize is not 0.
  • ErrNotSupported: vGPU is not supported by the system
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetVgpuMetadata.

func (Device) VgpuProcessUtilization

func (d Device) VgpuProcessUtilization(lastSeenTimeStamp uint64, buf []VgpuProcessUtilizationSample) ([]VgpuProcessUtilizationSample, error)

VgpuProcessUtilization retrieves current utilization for processes running on vGPUs on a physical GPU (device).

For Maxwell or newer fully supported devices. Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, and video decoder for processes running on vGPU instances active on a device. Utilization values are returned as an array of utilization sample structures in the caller-supplied buffer pointed at by utilizationSamples. One utilization sample structure is returned per process running on vGPU instances, that had some non-zero utilization during the last sample period. It includes the CPU timestamp at which the samples were recorded. Individual utilization values are returned as “unsigned int” values. To read utilization values, first determine the size of buffer required to hold the samples by invoking the function with utilizationSamples set to NULL. The function will return ErrInsufficientSize, with the current vGPU instance count in vgpuProcessSamplesCount. The caller should allocate a buffer of size vgpuProcessSamplesCount * sizeof(VgpuProcessUtilizationSample). Invoke the function again with the allocated buffer passed in utilizationSamples, and vgpuProcessSamplesCount set to the number of entries the buffer is sized for. On successful return, the function updates vgpuSubProcessSampleCount with the number of vGPU sub process utilization sample structures that were actually written. This may differ from a previously read value depending on the number of processes that are active in any given sample period. lastSeenTimeStamp represents the CPU timestamp in microseconds at which utilization samples were last read. Set it to 0 to read utilization based on all the samples maintained by the driver’s internal sample buffer. Set lastSeenTimeStamp to a timeStamp retrieved from a previous query to read utilization since the previous query.

  • lastSeenTimeStamp: Return only samples with timestamp greater than lastSeenTimeStamp
  • vgpuProcessSamplesCount: Pointer to caller-supplied array size, and returns number of processes running on vGPU instances
  • utilizationSamples: Pointer to caller-supplied buffer in which vGPU sub process utilization samples are returned

A nil error means utilization samples are successfully retrieved.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: if supplied vgpuProcessSamplesCount is too small to return samples for all vGPU instances currently executing on the device
  • ErrInvalidArgument: if device is invalid, vgpuProcessSamplesCount or a sample count of 0 is passed with a non-NULL utilizationSamples
  • ErrNotFound: if sample entries are not found
  • ErrNotSupported: if vGPU is not supported by the device
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetVgpuProcessUtilization.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) VgpuProcessesUtilizationInfo

func (d Device) VgpuProcessesUtilizationInfo(vgpuProcUtilInfo *VgpuProcessesUtilizationInfo) error

VgpuProcessesUtilizationInfo retrieves recent utilization for processes running on vGPU instances on a physical GPU (device).

For Maxwell or newer fully supported devices. Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, video decoder, jpeg decoder, and OFA for processes running on vGPU instances active on a device. Utilization values are returned as an array of utilization sample structures in the caller-supplied buffer pointed at by vgpuProcUtilInfo->vgpuProcUtilArray. One utilization sample structure is returned per process running on vGPU instances, that had some non-zero utilization during the last sample period. It includes the CPU timestamp at which the samples were recorded. Individual utilization values are returned as “unsigned int” values. To read utilization values, first determine the size of buffer required to hold the samples by invoking the function with vgpuProcUtilInfo->vgpuProcUtilArray set to NULL. The function will return ErrInsufficientSize, with the current processes’ count running on vGPU instances in vgpuProcUtilInfo->vgpuProcessCount. The caller should allocate a buffer of size vgpuProcUtilInfo->vgpuProcessCount * sizeof(VgpuProcessUtilizationSample). Invoke the function again with the allocated buffer passed in vgpuProcUtilInfo->vgpuProcUtilArray, and vgpuProcUtilInfo->vgpuProcessCount set to the number of entries the buffer is sized for. On successful return, the function updates vgpuProcUtilInfo->vgpuProcessCount with the number of vGPU sub process utilization sample structures that were actually written. This may differ from a previously read value depending on the number of processes that are active in any given sample period. vgpuProcUtilInfo->lastSeenTimeStamp represents the CPU timestamp in microseconds at which utilization samples were last read. Set it to 0 to read utilization based on all the samples maintained by the driver’s internal sample buffer. Set vgpuProcUtilInfo->lastSeenTimeStamp to a timeStamp retrieved from a previous query to read utilization since the previous query.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetVgpuProcessesUtilizationInfo.

A nil error means utilization samples are successfully retrieved.

Errors:

  • ErrArgumentVersionMismatch: If the version of vgpuProcUtilInfo is invalid
  • ErrGpuIsLost: If the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: If vgpuProcUtilInfo->vgpuProcUtilArray is null, or supplied vgpuProcUtilInfo->vgpuProcessCount is too small to return samples for all processes on vGPU instances currently executing on the device. The caller should check the current processes count from the returned vgpuProcUtilInfo->vgpuProcessCount, and call the function again with a buffer of size vgpuProcUtilInfo->vgpuProcessCount * sizeof(VgpuProcessUtilizationSample)
  • ErrInvalidArgument: If device is invalid, or vgpuProcUtilInfo is null
  • ErrNotFound: If sample entries are not found
  • ErrNotSupported: If vGPU is not supported by the device
  • ErrUninitialized: If the library has not been successfully initialized
  • ErrUnknown: On any unexpected error

Wraps nvmlDeviceGetVgpuProcessesUtilizationInfo.

func (Device) VgpuSchedulerCapabilities

func (d Device) VgpuSchedulerCapabilities(pCapabilities *VgpuSchedulerCapabilities) error

VgpuSchedulerCapabilities returns the vGPU scheduler capabilities.

The list of supported vGPU schedulers returned in VgpuSchedulerCapabilities is from the NVML_VGPU_SCHEDULER_POLICY_*. This list enumerates the supported scheduler policies if the engine is Graphics type. The other values in VgpuSchedulerCapabilities are also applicable if the engine is Graphics type. For other engine types, it is BEST EFFORT policy. If ARR is supported and enabled, scheduling frequency and averaging factor are applicable else timeSlice is applicable. For Pascal or newer fully supported devices.

  • pCapabilities: Reference in which pCapabilities is written

A nil error means vGPU scheduler capabilities were successfully obtained.

Errors:

Wraps nvmlDeviceGetVgpuSchedulerCapabilities.

func (Device) VgpuSchedulerLog deprecated

func (d Device) VgpuSchedulerLog(pSchedulerLog *VgpuSchedulerLog) error

VgpuSchedulerLog returns the vGPU Software scheduler logs.

pSchedulerLog points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed SchedulerSwMaxLogEntries. To get the entire logs, call the function atleast 5 times a second. For Pascal or newer fully supported devices.

  • pSchedulerLog: Reference in which pSchedulerLog is written

A nil error means vGPU scheduler logs were successfully obtained.

Errors:

Wraps nvmlDeviceGetVgpuSchedulerLog.

Deprecated: Deprecated in CUDA 13.0. Use Device.VgpuSchedulerLogV2 instead.

func (Device) VgpuSchedulerLogV1 deprecated

func (d Device) VgpuSchedulerLogV1(pSchedulerLog *VgpuSchedulerLog) error

VgpuSchedulerLogV1 returns the vGPU Software scheduler logs.

pSchedulerLog points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed SchedulerSwMaxLogEntries. To get the entire logs, call the function atleast 5 times a second. For Pascal or newer fully supported devices.

  • pSchedulerLog: Reference in which pSchedulerLog is written

A nil error means vGPU scheduler logs were successfully obtained.

Errors:

Wraps nvmlDeviceGetVgpuSchedulerLog.

Deprecated: Deprecated in CUDA 13.0. Use Device.VgpuSchedulerLogV2 instead.

func (Device) VgpuSchedulerLogV2

func (d Device) VgpuSchedulerLogV2(pSchedulerLogInfo *VgpuSchedulerLogInfoV2) error

VgpuSchedulerLogV2 returns the vGPU Software scheduler logs for the device.

pSchedulerLogInfo points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed SchedulerSwMaxLogEntries. To get the entire logs, call the function atleast 5 times a second. For Pascal or newer fully supported devices.

Requires CUDA 13.2 (driver r595) or later; see HasDeviceGetVgpuSchedulerLogV2.

  • pSchedulerLogInfo: Reference in which pSchedulerLogInfo is written

A nil error means vGPU scheduler logs were successfully obtained.

Errors:

Wraps nvmlDeviceGetVgpuSchedulerLog_v2.

func (Device) VgpuSchedulerState deprecated

func (d Device) VgpuSchedulerState(pSchedulerState *VgpuSchedulerGetState) error

VgpuSchedulerState returns the vGPU scheduler state.

The information returned in VgpuSchedulerGetState is not relevant if the BEST EFFORT policy is set. For Pascal or newer fully supported devices.

  • pSchedulerState: Reference in which pSchedulerState is returned

A nil error means vGPU scheduler state is successfully obtained.

Errors:

Wraps nvmlDeviceGetVgpuSchedulerState.

Deprecated: Deprecated in CUDA 13.0. Use Device.VgpuSchedulerStateV2 instead.

func (Device) VgpuSchedulerStateV1 deprecated

func (d Device) VgpuSchedulerStateV1(pSchedulerState *VgpuSchedulerGetState) error

VgpuSchedulerStateV1 returns the vGPU scheduler state.

The information returned in VgpuSchedulerGetState is not relevant if the BEST EFFORT policy is set. For Pascal or newer fully supported devices.

  • pSchedulerState: Reference in which pSchedulerState is returned

A nil error means vGPU scheduler state is successfully obtained.

Errors:

Wraps nvmlDeviceGetVgpuSchedulerState.

Deprecated: Deprecated in CUDA 13.0. Use Device.VgpuSchedulerStateV2 instead.

func (Device) VgpuSchedulerStateV2

func (d Device) VgpuSchedulerStateV2(pSchedulerStateInfo *VgpuSchedulerStateInfoV2) error

VgpuSchedulerStateV2 returns the vGPU scheduler state.

The information returned in VgpuSchedulerStateInfoV2 is not relevant if the BEST EFFORT policy is set. For Pascal or newer fully supported devices.

Requires CUDA 13.2 (driver r595) or later; see HasDeviceGetVgpuSchedulerStateV2.

  • pSchedulerStateInfo: Reference in which pSchedulerStateInfo is returned

A nil error means vGPU scheduler state is successfully obtained.

Errors:

Wraps nvmlDeviceGetVgpuSchedulerState_v2.

func (Device) VgpuTypeCreatablePlacements

func (d Device) VgpuTypeCreatablePlacements(vgpuTypeId VgpuTypeId, pPlacementList *VgpuPlacementListV1) error

VgpuTypeCreatablePlacements queries the creatable vGPU placement ID of the vGPU type.

The caller supplies placement array storage sized for the maximum vGPU type instances, obtained through VgpuTypeId.MaxInstances. The creatable vGPU placement IDs may differ over time, as there may be restrictions on what type of vGPU the vGPU instance is running.

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetVgpuTypeCreatablePlacements.

  • vgpuTypeId: Handle to vGPU type. The vGPU type ID
  • pPlacementList: Pointer to the list of vGPU placement structure VgpuPlacementListV1

Errors:

Wraps nvmlDeviceGetVgpuTypeCreatablePlacements.

Note: This plain method uses the floor V1 payload. Version must be VgpuPlacementListV1Version. PlacementIds must be non-nil and Count at least the device/type maximum instance count. Newer payloads use the corresponding WithV2Buffer method. No version retries are performed.

func (Device) VgpuTypeCreatablePlacementsWithV2Buffer

func (device Device) VgpuTypeCreatablePlacementsWithV2Buffer(typ VgpuTypeId, out *VgpuPlacementList) error

VgpuTypeCreatablePlacementsWithV2Buffer uses the explicit V2 placement payload (CUDA 12.8). It binds nvmlDeviceGetVgpuTypeCreatablePlacements, not a separately versioned C function. Version must be VgpuPlacementListV2Version; unsupported versions are returned as errors without retry. Version, Mode, and PlacementIds remain caller-owned.

func (Device) VgpuTypeSupportedPlacements

func (d Device) VgpuTypeSupportedPlacements(vgpuTypeId VgpuTypeId, pPlacementList *VgpuPlacementListV1) error

Requires CUDA 12.4 (driver r550) or later; see HasDeviceGetVgpuTypeSupportedPlacements.

  • vgpuTypeId: Handle to vGPU type. The vGPU type ID
  • pPlacementList: Pointer to the vGPU placement structure VgpuPlacementListV1

Errors:

Wraps nvmlDeviceGetVgpuTypeSupportedPlacements.

Note: This plain method uses the floor V1 payload. Version must be VgpuPlacementListV1Version. PlacementIds must be non-nil and Count at least the device/type maximum instance count. Newer payloads use the corresponding WithV2Buffer method. No version retries are performed.

func (Device) VgpuTypeSupportedPlacementsWithV2Buffer

func (device Device) VgpuTypeSupportedPlacementsWithV2Buffer(typ VgpuTypeId, out *VgpuPlacementList) error

VgpuTypeSupportedPlacementsWithV2Buffer uses the explicit V2 placement payload (CUDA 12.8). It binds nvmlDeviceGetVgpuTypeSupportedPlacements, not a separately versioned C function. Version must be VgpuPlacementListV2Version; unsupported versions are returned as errors without retry. Version, Mode, and PlacementIds remain caller-owned.

func (Device) VgpuUtilization

func (d Device) VgpuUtilization(lastSeenTimeStamp uint64, buf []VgpuInstanceUtilizationSample) ([]VgpuInstanceUtilizationSample, ValueType, error)

VgpuUtilization retrieves current utilization for vGPUs on a physical GPU (device).

For Kepler or newer fully supported devices. Reads recent utilization of GPU SM (3D/Compute), framebuffer, video encoder, and video decoder for vGPU instances running on a device. Utilization values are returned as an array of utilization sample structures in the caller-supplied buffer pointed at by utilizationSamples. One utilization sample structure is returned per vGPU instance, and includes the CPU timestamp at which the samples were recorded. Individual utilization values are returned as “unsigned int” values in Value unions. The function sets the caller-supplied sampleValType to ValueTypeUnsignedInt to indicate the returned value type. To read utilization values, first determine the size of buffer required to hold the samples by invoking the function with utilizationSamples set to NULL. The function will return ErrInsufficientSize, with the current vGPU instance count in vgpuInstanceSamplesCount, or Success if the current vGPU instance count is zero. The caller should allocate a buffer of size vgpuInstanceSamplesCount * sizeof(VgpuInstanceUtilizationSample). Invoke the function again with the allocated buffer passed in utilizationSamples, and vgpuInstanceSamplesCount set to the number of entries the buffer is sized for. On successful return, the function updates vgpuInstanceSampleCount with the number of vGPU utilization sample structures that were actually written. This may differ from a previously read value as vGPU instances are created or destroyed. lastSeenTimeStamp represents the CPU timestamp in microseconds at which utilization samples were last read. Set it to 0 to read utilization based on all the samples maintained by the driver’s internal sample buffer. Set lastSeenTimeStamp to a timeStamp retrieved from a previous query to read utilization since the previous query.

  • lastSeenTimeStamp: Return only samples with timestamp greater than lastSeenTimeStamp
  • sampleValType: Pointer to caller-supplied buffer to hold the type of returned sample values
  • vgpuInstanceSamplesCount: Pointer to caller-supplied array size, and returns number of vGPU instances
  • utilizationSamples: Pointer to caller-supplied buffer in which vGPU utilization samples are returned

A nil error means utilization samples are successfully retrieved.

Errors:

  • ErrGpuIsLost: if the target GPU has fallen off the bus or is otherwise inaccessible
  • ErrInsufficientSize: if supplied vgpuInstanceSamplesCount is too small to return samples for all vGPU instances currently executing on the device
  • ErrInvalidArgument: if device is invalid, vgpuInstanceSamplesCount or sampleValType is NULL, or a sample count of 0 is passed with a non-NULL utilizationSamples
  • ErrNotFound: if sample entries are not found
  • ErrNotSupported: if vGPU is not supported by the device
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlDeviceGetVgpuUtilization.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Device) ViolationStatus deprecated

func (d Device) ViolationStatus(perfPolicyType PerfPolicyType, violTime *ViolationTime) error

ViolationStatus stores in violTime how long the device has violated the given performance policy.

This API will be removed in CUDA 14.0. Translations are as follows: PerfPolicyPower -> FieldDevClocksEventReasonSwPowerCap PerfPolicyThermal -> FieldDevClocksEventReasonSwThermSlowdown PerfPolicySyncBoost -> FieldDevClocksEventReasonSyncBoost PerfPolicyBoardLimit -> FieldDevPerfPolicyBoardLimit PerfPolicyLowUtilization -> FieldDevPerfPolicyLowUtilization PerfPolicyReliability -> FieldDevPerfPolicyReliability PerfPolicyTotalAppClocks -> DEPRECATED, Do not use PerfPolicyTotalBaseClocks -> FieldDevPerfPolicyTotalBaseClocks

Wraps nvmlDeviceGetViolationStatus.

Deprecated: Deprecated in CUDA 13.0. Use Device.FieldValues instead. Use Device.FieldValues to query this data.

func (Device) VirtualizationMode

func (d Device) VirtualizationMode(pVirtualMode *GpuVirtualizationMode) error

VirtualizationMode is used to get the virtualization mode corresponding to the GPU.

For Kepler or newer fully supported devices.

  • pVirtualMode: Reference to virtualization mode. One of NVML_GPU_VIRTUALIZATION_?

A nil error means pVirtualMode is fetched.

Errors:

Wraps nvmlDeviceGetVirtualizationMode.

func (Device) WorkloadPowerProfileClearRequestedProfiles deprecated

func (d Device) WorkloadPowerProfileClearRequestedProfiles(requestedProfiles *WorkloadPowerProfileRequestedProfiles) error

WorkloadPowerProfileClearRequestedProfiles clears Requested Performance Profiles.

For Blackwell or newer fully supported devices. See WorkloadPowerProfileRequestedProfiles for more information on the struct. Clear one or more performance profiles be using the input bitmask requestedProfilesMask, where each bit set corresponds to a supported bit from the perfProfilesMask. These profiles will be removed from the existing list of currently requested profiles. Requires root/admin permissions.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceWorkloadPowerProfileClearRequestedProfiles.

Errors:

Wraps nvmlDeviceWorkloadPowerProfileClearRequestedProfiles.

Deprecated: Deprecated in CUDA 13.1. Use Device.WorkloadPowerProfileUpdateProfiles instead.

func (Device) WorkloadPowerProfileGetCurrentProfiles

func (d Device) WorkloadPowerProfileGetCurrentProfiles(currentProfiles *WorkloadPowerProfileCurrentProfiles) error

WorkloadPowerProfileGetCurrentProfiles gets Current Performance Profiles.

For Blackwell or newer fully supported devices. See WorkloadPowerProfileCurrentProfiles for more information on the struct. This API returns a stuct which contains the current perfProfilesMask, requestedProfilesMask and enforcedProfilesMask. Each bit set in each bitmasks indicates the profile is supported, currently requested or currently engaged, respectively.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceWorkloadPowerProfileGetCurrentProfiles.

Errors:

Wraps nvmlDeviceWorkloadPowerProfileGetCurrentProfiles.

func (Device) WorkloadPowerProfileGetProfilesInfo

func (d Device) WorkloadPowerProfileGetProfilesInfo(profilesInfo *WorkloadPowerProfileProfilesInfo) error

WorkloadPowerProfileGetProfilesInfo gets Performance Profiles Information.

For Blackwell or newer fully supported devices. See WorkloadPowerProfileProfilesInfo for more information on the struct. The mask perfProfilesMask is bitmask of all supported mode indices where the mode is supported if the index is 1. Each supported mode will have a corresponding entry in the perfProfile array which will contain the profileId, the priority of this mode, where the lower the value, the higher the priority, and a conflictingMask, where each bit set in the mask corresponds to a different profile which cannot be used in conjunction with the given profile.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceWorkloadPowerProfileGetProfilesInfo.

Errors:

Wraps nvmlDeviceWorkloadPowerProfileGetProfilesInfo.

func (Device) WorkloadPowerProfileSetRequestedProfiles deprecated

func (d Device) WorkloadPowerProfileSetRequestedProfiles(requestedProfiles *WorkloadPowerProfileRequestedProfiles) error

WorkloadPowerProfileSetRequestedProfiles sets Requested Performance Profiles.

For Blackwell or newer fully supported devices. See WorkloadPowerProfileRequestedProfiles for more information on the struct. Request one or more performance profiles be activated using the input bitmask requestedProfilesMask, where each bit set corresponds to a supported bit from the perfProfilesMask. These profiles will be added to existing list of currently requested profiles. Requires root/admin permissions.

Requires CUDA 12.8 (driver r570) or later; see HasDeviceWorkloadPowerProfileSetRequestedProfiles.

Errors:

Wraps nvmlDeviceWorkloadPowerProfileSetRequestedProfiles.

Deprecated: Deprecated in CUDA 13.1. Use Device.WorkloadPowerProfileUpdateProfiles instead.

func (Device) WorkloadPowerProfileUpdateProfiles

func (d Device) WorkloadPowerProfileUpdateProfiles(updateProfiles *WorkloadPowerProfileUpdateProfilesV1) error

WorkloadPowerProfileUpdateProfiles updates Requested Performance Profiles.

For Blackwell or newer fully supported devices. See WorkloadPowerProfileUpdateProfilesV1 for more information on the struct. Update the requested performance profiles using the input bitmask updateProfilesMask, where each bit set corresponds to a supported bit from the perfProfilesMask. The operation parameter specifies the operation to perform, see PowerProfileOperation for more information. Requires root/admin permissions or access to the NVIDIA WPPS capability.

Requires CUDA 13.1 (driver r590) or later; see HasDeviceWorkloadPowerProfileUpdateProfiles.

Errors:

Wraps nvmlDeviceWorkloadPowerProfileUpdateProfiles_v1.

type DeviceAddressingMode

type DeviceAddressingMode struct {
	Version uint32
	Value   uint32
}

DeviceAddressingMode represents device addressing mode information.

type DeviceAddressingModeType

type DeviceAddressingModeType int32

DeviceAddressingModeType represents device addressing mode values.

const (
	DeviceAddressingModeNone DeviceAddressingModeType = 0 // No active mode
	DeviceAddressingModeHmm  DeviceAddressingModeType = 1 // Heterogeneous Memory Management mode
	DeviceAddressingModeAts  DeviceAddressingModeType = 2 // Address Translation Services mode
)

func (DeviceAddressingModeType) String

func (e DeviceAddressingModeType) String() string

String returns the constant name, or a numeric representation for unknown values.

type DeviceAddressingModeV1

type DeviceAddressingModeV1 = DeviceAddressingMode

DeviceAddressingModeV1 is an alias for DeviceAddressingMode.

type DeviceArchitecture

type DeviceArchitecture uint32

DeviceArchitecture represents simplified chip architecture.

const (
	DeviceArchKepler    DeviceArchitecture = 2          // Devices based on the NVIDIA Kepler architecture
	DeviceArchMaxwell   DeviceArchitecture = 3          // Devices based on the NVIDIA Maxwell architecture
	DeviceArchPascal    DeviceArchitecture = 4          // Devices based on the NVIDIA Pascal architecture
	DeviceArchVolta     DeviceArchitecture = 5          // Devices based on the NVIDIA Volta architecture
	DeviceArchTuring    DeviceArchitecture = 6          // Devices based on the NVIDIA Turing architecture
	DeviceArchAmpere    DeviceArchitecture = 7          // Devices based on the NVIDIA Ampere architecture
	DeviceArchAda       DeviceArchitecture = 8          // Devices based on the NVIDIA Ada architecture
	DeviceArchHopper    DeviceArchitecture = 9          // Devices based on the NVIDIA Hopper architecture
	DeviceArchBlackwell DeviceArchitecture = 10         // Devices based on the NVIDIA Blackwell architecture
	DeviceArchDla       DeviceArchitecture = 11         // Devices based on the NVIDIA DLA architecture.
	DeviceArchDLA2      DeviceArchitecture = 12         // Devices based on the NVIDIA DLA2 architecture.
	DeviceArchRubin     DeviceArchitecture = 13         // Devices based on the NVIDIA Rubin architecture.
	DeviceArchNPU3      DeviceArchitecture = 15         // Devices based on the NVIDIA NPU3 architecture.
	DeviceArchUnknown   DeviceArchitecture = 0xffffffff // Anything else, presumably something newer
)

func (DeviceArchitecture) String

func (e DeviceArchitecture) String() string

String returns the constant name, or a numeric representation for unknown values.

type DeviceAttributes

type DeviceAttributes struct {
	MultiprocessorCount       uint32
	SharedCopyEngineCount     uint32
	SharedDecoderCount        uint32
	SharedEncoderCount        uint32
	SharedJpegCount           uint32
	SharedOfaCount            uint32
	GpuInstanceSliceCount     uint32
	ComputeInstanceSliceCount uint32
	MemorySizeMB              uint64
}

DeviceAttributes represents nvmlDeviceAttributes_t.

type DeviceCapabilities

type DeviceCapabilities struct {
	Version uint32
	CapMask uint32
}

DeviceCapabilities represents device capabilities.

type DeviceCapabilitiesV1

type DeviceCapabilitiesV1 = DeviceCapabilities

DeviceCapabilitiesV1 is an alias for DeviceCapabilities.

type DeviceCurrentClockFreqs

type DeviceCurrentClockFreqs struct {
	Version uint32
	Str     [2048]byte
}

DeviceCurrentClockFreqs represents device current clocks string.

type DeviceCurrentClockFreqsV1

type DeviceCurrentClockFreqsV1 = DeviceCurrentClockFreqs

DeviceCurrentClockFreqsV1 is an alias for DeviceCurrentClockFreqs.

type DeviceGpuRecoveryAction

type DeviceGpuRecoveryAction int32

DeviceGpuRecoveryAction describes the GPU Recovery Action.

const (
	GpuRecoveryActionNone              DeviceGpuRecoveryAction = 0 // No action needed
	GpuRecoveryActionGpuReset          DeviceGpuRecoveryAction = 1 // Reset Gpu
	GpuRecoveryActionNodeReboot        DeviceGpuRecoveryAction = 2 // Reboot Node
	GpuRecoveryActionDrainP2P          DeviceGpuRecoveryAction = 3 // Drain P2P
	GpuRecoveryActionDrainAndReset     DeviceGpuRecoveryAction = 4 // Drain P2P and Reset Gpu
	GpuRecoveryActionRecoverImexDomain DeviceGpuRecoveryAction = 5 // Recover IMEX Domain.
	GpuRecoveryActionBusReset          DeviceGpuRecoveryAction = 6 // Reset the GPU's PCIe bus
	GpuRecoveryActionSystemReboot      DeviceGpuRecoveryAction = 7 // Reboot the system
)

func (DeviceGpuRecoveryAction) String

func (e DeviceGpuRecoveryAction) String() string

String returns the constant name, or a numeric representation for unknown values.

type DevicePerfModes

type DevicePerfModes struct {
	Version uint32
	Str     [2048]byte
}

DevicePerfModes represents device performance modes string.

type DevicePerfModesV1

type DevicePerfModesV1 = DevicePerfModes

DevicePerfModesV1 is an alias for DevicePerfModes.

type DevicePowerMizerModesV1

type DevicePowerMizerModesV1 struct {
	CurrentMode              uint32
	Mode                     uint32
	SupportedPowerMizerModes uint32
}

DevicePowerMizerModesV1 represents nvmlDevicePowerMizerModes_v1_t.

type DeviceVgpuCapability

type DeviceVgpuCapability int32

DeviceVgpuCapability represents device vGPU queryable capabilities.

const (
	DeviceVgpuCapFractionalMultiVgpu            DeviceVgpuCapability = 0  // Query whether the fractional vGPU profiles on this GPU can be used in multi-vGPU configurations
	DeviceVgpuCapHeterogeneousTimesliceProfiles DeviceVgpuCapability = 1  // Query whether the GPU support concurrent execution of timesliced vGPU profiles of differing types
	DeviceVgpuCapHeterogeneousTimesliceSizes    DeviceVgpuCapability = 2  // Query whether the GPU support concurrent execution of timesliced vGPU profiles of differing framebuffer sizes
	DeviceVgpuCapReadDeviceBufferBw             DeviceVgpuCapability = 3  // Query the GPU's read_device_buffer expected bandwidth capacity in megabytes per second
	DeviceVgpuCapWriteDeviceBufferBw            DeviceVgpuCapability = 4  // Query the GPU's write_device_buffer expected bandwidth capacity in megabytes per second
	DeviceVgpuCapDeviceStreaming                DeviceVgpuCapability = 5  // Query whether the vGPU profiles on the GPU supports migration data streaming
	DeviceVgpuCapMiniQuarterGpu                 DeviceVgpuCapability = 6  // Set/Get support for mini-quarter vGPU profiles
	DeviceVgpuCapComputeMediaEngineGpu          DeviceVgpuCapability = 7  // Set/Get support for compute media engine vGPU profiles
	DeviceVgpuCapWarmUpdate                     DeviceVgpuCapability = 8  // Query whether the GPU supports FSR and warm update
	DeviceVgpuCapHomogeneousPlacements          DeviceVgpuCapability = 9  // Query whether the GPU supports reporting of placements of timesliced vGPU profiles with identical framebuffer sizes
	DeviceVgpuCapMigTimeslicingSupported        DeviceVgpuCapability = 10 // Query whether the GPU supports timesliced vGPU on MIG
	DeviceVgpuCapMigTimeslicingEnabled          DeviceVgpuCapability = 11 // Set/Get MIG timesliced mode reporting, without impacting the underlying functionality
	DeviceVgpuCapUvmStun                        DeviceVgpuCapability = 12 // Query whether the GPU supports UVM stun
	DeviceVgpuCapCount                          DeviceVgpuCapability = 13
)

func (DeviceVgpuCapability) String

func (e DeviceVgpuCapability) String() string

String returns the constant name, or a numeric representation for unknown values.

type DramEncryptionInfo

type DramEncryptionInfo struct {
	Version         uint32
	EncryptionState EnableState
}

DramEncryptionInfo represents DRAM Encryption Info.

type DramEncryptionInfoV1

type DramEncryptionInfoV1 = DramEncryptionInfo

DramEncryptionInfoV1 is an alias for DramEncryptionInfo.

type DriverModel

type DriverModel int32

DriverModel represents driver models.

Windows only.

const (
	DriverWddm DriverModel = 0 // WDDM driver model -- GPU treated as a display device
	// DriverWdm: WDM (TCC) model -- GPU treated as a generic compute device
	//
	// Deprecated: Deprecated by NVIDIA.
	DriverWdm  DriverModel = 1
	DriverMcdm DriverModel = 2 // MCDM driver model -- GPU treated as a Microsoft compute device
)

func (DriverModel) String

func (e DriverModel) String() string

String returns the constant name, or a numeric representation for unknown values.

type EccBankRemapperHistogramV1

type EccBankRemapperHistogramV1 struct {
	MaxSpareGroupCount uint32
	NoSpareGroupCount  uint32
}

EccBankRemapperHistogramV1 stores bank remapper histogram.

type EccBankRemapperStatusV1

type EccBankRemapperStatusV1 struct {
	ActiveRemappings   uint32
	InactiveRemappings uint32
	BPending           uint32
	Histogram          EccBankRemapperHistogramV1
}

EccBankRemapperStatusV1 stores bank remapper status.

type EccCounterType

type EccCounterType int32

EccCounterType represents ECC counter types.

Note: Volatile counts are reset each time the driver loads. On Windows this is once per boot. On Linux this can be more frequent. On Linux the driver unloads when no active clients exist. If persistence mode is enabled or there is always a driver client active (e.g. X11), then Linux also sees per-boot behavior. If not, volatile counts are reset each time a compute app is run.

const (
	VolatileEcc         EccCounterType = 0 // Volatile counts are reset each time the driver loads.
	AggregateEcc        EccCounterType = 1 // Aggregate counts persist across reboots (i.e. for the lifetime of the device)
	EccCounterTypeCount EccCounterType = 2 // Count of memory counter types
)

func (EccCounterType) String

func (e EccCounterType) String() string

String returns the constant name, or a numeric representation for unknown values.

type EccErrorCounts deprecated

type EccErrorCounts struct {
	L1Cache      uint64
	L2Cache      uint64
	DeviceMemory uint64
	RegisterFile uint64
}

EccErrorCounts represents detailed ECC error counts for a device.

Deprecated: Use Device.MemoryErrorCounter instead. Different GPU families can have different memory error counters See Device.MemoryErrorCounter.

type EccSramErrorStatus

type EccSramErrorStatus struct {
	Version                 uint32
	AggregateUncParity      uint64
	AggregateUncSecDed      uint64
	AggregateCor            uint64
	VolatileUncParity       uint64
	VolatileUncSecDed       uint64
	VolatileCor             uint64
	AggregateUncBucketL2    uint64
	AggregateUncBucketSm    uint64
	AggregateUncBucketPcie  uint64
	AggregateUncBucketMcu   uint64
	AggregateUncBucketOther uint64
	BThresholdExceeded      uint32
}

EccSramErrorStatus stores SRAM uncorrectable error counters.

type EccSramErrorStatusV1

type EccSramErrorStatusV1 = EccSramErrorStatus

EccSramErrorStatusV1 is an alias for EccSramErrorStatus.

type EccSramUniqueUncorrectedErrorCounts

type EccSramUniqueUncorrectedErrorCounts struct {
	Version    uint32
	EntryCount uint32
	Entries    uintptr
}

EccSramUniqueUncorrectedErrorCounts represents nvmlEccSramUniqueUncorrectedErrorCounts_v1_t.

type EccSramUniqueUncorrectedErrorCountsV1

type EccSramUniqueUncorrectedErrorCountsV1 = EccSramUniqueUncorrectedErrorCounts

EccSramUniqueUncorrectedErrorCountsV1 is an alias for EccSramUniqueUncorrectedErrorCounts.

type EccSramUniqueUncorrectedErrorEntryV1

type EccSramUniqueUncorrectedErrorEntryV1 struct {
	Unit        uint32
	Location    uint32
	Sublocation uint32
	Extlocation uint32
	Address     uint32
	IsParity    uint32
	Count       uint32
}

EccSramUniqueUncorrectedErrorEntryV1 represents nvmlEccSramUniqueUncorrectedErrorEntry_v1_t.

type EnableState

type EnableState int32

EnableState represents generic enable/disable enum.

const (
	FeatureDisabled EnableState = 0 // Feature disabled
	FeatureEnabled  EnableState = 1 // Feature enabled
)

func (EnableState) String

func (e EnableState) String() string

String returns the constant name, or a numeric representation for unknown values.

type EncoderSessionInfo

type EncoderSessionInfo struct {
	SessionId      uint32
	Pid            uint32
	VgpuInstance   VgpuInstance
	CodecType      EncoderType
	HResolution    uint32
	VResolution    uint32
	AverageFps     uint32
	AverageLatency uint32
}

EncoderSessionInfo holds encoder session data.

type EncoderType

type EncoderType int32

EncoderType represents type of encoder for capacity can be queried.

const (
	EncoderQueryH264    EncoderType = 0x00 // H264 encoder
	EncoderQueryHevc    EncoderType = 0x01 // HEVC encoder
	EncoderQueryAV1     EncoderType = 0x02 // AV1 encoder
	EncoderQueryUnknown EncoderType = 0xFF // Unknown encoder
)

func (EncoderType) String

func (e EncoderType) String() string

String returns the constant name, or a numeric representation for unknown values.

type EventData

type EventData struct {
	Device            Device
	EventType         uint64
	EventData         uint64
	GpuInstanceId     uint32
	ComputeInstanceId uint32
}

EventData represents information about occurred event.

type EventDataType

type EventDataType int32

EventDataType represents event data formats returned by EventSet.WaitV3.

const (
	EventDataTypeNvmlEvent           EventDataType = 0 // NVML event-bit data. eventType contains an NVML event bit.
	EventDataTypeGpuOperationalEvent EventDataType = 1 // Structured GPU Operational Event data.
)

func (EventDataType) String

func (e EventDataType) String() string

String returns the constant name, or a numeric representation for unknown values.

type EventSet

type EventSet uintptr

EventSet is an opaque handle for nvmlEventSet_t.

func NewEventSet

func NewEventSet() (EventSet, error)

NewEventSet creates an empty set of events.

Event set should be freed by EventSet.Close For Fermi or newer fully supported devices.

See also: EventSet.Close

  • set: Reference in which to return the event handle

A nil error means the event has been set.

Errors:

Wraps nvmlEventSetCreate.

func (*EventSet) Close

func (e *EventSet) Close() error

Close releases events in the set.

For Fermi or newer fully supported devices.

See also: Device.RegisterEvents

A nil error means the event has been successfully released.

Errors:

If e is zero, Close returns nil. Otherwise Close sets e to zero when the call succeeds and leaves it unchanged when it fails. Only e is zeroed: a copy of it still refers to the released object.

Wraps nvmlEventSetFree.

func (EventSet) ContextCount

func (e EventSet) ContextCount() (EventSetGetContextCountV1, error)

ContextCount gets the number of context records for the most recent event returned by EventSet.WaitV3 on this event set.

This count is tied to the event set, not to a caller-owned copy of EventSetWaitV3. It is replaced by the next successful call to EventSet.WaitV3 on the same event set. For Turing or newer fully supported devices. For Linux only.

See also: EventSet.WaitV3, EventSet.ContextInfo, EventSet.ContextData

Requires CUDA 13.4 (driver r615) or later; see HasEventSetGetContextCount.

  • params: Parameters in which to return the number of context records

A nil error means params has been set.

Errors:

Wraps nvmlEventSetGetContextCount_v1.

func (EventSet) ContextData

func (e EventSet) ContextData(params *EventSetGetContextDataV1) error

ContextData copies the raw payload for a context record from the most recent event returned by EventSet.WaitV3.

Passing params->data as NULL performs a size query. In that case params->dataSize is set to the required payload size and the function returns ErrInsufficientSize when the payload is non-empty. If the context payload is empty, params->dataSize is set to 0 and the function returns Success. For Turing or newer fully supported devices. For Linux only.

See also: EventSet.WaitV3, EventSet.ContextCount, EventSet.ContextInfo

Requires CUDA 13.4 (driver r615) or later; see HasEventSetGetContextData.

  • params: Context index, optional data buffer, and buffer size

A nil error means the raw context payload has been copied.

Errors:

Wraps nvmlEventSetGetContextData_v1.

func (EventSet) ContextInfo

func (e EventSet) ContextInfo(index uint32) (EventSetGetContextInfoV1, error)

ContextInfo gets metadata for a context record from the most recent event returned by EventSet.WaitV3.

The returned metadata identifies the NVML public interpretation, the source-defined context payload type, payload size, and payload format version. The raw payload for any context record can be copied with EventSet.ContextData. When nvmlGpuOperationalEventContextType names a type-specific accessor, callers may use that accessor instead. Metadata is replaced by the next successful call to EventSet.WaitV3 on the same event set. For Turing or newer fully supported devices. For Linux only.

See also: EventSetGetContextInfoV1, EventSet.ContextCount, EventSet.ContextData

Requires CUDA 13.4 (driver r615) or later; see HasEventSetGetContextInfo.

  • params: Context index and returned context metadata

A nil error means the context metadata has been returned.

Errors:

Wraps nvmlEventSetGetContextInfo_v1.

func (EventSet) GpuOperationalEventContextLegacyXid

func (e EventSet) GpuOperationalEventContextLegacyXid(index uint32) (EventSetGetGpuOperationalEventContextLegacyXidV1, error)

GpuOperationalEventContextLegacyXid gets decoded GPU legacy-Xid context data for a context record from the most recent event returned by EventSet.WaitV3.

This helper succeeds only for context records whose nvmlGpuOperationalEventContextType is GpuOperationalEventContextTypeLegacyXid. Other context records remain available through EventSet.ContextData. For Turing or newer fully supported devices. For Linux only.

See also: EventSetGetGpuOperationalEventContextLegacyXidV1, EventSet.ContextInfo, EventSet.ContextData

Requires CUDA 13.4 (driver r615) or later; see HasEventSetGetGpuOperationalEventContextLegacyXid.

  • params: Context index and returned legacy-Xid data

A nil error means the GPU legacy-Xid context has been returned.

Errors:

Wraps nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1.

func (EventSet) RegisterGpuOperationalEvents

func (e EventSet) RegisterGpuOperationalEvents(config *GpuOperationalEventConfigV1) error

RegisterGpuOperationalEvents adds a GPU Operational Event subscription to an event set.

This API is separate from Device.RegisterEvents. Calling this API opts the event set into the structured GPU Operational Event format for the target GPU UUID. Subscriptions are identified by config; registering the same subscription more than once is treated as success. Device.RegisterEvents and EventSet.RegisterGpuOperationalEvents may both be used on the same event set. In that mixed-subscription model, NVML event-bit subscriptions continue to deliver event bits such as nvmlEventTypeXidCriticalError, while GPU Operational Event subscriptions deliver EventDataTypeGpuOperationalEvent records through EventSet.WaitV3 with eventType set to nvmlEventTypeNone. The same underlying incident may generate both an NVML event-bit notification and a structured notification. This API supports GPU UUID subscriptions. For Turing or newer fully supported devices. For Linux only.

See also: GpuOperationalEventConfigV1, EventSet.WaitV3, EventSet.Close

Requires CUDA 13.4 (driver r615) or later; see HasEventSetRegisterGpuOperationalEvents.

  • config: GPU Operational Event subscription configuration

A nil error means the GPU Operational Event subscription was registered.

Errors:

Wraps nvmlEventSetRegisterGpuOperationalEvents_v1.

func (EventSet) Wait

func (e EventSet) Wait(data *EventData, timeoutms uint32) error

Wait waits on events and delivers events.

For Fermi or newer fully supported devices. If some events are ready to be delivered at the time of the call, function returns immediately. If there are no events ready to be delivered, function sleeps till event arrives but not longer than specified timeout. This function in certain conditions can return before specified timeout passes (e.g. when interrupt arrives) On Windows, in case of Xid error, the function returns the most recent Xid error type seen by the system. If there are multiple Xid errors generated before EventSet.Wait is invoked then the last seen Xid error type is returned for all Xid error events. On Linux, every Xid error event would return the associated event data and other information if applicable. In MIG mode, if device handle is provided, the API reports all the events for the available instances, only if the caller has appropriate privileges. In absence of required privileges, only the events which affect all the instances (i.e. whole device) are reported. This API does not currently support per-instance event reporting using MIG device handles.

See also: Event Types, Device.RegisterEvents

  • data: Reference in which to return event data
  • timeoutms: Maximum amount of wait time in milliseconds for registered event

A nil error means the data has been set.

Errors:

Wraps nvmlEventSetWait, bound as nvmlEventSetWait_v2.

func (EventSet) WaitV3

func (e EventSet) WaitV3(timeoutMs uint32) (EventSetWaitV3, error)

WaitV3 waits on an event set and returns the next event in the extended event format.

This API is the unified wait surface for NVML event-bit subscriptions registered with Device.RegisterEvents and structured GPU Operational Event subscriptions registered with EventSet.RegisterGpuOperationalEvents. The returned format is distinguished by dataType in params. If dataType is EventDataTypeNvmlEvent, the event came from the Device.RegisterEvents path, eventType is an NVML event bit such as nvmlEventTypeXidCriticalError, and the existing fields preserve their historical semantics. If dataType is EventDataTypeGpuOperationalEvent, the event came from the structured format, eventType is nvmlEventTypeNone, and the structured metadata fields are populated. When an event set contains only NVML event-bit subscriptions, this API normalizes those events into EventSetWaitV3. When an event set contains both NVML event-bit and structured subscriptions, each successful call returns the next available event from either path. Clients should branch on dataType to determine which format was returned. An event set is not required to have structured GPU Operational Event subscriptions to be used with this API. Context records for the returned event, if any, are made available through EventSet.ContextCount, EventSet.ContextInfo, and EventSet.ContextData. Context records remain associated with the event set until the next successful call to EventSet.WaitV3 on the same event set or until the event set is freed. For Turing or newer fully supported devices. For Linux only.

See also: EventSetWaitV3, Device.RegisterEvents, EventSet.RegisterGpuOperationalEvents, EventSet.ContextCount

Requires CUDA 13.4 (driver r615) or later; see HasEventSetWaitV3.

  • params: Wait parameters and returned event data

A nil error means the event data has been set.

Errors:

Wraps nvmlEventSetWait_v3.

type EventSetGetContextCountV1

type EventSetGetContextCountV1 struct {
	Count uint32
}

EventSetGetContextCountV1 represents parameters for retrieving the number of context records associated with the most recent event.

type EventSetGetContextDataV1

type EventSetGetContextDataV1 struct {
	Data     uintptr
	Index    uint32
	DataSize uint32
}

EventSetGetContextDataV1 represents parameters for retrieving raw context data associated with the most recent event.

type EventSetGetContextInfoV1

type EventSetGetContextInfoV1 struct {
	Index                              uint32
	NvmlGpuOperationalEventContextType uint32
	SourceEventContextType             uint32
	DataSize                           uint32
	DataFormatVersion                  uint16
}

EventSetGetContextInfoV1 represents parameters for retrieving context metadata associated with the most recent event.

type EventSetGetGpuOperationalEventContextLegacyXidV1

type EventSetGetGpuOperationalEventContextLegacyXidV1 struct {
	Index   uint32
	XidCode uint32
}

EventSetGetGpuOperationalEventContextLegacyXidV1 represents parameters for retrieving decoded GPU legacy-Xid context data.

type EventSetWaitV3

type EventSetWaitV3 struct {
	TimeoutMs         uint32
	DataType          uint32
	Uuid              [96]byte
	SourceModule      [16]byte
	EventType         uint64
	EventData         uint64
	GroupCursor       uint64
	InstanceId        uint64
	TimestampUsec     uint64
	TraceId           uint64
	GpuInstanceId     uint32
	ComputeInstanceId uint32
	Severity          uint32
	CategoryId        uint32
	ModuleEventCode   uint32
	Scope             uint32
	Originator        uint32
	ModuleInstance    uint32
	ChipletId         uint32
	LogLevel          uint32
	Attributes        uint32
	GroupCperSize     uint32
	GroupAttributes   uint32
	GroupSize         uint8
	GroupIndex        uint8
}

EventSetWaitV3 represents parameters for waiting on an event set with EventSet.WaitV3.

This structure supplies the wait timeout and returns either NVML event-bit or structured event data. For NVML event-bit data, dataType is EventDataTypeNvmlEvent, eventType contains the NVML event bit, fields such as eventData, gpuInstanceId, and computeInstanceId preserve existing semantics, and structured-only fields are set to 0 or empty values. For structured GPU Operational Events, dataType is EventDataTypeGpuOperationalEvent, eventType is set to EventTypeNone, and the structured metadata fields are populated. Clients that subscribe to both NVML event-bit and structured formats on the same event set should branch on dataType to determine which format was returned. During the transition period, the same underlying incident may generate both an NVML event-bit notification and a structured notification.

type ExcludedDeviceInfo

type ExcludedDeviceInfo struct {
	PciInfo PciInfo
	Uuid    [80]byte
}

ExcludedDeviceInfo represents excluded GPU device information.

func GetExcludedDeviceInfoByIndex

func GetExcludedDeviceInfoByIndex(index uint32) (ExcludedDeviceInfo, error)

GetExcludedDeviceInfoByIndex acquires the device information for an excluded GPU device, based on its index.

For all products. Valid indices are derived from the deviceCount returned by GetExcludedDeviceCount. For example, if deviceCount is 2 the valid indices are 0 and 1, corresponding to GPU 0 and GPU 1.

See also: GetExcludedDeviceCount

  • index: The index of the target GPU, >= 0 and < deviceCount
  • info: Reference in which to return the device information

A nil error means device has been set.

Errors:

  • ErrInvalidArgument: if index is invalid or info is NULL previousEvent Types nextFabric definitions

Wraps nvmlGetExcludedDeviceInfoByIndex.

type FBCSessionInfo

type FBCSessionInfo struct {
	SessionId      uint32
	Pid            uint32
	VgpuInstance   VgpuInstance
	DisplayOrdinal uint32
	SessionType    FBCSessionType
	SessionFlags   uint32
	HMaxResolution uint32
	VMaxResolution uint32
	HResolution    uint32
	VResolution    uint32
	AverageFPS     uint32
	AverageLatency uint32
}

FBCSessionInfo holds FBC session data.

type FBCSessionType

type FBCSessionType int32

FBCSessionType represents frame buffer capture session type.

const (
	FbcSessionTypeUnknown FBCSessionType = 0 // Unknown
	FbcSessionTypeTosys   FBCSessionType = 1 // ToSys
	FbcSessionTypeCuda    FBCSessionType = 2 // Cuda
	FbcSessionTypeVid     FBCSessionType = 3 // Vid
	FbcSessionTypeHwenc   FBCSessionType = 4 // HEnc
)

func (FBCSessionType) String

func (e FBCSessionType) String() string

String returns the constant name, or a numeric representation for unknown values.

type FBCStats

type FBCStats struct {
	SessionsCount  uint32
	AverageFPS     uint32
	AverageLatency uint32
}

FBCStats holds frame buffer capture sessions stats.

type FanControlPolicy

type FanControlPolicy uint32

FanControlPolicy represents device Fan control policy.

const (
	FanPolicyTemperatureContinousSw FanControlPolicy = 0 // Temperature-controlled fan policy.
	FanPolicyManual                 FanControlPolicy = 1 // Manual fan control policy.
)

func (FanControlPolicy) String

func (e FanControlPolicy) String() string

String returns the constant name, or a numeric representation for unknown values.

type FanSpeedInfo

type FanSpeedInfo struct {
	Version uint32
	Fan     uint32
	Speed   uint32
}

FanSpeedInfo represents fan speed info.

type FanSpeedInfoV1

type FanSpeedInfoV1 = FanSpeedInfo

FanSpeedInfoV1 is an alias for FanSpeedInfo.

type FanState

type FanState int32

FanState represents fan state enum.

const (
	FanNormal FanState = 0 // Fan is working properly
	FanFailed FanState = 1 // Fan has failed
)

func (FanState) String

func (e FanState) String() string

String returns the constant name, or a numeric representation for unknown values.

type FieldValue

type FieldValue struct {
	FieldId     uint32
	ScopeId     uint32
	Timestamp   int64
	LatencyUsec int64
	ValueType   ValueType
	NvmlReturn  Result
	Value       Value
}

FieldValue represents information for a Field Value Sample.

type GetCPERV1

type GetCPERV1 struct {
	Cursor     CPERCursorV1
	Buffer     uintptr
	BufferSize uint32
}

GetCPERV1 represents Input/output structure for SystemGetCPER.

type GetMemoryLimitsV1

type GetMemoryLimitsV1 struct {
	NameSpace   uintptr
	SoftLimit   uint64
	HardLimit   uint64
	CurrentUsed uint64
}

GetMemoryLimitsV1 describes the current memory limits that are set for the device.

This structure holds the necessary information that can be used to get the current soft and hard memory limits of a device. The softLimit is the amount of memory that is guaranteed before allocations may fail due to memory pressure. The hardLimit is the maximum amount of memory that can be allocated. This should be cross-referenced with Device.MemoryInfoV2 while in that cgroup to see how much memory is actually available to allocate for the device. No limit is set when softLimit is 0 and hardLimit is DeviceMemoryLimitMax.

type GpmMetric

type GpmMetric struct {
	MetricId   uint32
	NvmlReturn Result
	Value      float64
	MetricInfo [3]uint64
}

GpmMetric represents GPM metric information.

func GpmMetrics

func GpmMetrics(sample1, sample2 GpmSample, ids ...GpmMetricId) ([]GpmMetric, error)

GpmMetrics calculates the requested metrics from two caller-owned samples. The caller must collect samples more than 100 ms apart as required by NVML. Each metric retains its NvmlReturn; a nil query error does not mean every metric succeeded. An empty list makes no call. At most 333 IDs are accepted.

Example
package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	metrics, err := nvml.GpmMetrics(0, 0)
	fmt.Println(len(metrics), err)
}
Output:
0 <nil>

type GpmMetricId

type GpmMetricId int32

GpmMetricId represents GPM Metric Identifiers.

const (
	GpmMetricGraphicsUtil           GpmMetricId = 1   // Percentage of time any compute/graphics app was active on the GPU. 0.0 - 100.0
	GpmMetricSmUtil                 GpmMetricId = 2   // Percentage of SMs that were busy. 0.0 - 100.0
	GpmMetricSmOccupancy            GpmMetricId = 3   // Percentage of warps that were active vs theoretical maximum. 0.0 - 100.0
	GpmMetricIntegerUtil            GpmMetricId = 4   // Percentage of time the GPU's SMs were doing integer operations. 0.0 - 100.0
	GpmMetricAnyTensorUtil          GpmMetricId = 5   // Percentage of time the GPU's SMs were doing ANY tensor operations. 0.0 - 100.0
	GpmMetricDfmaTensorUtil         GpmMetricId = 6   // Percentage of time the GPU's SMs were doing DFMA tensor operations. 0.0 - 100.0
	GpmMetricHmmaTensorUtil         GpmMetricId = 7   // Percentage of time the GPU's SMs were doing HMMA tensor operations. 0.0 - 100.0
	GpmMetricDmmaTensorUtil         GpmMetricId = 8   // Percentage of time the GPU's SMs were doing DMMA tensor operations. 0.0 - 100.0
	GpmMetricImmaTensorUtil         GpmMetricId = 9   // Percentage of time the GPU's SMs were doing IMMA tensor operations. 0.0 - 100.0
	GpmMetricDramBwUtil             GpmMetricId = 10  // Percentage of DRAM bw used vs theoretical maximum. 0.0 - 100.0 */
	GpmMetricFP64Util               GpmMetricId = 11  // Percentage of time the GPU's SMs were doing non-tensor FP64 math. 0.0 - 100.0
	GpmMetricFP32Util               GpmMetricId = 12  // Percentage of time the GPU's SMs were doing non-tensor FP32 math. 0.0 - 100.0
	GpmMetricFP16Util               GpmMetricId = 13  // Percentage of time the GPU's SMs were doing non-tensor FP16 math. 0.0 - 100.0
	GpmMetricPcieTxPerSec           GpmMetricId = 20  // PCIe traffic from this GPU in MiB/sec
	GpmMetricPcieRxPerSec           GpmMetricId = 21  // PCIe traffic to this GPU in MiB/sec
	GpmMetricNvdec0Util             GpmMetricId = 30  // Percent utilization of NVDEC 0. 0.0 - 100.0
	GpmMetricNvdec1Util             GpmMetricId = 31  // Percent utilization of NVDEC 1. 0.0 - 100.0
	GpmMetricNvdec2Util             GpmMetricId = 32  // Percent utilization of NVDEC 2. 0.0 - 100.0
	GpmMetricNvdec3Util             GpmMetricId = 33  // Percent utilization of NVDEC 3. 0.0 - 100.0
	GpmMetricNvdec4Util             GpmMetricId = 34  // Percent utilization of NVDEC 4. 0.0 - 100.0
	GpmMetricNvdec5Util             GpmMetricId = 35  // Percent utilization of NVDEC 5. 0.0 - 100.0
	GpmMetricNvdec6Util             GpmMetricId = 36  // Percent utilization of NVDEC 6. 0.0 - 100.0
	GpmMetricNvdec7Util             GpmMetricId = 37  // Percent utilization of NVDEC 7. 0.0 - 100.0
	GpmMetricNvjpg0Util             GpmMetricId = 40  // Percent utilization of NVJPG 0. 0.0 - 100.0
	GpmMetricNvjpg1Util             GpmMetricId = 41  // Percent utilization of NVJPG 1. 0.0 - 100.0
	GpmMetricNvjpg2Util             GpmMetricId = 42  // Percent utilization of NVJPG 2. 0.0 - 100.0
	GpmMetricNvjpg3Util             GpmMetricId = 43  // Percent utilization of NVJPG 3. 0.0 - 100.0
	GpmMetricNvjpg4Util             GpmMetricId = 44  // Percent utilization of NVJPG 4. 0.0 - 100.0
	GpmMetricNvjpg5Util             GpmMetricId = 45  // Percent utilization of NVJPG 5. 0.0 - 100.0
	GpmMetricNvjpg6Util             GpmMetricId = 46  // Percent utilization of NVJPG 6. 0.0 - 100.0
	GpmMetricNvjpg7Util             GpmMetricId = 47  // Percent utilization of NVJPG 7. 0.0 - 100.0
	GpmMetricNvofa0Util             GpmMetricId = 50  // Percent utilization of NVOFA 0. 0.0 - 100.0
	GpmMetricNvofa1Util             GpmMetricId = 51  // Percent utilization of NVOFA 1. 0.0 - 100.0
	GpmMetricNvlinkTotalRxPerSec    GpmMetricId = 60  // NvLink read bandwidth for all links in MiB/sec
	GpmMetricNvlinkTotalTxPerSec    GpmMetricId = 61  // NvLink write bandwidth for all links in MiB/sec
	GpmMetricNvlinkL0RxPerSec       GpmMetricId = 62  // NvLink read bandwidth for link 0 in MiB/sec
	GpmMetricNvlinkL0TxPerSec       GpmMetricId = 63  // NvLink write bandwidth for link 0 in MiB/sec
	GpmMetricNvlinkL1RxPerSec       GpmMetricId = 64  // NvLink read bandwidth for link 1 in MiB/sec
	GpmMetricNvlinkL1TxPerSec       GpmMetricId = 65  // NvLink write bandwidth for link 1 in MiB/sec
	GpmMetricNvlinkL2RxPerSec       GpmMetricId = 66  // NvLink read bandwidth for link 2 in MiB/sec
	GpmMetricNvlinkL2TxPerSec       GpmMetricId = 67  // NvLink write bandwidth for link 2 in MiB/sec
	GpmMetricNvlinkL3RxPerSec       GpmMetricId = 68  // NvLink read bandwidth for link 3 in MiB/sec
	GpmMetricNvlinkL3TxPerSec       GpmMetricId = 69  // NvLink write bandwidth for link 3 in MiB/sec
	GpmMetricNvlinkL4RxPerSec       GpmMetricId = 70  // NvLink read bandwidth for link 4 in MiB/sec
	GpmMetricNvlinkL4TxPerSec       GpmMetricId = 71  // NvLink write bandwidth for link 4 in MiB/sec
	GpmMetricNvlinkL5RxPerSec       GpmMetricId = 72  // NvLink read bandwidth for link 5 in MiB/sec
	GpmMetricNvlinkL5TxPerSec       GpmMetricId = 73  // NvLink write bandwidth for link 5 in MiB/sec
	GpmMetricNvlinkL6RxPerSec       GpmMetricId = 74  // NvLink read bandwidth for link 6 in MiB/sec
	GpmMetricNvlinkL6TxPerSec       GpmMetricId = 75  // NvLink write bandwidth for link 6 in MiB/sec
	GpmMetricNvlinkL7RxPerSec       GpmMetricId = 76  // NvLink read bandwidth for link 7 in MiB/sec
	GpmMetricNvlinkL7TxPerSec       GpmMetricId = 77  // NvLink write bandwidth for link 7 in MiB/sec
	GpmMetricNvlinkL8RxPerSec       GpmMetricId = 78  // NvLink read bandwidth for link 8 in MiB/sec
	GpmMetricNvlinkL8TxPerSec       GpmMetricId = 79  // NvLink write bandwidth for link 8 in MiB/sec
	GpmMetricNvlinkL9RxPerSec       GpmMetricId = 80  // NvLink read bandwidth for link 9 in MiB/sec
	GpmMetricNvlinkL9TxPerSec       GpmMetricId = 81  // NvLink write bandwidth for link 9 in MiB/sec
	GpmMetricNvlinkL10RxPerSec      GpmMetricId = 82  // NvLink read bandwidth for link 10 in MiB/sec
	GpmMetricNvlinkL10TxPerSec      GpmMetricId = 83  // NvLink write bandwidth for link 10 in MiB/sec
	GpmMetricNvlinkL11RxPerSec      GpmMetricId = 84  // NvLink read bandwidth for link 11 in MiB/sec
	GpmMetricNvlinkL11TxPerSec      GpmMetricId = 85  // NvLink write bandwidth for link 11 in MiB/sec
	GpmMetricNvlinkL12RxPerSec      GpmMetricId = 86  // NvLink read bandwidth for link 12 in MiB/sec
	GpmMetricNvlinkL12TxPerSec      GpmMetricId = 87  // NvLink write bandwidth for link 12 in MiB/sec
	GpmMetricNvlinkL13RxPerSec      GpmMetricId = 88  // NvLink read bandwidth for link 13 in MiB/sec
	GpmMetricNvlinkL13TxPerSec      GpmMetricId = 89  // NvLink write bandwidth for link 13 in MiB/sec
	GpmMetricNvlinkL14RxPerSec      GpmMetricId = 90  // NvLink read bandwidth for link 14 in MiB/sec
	GpmMetricNvlinkL14TxPerSec      GpmMetricId = 91  // NvLink write bandwidth for link 14 in MiB/sec
	GpmMetricNvlinkL15RxPerSec      GpmMetricId = 92  // NvLink read bandwidth for link 15 in MiB/sec
	GpmMetricNvlinkL15TxPerSec      GpmMetricId = 93  // NvLink write bandwidth for link 15 in MiB/sec
	GpmMetricNvlinkL16RxPerSec      GpmMetricId = 94  // NvLink read bandwidth for link 16 in MiB/sec
	GpmMetricNvlinkL16TxPerSec      GpmMetricId = 95  // NvLink write bandwidth for link 16 in MiB/sec
	GpmMetricNvlinkL17RxPerSec      GpmMetricId = 96  // NvLink read bandwidth for link 17 in MiB/sec
	GpmMetricNvlinkL17TxPerSec      GpmMetricId = 97  // NvLink write bandwidth for link 17 in MiB/sec
	GpmMetricC2CTotalTxPerSec       GpmMetricId = 100 // C2C total transmit bandwidth in MiB/sec
	GpmMetricC2CTotalRxPerSec       GpmMetricId = 101 // C2C total receive bandwidth in MiB/sec
	GpmMetricC2CDataTxPerSec        GpmMetricId = 102 // C2C data transmit bandwidth in MiB/sec
	GpmMetricC2CDataRxPerSec        GpmMetricId = 103 // C2C data receive bandwidth in MiB/sec
	GpmMetricC2CLink0TotalTxPerSec  GpmMetricId = 104 // C2C link 0 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink0TotalRxPerSec  GpmMetricId = 105 // C2C link 0 total receive bandwidth in MiB/sec
	GpmMetricC2CLink0DataTxPerSec   GpmMetricId = 106 // C2C link 0 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink0DataRxPerSec   GpmMetricId = 107 // C2C link 0 data receive bandwidth in MiB/sec
	GpmMetricC2CLink1TotalTxPerSec  GpmMetricId = 108 // C2C link 1 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink1TotalRxPerSec  GpmMetricId = 109 // C2C link 1 total receive bandwidth in MiB/sec
	GpmMetricC2CLink1DataTxPerSec   GpmMetricId = 110 // C2C link 1 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink1DataRxPerSec   GpmMetricId = 111 // C2C link 1 data receive bandwidth in MiB/sec
	GpmMetricC2CLink2TotalTxPerSec  GpmMetricId = 112 // C2C link 2 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink2TotalRxPerSec  GpmMetricId = 113 // C2C link 2 total receive bandwidth in MiB/sec
	GpmMetricC2CLink2DataTxPerSec   GpmMetricId = 114 // C2C link 2 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink2DataRxPerSec   GpmMetricId = 115 // C2C link 2 data receive bandwidth in MiB/sec
	GpmMetricC2CLink3TotalTxPerSec  GpmMetricId = 116 // C2C link 3 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink3TotalRxPerSec  GpmMetricId = 117 // C2C link 3 total receive bandwidth in MiB/sec
	GpmMetricC2CLink3DataTxPerSec   GpmMetricId = 118 // C2C link 3 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink3DataRxPerSec   GpmMetricId = 119 // C2C link 3 data receive bandwidth in MiB/sec
	GpmMetricC2CLink4TotalTxPerSec  GpmMetricId = 120 // C2C link 4 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink4TotalRxPerSec  GpmMetricId = 121 // C2C link 4 total receive bandwidth in MiB/sec
	GpmMetricC2CLink4DataTxPerSec   GpmMetricId = 122 // C2C link 4 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink4DataRxPerSec   GpmMetricId = 123 // C2C link 4 data receive bandwidth in MiB/sec
	GpmMetricC2CLink5TotalTxPerSec  GpmMetricId = 124 // C2C link 5 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink5TotalRxPerSec  GpmMetricId = 125 // C2C link 5 total receive bandwidth in MiB/sec
	GpmMetricC2CLink5DataTxPerSec   GpmMetricId = 126 // C2C link 5 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink5DataRxPerSec   GpmMetricId = 127 // C2C link 5 data receive bandwidth in MiB/sec
	GpmMetricC2CLink6TotalTxPerSec  GpmMetricId = 128 // C2C link 6 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink6TotalRxPerSec  GpmMetricId = 129 // C2C link 6 total receive bandwidth in MiB/sec
	GpmMetricC2CLink6DataTxPerSec   GpmMetricId = 130 // C2C link 6 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink6DataRxPerSec   GpmMetricId = 131 // C2C link 6 data receive bandwidth in MiB/sec
	GpmMetricC2CLink7TotalTxPerSec  GpmMetricId = 132 // C2C link 7 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink7TotalRxPerSec  GpmMetricId = 133 // C2C link 7 total receive bandwidth in MiB/sec
	GpmMetricC2CLink7DataTxPerSec   GpmMetricId = 134 // C2C link 7 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink7DataRxPerSec   GpmMetricId = 135 // C2C link 7 data receive bandwidth in MiB/sec
	GpmMetricC2CLink8TotalTxPerSec  GpmMetricId = 136 // C2C link 8 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink8TotalRxPerSec  GpmMetricId = 137 // C2C link 8 total receive bandwidth in MiB/sec
	GpmMetricC2CLink8DataTxPerSec   GpmMetricId = 138 // C2C link 8 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink8DataRxPerSec   GpmMetricId = 139 // C2C link 8 data receive bandwidth in MiB/sec
	GpmMetricC2CLink9TotalTxPerSec  GpmMetricId = 140 // C2C link 9 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink9TotalRxPerSec  GpmMetricId = 141 // C2C link 9 total receive bandwidth in MiB/sec
	GpmMetricC2CLink9DataTxPerSec   GpmMetricId = 142 // C2C link 9 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink9DataRxPerSec   GpmMetricId = 143 // C2C link 9 data receive bandwidth in MiB/sec
	GpmMetricC2CLink10TotalTxPerSec GpmMetricId = 144 // C2C link 10 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink10TotalRxPerSec GpmMetricId = 145 // C2C link 10 total receive bandwidth in MiB/sec
	GpmMetricC2CLink10DataTxPerSec  GpmMetricId = 146 // C2C link 10 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink10DataRxPerSec  GpmMetricId = 147 // C2C link 10 data receive bandwidth in MiB/sec
	GpmMetricC2CLink11TotalTxPerSec GpmMetricId = 148 // C2C link 11 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink11TotalRxPerSec GpmMetricId = 149 // C2C link 11 total receive bandwidth in MiB/sec
	GpmMetricC2CLink11DataTxPerSec  GpmMetricId = 150 // C2C link 11 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink11DataRxPerSec  GpmMetricId = 151 // C2C link 11 data receive bandwidth in MiB/sec
	GpmMetricC2CLink12TotalTxPerSec GpmMetricId = 152 // C2C link 12 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink12TotalRxPerSec GpmMetricId = 153 // C2C link 12 total receive bandwidth in MiB/sec
	GpmMetricC2CLink12DataTxPerSec  GpmMetricId = 154 // C2C link 12 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink12DataRxPerSec  GpmMetricId = 155 // C2C link 12 data receive bandwidth in MiB/sec
	GpmMetricC2CLink13TotalTxPerSec GpmMetricId = 156 // C2C link 13 total transmit bandwidth in MiB/sec
	GpmMetricC2CLink13TotalRxPerSec GpmMetricId = 157 // C2C link 13 total receive bandwidth in MiB/sec
	GpmMetricC2CLink13DataTxPerSec  GpmMetricId = 158 // C2C link 13 data transmit bandwidth in MiB/sec
	GpmMetricC2CLink13DataRxPerSec  GpmMetricId = 159 // C2C link 13 data receive bandwidth in MiB/sec
	GpmMetricHostmemCacheHit        GpmMetricId = 160 // Percentage of host memory cache hits. 0.0 - 100.0
	GpmMetricHostmemCacheMiss       GpmMetricId = 161 // Percentage of host memory cache misses. 0.0 - 100.0
	GpmMetricPeermemCacheHit        GpmMetricId = 162 // Percentage of peer memory cache hits. 0.0 - 100.0
	GpmMetricPeermemCacheMiss       GpmMetricId = 163 // Percentage of peer memory cache misses. 0.0 - 100.0
	GpmMetricDramCacheHit           GpmMetricId = 164 // Percentage of DRAM cache hits. 0.0 - 100.0
	GpmMetricDramCacheMiss          GpmMetricId = 165 // Percentage of DRAM cache misses. 0.0 - 100.0
	GpmMetricNvenc0Util             GpmMetricId = 166 // Percent utilization of NVENC 0. 0.0 - 100.0
	GpmMetricNvenc1Util             GpmMetricId = 167 // Percent utilization of NVENC 1. 0.0 - 100.0
	GpmMetricNvenc2Util             GpmMetricId = 168 // Percent utilization of NVENC 2. 0.0 - 100.0
	GpmMetricNvenc3Util             GpmMetricId = 169 // Percent utilization of NVENC 3. 0.0 - 100.0
	GpmMetricGR0CtxswCyclesElapsed  GpmMetricId = 170 // Total context switch cycles elapsed for GR engine 0
	GpmMetricGR0CtxswCyclesActive   GpmMetricId = 171 // Active context switch cycles for GR engine 0
	GpmMetricGR0CtxswRequests       GpmMetricId = 172 // Number of context switch requests for GR engine 0
	GpmMetricGR0CtxswCyclesPerReq   GpmMetricId = 173 // Average context switch cycles per request for GR engine 0
	GpmMetricGR0CtxswActivePct      GpmMetricId = 174 // Percentage of time GR engine 0 context switches were active. 0.0 - 100.0
	GpmMetricGR1CtxswCyclesElapsed  GpmMetricId = 175 // Total context switch cycles elapsed for GR engine 1
	GpmMetricGR1CtxswCyclesActive   GpmMetricId = 176 // Active context switch cycles for GR engine 1
	GpmMetricGR1CtxswRequests       GpmMetricId = 177 // Number of context switch requests for GR engine 1
	GpmMetricGR1CtxswCyclesPerReq   GpmMetricId = 178 // Average context switch cycles per request for GR engine 1
	GpmMetricGR1CtxswActivePct      GpmMetricId = 179 // Percentage of time GR engine 1 context switches were active. 0.0 - 100.0
	GpmMetricGR2CtxswCyclesElapsed  GpmMetricId = 180 // Total context switch cycles elapsed for GR engine 2
	GpmMetricGR2CtxswCyclesActive   GpmMetricId = 181 // Active context switch cycles for GR engine 2
	GpmMetricGR2CtxswRequests       GpmMetricId = 182 // Number of context switch requests for GR engine 2
	GpmMetricGR2CtxswCyclesPerReq   GpmMetricId = 183 // Average context switch cycles per request for GR engine 2
	GpmMetricGR2CtxswActivePct      GpmMetricId = 184 // Percentage of time GR engine 2 context switches were active. 0.0 - 100.0
	GpmMetricGR3CtxswCyclesElapsed  GpmMetricId = 185 // Total context switch cycles elapsed for GR engine 3
	GpmMetricGR3CtxswCyclesActive   GpmMetricId = 186 // Active context switch cycles for GR engine 3
	GpmMetricGR3CtxswRequests       GpmMetricId = 187 // Number of context switch requests for GR engine 3
	GpmMetricGR3CtxswCyclesPerReq   GpmMetricId = 188 // Average context switch cycles per request for GR engine 3
	GpmMetricGR3CtxswActivePct      GpmMetricId = 189 // Percentage of time GR engine 3 context switches were active. 0.0 - 100.0
	GpmMetricGR4CtxswCyclesElapsed  GpmMetricId = 190 // Total context switch cycles elapsed for GR engine 4
	GpmMetricGR4CtxswCyclesActive   GpmMetricId = 191 // Active context switch cycles for GR engine 4
	GpmMetricGR4CtxswRequests       GpmMetricId = 192 // Number of context switch requests for GR engine 4
	GpmMetricGR4CtxswCyclesPerReq   GpmMetricId = 193 // Average context switch cycles per request for GR engine 4
	GpmMetricGR4CtxswActivePct      GpmMetricId = 194 // Percentage of time GR engine 4 context switches were active. 0.0 - 100.0
	GpmMetricGR5CtxswCyclesElapsed  GpmMetricId = 195 // Total context switch cycles elapsed for GR engine 5
	GpmMetricGR5CtxswCyclesActive   GpmMetricId = 196 // Active context switch cycles for GR engine 5
	GpmMetricGR5CtxswRequests       GpmMetricId = 197 // Number of context switch requests for GR engine 5
	GpmMetricGR5CtxswCyclesPerReq   GpmMetricId = 198 // Average context switch cycles per request for GR engine 5
	GpmMetricGR5CtxswActivePct      GpmMetricId = 199 // Percentage of time GR engine 5 context switches were active. 0.0 - 100.0
	GpmMetricGR6CtxswCyclesElapsed  GpmMetricId = 200 // Total context switch cycles elapsed for GR engine 6
	GpmMetricGR6CtxswCyclesActive   GpmMetricId = 201 // Active context switch cycles for GR engine 6
	GpmMetricGR6CtxswRequests       GpmMetricId = 202 // Number of context switch requests for GR engine 6
	GpmMetricGR6CtxswCyclesPerReq   GpmMetricId = 203 // Average context switch cycles per request for GR engine 6
	GpmMetricGR6CtxswActivePct      GpmMetricId = 204 // Percentage of time GR engine 6 context switches were active. 0.0 - 100.0
	GpmMetricGR7CtxswCyclesElapsed  GpmMetricId = 205 // Total context switch cycles elapsed for GR engine 7
	GpmMetricGR7CtxswCyclesActive   GpmMetricId = 206 // Active context switch cycles for GR engine 7
	GpmMetricGR7CtxswRequests       GpmMetricId = 207 // Number of context switch requests for GR engine 7
	GpmMetricGR7CtxswCyclesPerReq   GpmMetricId = 208 // Average context switch cycles per request for GR engine 7
	GpmMetricGR7CtxswActivePct      GpmMetricId = 209 // Percentage of time GR engine 7 context switches were active. 0.0 - 100.0
	GpmMetricNvlinkL18RxPerSec      GpmMetricId = 212 // NvLink read bandwidth for link 18 in MiB/sec
	GpmMetricNvlinkL18TxPerSec      GpmMetricId = 213 // NvLink write bandwidth for link 18 in MiB/sec
	GpmMetricNvlinkL19RxPerSec      GpmMetricId = 214 // NvLink read bandwidth for link 19 in MiB/sec
	GpmMetricNvlinkL19TxPerSec      GpmMetricId = 215 // NvLink write bandwidth for link 19 in MiB/sec
	GpmMetricNvlinkL20RxPerSec      GpmMetricId = 216 // NvLink read bandwidth for link 20 in MiB/sec
	GpmMetricNvlinkL20TxPerSec      GpmMetricId = 217 // NvLink write bandwidth for link 20 in MiB/sec
	GpmMetricNvlinkL21RxPerSec      GpmMetricId = 218 // NvLink read bandwidth for link 21 in MiB/sec
	GpmMetricNvlinkL21TxPerSec      GpmMetricId = 219 // NvLink write bandwidth for link 21 in MiB/sec
	GpmMetricNvlinkL22RxPerSec      GpmMetricId = 220 // NvLink read bandwidth for link 22 in MiB/sec
	GpmMetricNvlinkL22TxPerSec      GpmMetricId = 221 // NvLink write bandwidth for link 22 in MiB/sec
	GpmMetricNvlinkL23RxPerSec      GpmMetricId = 222 // NvLink read bandwidth for link 23 in MiB/sec
	GpmMetricNvlinkL23TxPerSec      GpmMetricId = 223 // NvLink write bandwidth for link 23 in MiB/sec
	GpmMetricNvlinkL24RxPerSec      GpmMetricId = 224 // NvLink read bandwidth for link 24 in MiB/sec
	GpmMetricNvlinkL24TxPerSec      GpmMetricId = 225 // NvLink write bandwidth for link 24 in MiB/sec
	GpmMetricNvlinkL25RxPerSec      GpmMetricId = 226 // NvLink read bandwidth for link 25 in MiB/sec
	GpmMetricNvlinkL25TxPerSec      GpmMetricId = 227 // NvLink write bandwidth for link 25 in MiB/sec
	GpmMetricNvlinkL26RxPerSec      GpmMetricId = 228 // NvLink read bandwidth for link 26 in MiB/sec
	GpmMetricNvlinkL26TxPerSec      GpmMetricId = 229 // NvLink write bandwidth for link 26 in MiB/sec
	GpmMetricNvlinkL27RxPerSec      GpmMetricId = 230 // NvLink read bandwidth for link 27 in MiB/sec
	GpmMetricNvlinkL27TxPerSec      GpmMetricId = 231 // NvLink write bandwidth for link 27 in MiB/sec
	GpmMetricNvlinkL28RxPerSec      GpmMetricId = 232 // NvLink read bandwidth for link 28 in MiB/sec
	GpmMetricNvlinkL28TxPerSec      GpmMetricId = 233 // NvLink write bandwidth for link 28 in MiB/sec
	GpmMetricNvlinkL29RxPerSec      GpmMetricId = 234 // NvLink read bandwidth for link 29 in MiB/sec
	GpmMetricNvlinkL29TxPerSec      GpmMetricId = 235 // NvLink write bandwidth for link 29 in MiB/sec
	GpmMetricNvlinkL30RxPerSec      GpmMetricId = 236 // NvLink read bandwidth for link 30 in MiB/sec
	GpmMetricNvlinkL30TxPerSec      GpmMetricId = 237 // NvLink write bandwidth for link 30 in MiB/sec
	GpmMetricNvlinkL31RxPerSec      GpmMetricId = 238 // NvLink read bandwidth for link 31 in MiB/sec
	GpmMetricNvlinkL31TxPerSec      GpmMetricId = 239 // NvLink write bandwidth for link 31 in MiB/sec
	GpmMetricNvlinkL32RxPerSec      GpmMetricId = 240 // NvLink read bandwidth for link 32 in MiB/sec
	GpmMetricNvlinkL32TxPerSec      GpmMetricId = 241 // NvLink write bandwidth for link 32 in MiB/sec
	GpmMetricNvlinkL33RxPerSec      GpmMetricId = 242 // NvLink read bandwidth for link 33 in MiB/sec
	GpmMetricNvlinkL33TxPerSec      GpmMetricId = 243 // NvLink write bandwidth for link 33 in MiB/sec
	GpmMetricNvlinkL34RxPerSec      GpmMetricId = 244 // NvLink read bandwidth for link 34 in MiB/sec
	GpmMetricNvlinkL34TxPerSec      GpmMetricId = 245 // NvLink write bandwidth for link 34 in MiB/sec
	GpmMetricNvlinkL35RxPerSec      GpmMetricId = 246 // NvLink read bandwidth for link 35 in MiB/sec
	GpmMetricNvlinkL35TxPerSec      GpmMetricId = 247 // NvLink write bandwidth for link 35 in MiB/sec
	GpmMetricSmCyclesElapsed        GpmMetricId = 248 // The GPU's SM cycles elapsed since reboot
	GpmMetricSmCyclesActive         GpmMetricId = 249 // The GPU's SM activity since reboot
	GpmMetricMmaCyclesActive        GpmMetricId = 250 // The GPU's SM MMA tensor activity since reboot
	GpmMetricDmmaCyclesActive       GpmMetricId = 251 // The GPU's SM DMMA tensor activity since reboot
	GpmMetricHmmaCyclesActive       GpmMetricId = 252 // The GPU's SM HMMA tensor activity since reboot
	GpmMetricImmaCyclesActive       GpmMetricId = 253 // The GPU's SM IMMA tensor activity since reboot
	GpmMetricDfmaCyclesActive       GpmMetricId = 254 // The GPU's SM DFMA tensor activity since reboot
	GpmMetricPcieTx                 GpmMetricId = 255 // The PCIe TX traffic since reboot
	GpmMetricPcieRx                 GpmMetricId = 256 // The PCIe RX traffic since reboot
	GpmMetricIntegerCyclesActive    GpmMetricId = 257 // The GPU's SM integer activity since reboot
	GpmMetricFP64CyclesActive       GpmMetricId = 258 // The GPU's SM FP64 activity since reboot
	GpmMetricFP32CyclesActive       GpmMetricId = 259 // The GPU's SM FP32 activity since reboot
	GpmMetricFP16CyclesActive       GpmMetricId = 260 // The GPU's SM FP16 activity since reboot
	GpmMetricNvlinkL0Rx             GpmMetricId = 261 // NvLink read for link 0 in bytes since reboot
	GpmMetricNvlinkL0Tx             GpmMetricId = 262 // NvLink write for link 0 in bytes since reboot
	GpmMetricNvlinkL1Rx             GpmMetricId = 263 // NvLink read for link 1 in bytes since reboot
	GpmMetricNvlinkL1Tx             GpmMetricId = 264 // NvLink write for link 1 in bytes since reboot
	GpmMetricNvlinkL2Rx             GpmMetricId = 265 // NvLink read for link 2 in bytes since reboot
	GpmMetricNvlinkL2Tx             GpmMetricId = 266 // NvLink write for link 2 in bytes since reboot
	GpmMetricNvlinkL3Rx             GpmMetricId = 267 // NvLink read for link 3 in bytes since reboot
	GpmMetricNvlinkL3Tx             GpmMetricId = 268 // NvLink write for link 3 in bytes since reboot
	GpmMetricNvlinkL4Rx             GpmMetricId = 269 // NvLink read for link 4 in bytes since reboot
	GpmMetricNvlinkL4Tx             GpmMetricId = 270 // NvLink write for link 4 in bytes since reboot
	GpmMetricNvlinkL5Rx             GpmMetricId = 271 // NvLink read for link 5 in bytes since reboot
	GpmMetricNvlinkL5Tx             GpmMetricId = 272 // NvLink write for link 5 in bytes since reboot
	GpmMetricNvlinkL6Rx             GpmMetricId = 273 // NvLink read for link 6 in bytes since reboot
	GpmMetricNvlinkL6Tx             GpmMetricId = 274 // NvLink write for link 6 in bytes since reboot
	GpmMetricNvlinkL7Rx             GpmMetricId = 275 // NvLink read for link 7 in bytes since reboot
	GpmMetricNvlinkL7Tx             GpmMetricId = 276 // NvLink write for link 7 in bytes since reboot
	GpmMetricNvlinkL8Rx             GpmMetricId = 277 // NvLink read for link 8 in bytes since reboot
	GpmMetricNvlinkL8Tx             GpmMetricId = 278 // NvLink write for link 8 in bytes since reboot
	GpmMetricNvlinkL9Rx             GpmMetricId = 279 // NvLink read for link 9 in bytes since reboot
	GpmMetricNvlinkL9Tx             GpmMetricId = 280 // NvLink write for link 9 in bytes since reboot
	GpmMetricNvlinkL10Rx            GpmMetricId = 281 // NvLink read for link 10 in bytes since reboot
	GpmMetricNvlinkL10Tx            GpmMetricId = 282 // NvLink write for link 10 in bytes since reboot
	GpmMetricNvlinkL11Rx            GpmMetricId = 283 // NvLink read for link 11 in bytes since reboot
	GpmMetricNvlinkL11Tx            GpmMetricId = 284 // NvLink write for link 11 in bytes since reboot
	GpmMetricNvlinkL12Rx            GpmMetricId = 285 // NvLink read for link 12 in bytes since reboot
	GpmMetricNvlinkL12Tx            GpmMetricId = 286 // NvLink write for link 12 in bytes since reboot
	GpmMetricNvlinkL13Rx            GpmMetricId = 287 // NvLink read for link 13 in bytes since reboot
	GpmMetricNvlinkL13Tx            GpmMetricId = 288 // NvLink write for link 13 in bytes since reboot
	GpmMetricNvlinkL14Rx            GpmMetricId = 289 // NvLink read for link 14 in bytes since reboot
	GpmMetricNvlinkL14Tx            GpmMetricId = 290 // NvLink write for link 14 in bytes since reboot
	GpmMetricNvlinkL15Rx            GpmMetricId = 291 // NvLink read for link 15 in bytes since reboot
	GpmMetricNvlinkL15Tx            GpmMetricId = 292 // NvLink write for link 15 in bytes since reboot
	GpmMetricNvlinkL16Rx            GpmMetricId = 293 // NvLink read for link 16 in bytes since reboot
	GpmMetricNvlinkL16Tx            GpmMetricId = 294 // NvLink write for link 16 in bytes since reboot
	GpmMetricNvlinkL17Rx            GpmMetricId = 295 // NvLink read for link 17 in bytes since reboot
	GpmMetricNvlinkL17Tx            GpmMetricId = 296 // NvLink write for link 17 in bytes since reboot
	GpmMetricNvlinkL18Rx            GpmMetricId = 297 // NvLink read for link 18 in bytes since reboot
	GpmMetricNvlinkL18Tx            GpmMetricId = 298 // NvLink write for link 18 in bytes since reboot
	GpmMetricNvlinkL19Rx            GpmMetricId = 299 // NvLink read for link 19 in bytes since reboot
	GpmMetricNvlinkL19Tx            GpmMetricId = 300 // NvLink write for link 19 in bytes since reboot
	GpmMetricNvlinkL20Rx            GpmMetricId = 301 // NvLink read for link 20 in bytes since reboot
	GpmMetricNvlinkL20Tx            GpmMetricId = 302 // NvLink write for link 20 in bytes since reboot
	GpmMetricNvlinkL21Rx            GpmMetricId = 303 // NvLink read for link 21 in bytes since reboot
	GpmMetricNvlinkL21Tx            GpmMetricId = 304 // NvLink write for link 21 in bytes since reboot
	GpmMetricNvlinkL22Rx            GpmMetricId = 305 // NvLink read for link 22 in bytes since reboot
	GpmMetricNvlinkL22Tx            GpmMetricId = 306 // NvLink write for link 22 in bytes since reboot
	GpmMetricNvlinkL23Rx            GpmMetricId = 307 // NvLink read for link 23 in bytes since reboot
	GpmMetricNvlinkL23Tx            GpmMetricId = 308 // NvLink write for link 23 in bytes since reboot
	GpmMetricNvlinkL24Rx            GpmMetricId = 309 // NvLink read for link 24 in bytes since reboot
	GpmMetricNvlinkL24Tx            GpmMetricId = 310 // NvLink write for link 24 in bytes since reboot
	GpmMetricNvlinkL25Rx            GpmMetricId = 311 // NvLink read for link 25 in bytes since reboot
	GpmMetricNvlinkL25Tx            GpmMetricId = 312 // NvLink write for link 25 in bytes since reboot
	GpmMetricNvlinkL26Rx            GpmMetricId = 313 // NvLink read for link 26 in bytes since reboot
	GpmMetricNvlinkL26Tx            GpmMetricId = 314 // NvLink write for link 26 in bytes since reboot
	GpmMetricNvlinkL27Rx            GpmMetricId = 315 // NvLink read for link 27 in bytes since reboot
	GpmMetricNvlinkL27Tx            GpmMetricId = 316 // NvLink write for link 27 in bytes since reboot
	GpmMetricNvlinkL28Rx            GpmMetricId = 317 // NvLink read for link 28 in bytes since reboot
	GpmMetricNvlinkL28Tx            GpmMetricId = 318 // NvLink write for link 28 in bytes since reboot
	GpmMetricNvlinkL29Rx            GpmMetricId = 319 // NvLink read for link 29 in bytes since reboot
	GpmMetricNvlinkL29Tx            GpmMetricId = 320 // NvLink write for link 29 in bytes since reboot
	GpmMetricNvlinkL30Rx            GpmMetricId = 321 // NvLink read for link 30 in bytes since reboot
	GpmMetricNvlinkL30Tx            GpmMetricId = 322 // NvLink write for link 30 in bytes since reboot
	GpmMetricNvlinkL31Rx            GpmMetricId = 323 // NvLink read for link 31 in bytes since reboot
	GpmMetricNvlinkL31Tx            GpmMetricId = 324 // NvLink write for link 31 in bytes since reboot
	GpmMetricNvlinkL32Rx            GpmMetricId = 325 // NvLink read for link 32 in bytes since reboot
	GpmMetricNvlinkL32Tx            GpmMetricId = 326 // NvLink write for link 32 in bytes since reboot
	GpmMetricNvlinkL33Rx            GpmMetricId = 327 // NvLink read for link 33 in bytes since reboot
	GpmMetricNvlinkL33Tx            GpmMetricId = 328 // NvLink write for link 33 in bytes since reboot
	GpmMetricNvlinkL34Rx            GpmMetricId = 329 // NvLink read for link 34 in bytes since reboot
	GpmMetricNvlinkL34Tx            GpmMetricId = 330 // NvLink write for link 34 in bytes since reboot
	GpmMetricNvlinkL35Rx            GpmMetricId = 331 // NvLink read for link 35 in bytes since reboot
	GpmMetricNvlinkL35Tx            GpmMetricId = 332 // NvLink write for link 35 in bytes since reboot
	GpmMetricNvlinkL36Rx            GpmMetricId = 333 // NvLink read for link 36 in bytes since reboot
	GpmMetricNvlinkL36Tx            GpmMetricId = 334 // NvLink write for link 36 in bytes since reboot
	GpmMetricNvlinkL37Rx            GpmMetricId = 335 // NvLink read for link 37 in bytes since reboot
	GpmMetricNvlinkL37Tx            GpmMetricId = 336 // NvLink write for link 37 in bytes since reboot
	GpmMetricNvlinkL38Rx            GpmMetricId = 337 // NvLink read for link 38 in bytes since reboot
	GpmMetricNvlinkL38Tx            GpmMetricId = 338 // NvLink write for link 38 in bytes since reboot
	GpmMetricNvlinkL39Rx            GpmMetricId = 339 // NvLink read for link 39 in bytes since reboot
	GpmMetricNvlinkL39Tx            GpmMetricId = 340 // NvLink write for link 39 in bytes since reboot
	GpmMetricNvlinkL40Rx            GpmMetricId = 341 // NvLink read for link 40 in bytes since reboot
	GpmMetricNvlinkL40Tx            GpmMetricId = 342 // NvLink write for link 40 in bytes since reboot
	GpmMetricNvlinkL41Rx            GpmMetricId = 343 // NvLink read for link 41 in bytes since reboot
	GpmMetricNvlinkL41Tx            GpmMetricId = 344 // NvLink write for link 41 in bytes since reboot
	GpmMetricNvlinkL42Rx            GpmMetricId = 345 // NvLink read for link 42 in bytes since reboot
	GpmMetricNvlinkL42Tx            GpmMetricId = 346 // NvLink write for link 42 in bytes since reboot
	GpmMetricNvlinkL43Rx            GpmMetricId = 347 // NvLink read for link 43 in bytes since reboot
	GpmMetricNvlinkL43Tx            GpmMetricId = 348 // NvLink write for link 43 in bytes since reboot
	GpmMetricNvlinkL44Rx            GpmMetricId = 349 // NvLink read for link 44 in bytes since reboot
	GpmMetricNvlinkL44Tx            GpmMetricId = 350 // NvLink write for link 44 in bytes since reboot
	GpmMetricNvlinkL45Rx            GpmMetricId = 351 // NvLink read for link 45 in bytes since reboot
	GpmMetricNvlinkL45Tx            GpmMetricId = 352 // NvLink write for link 45 in bytes since reboot
	GpmMetricNvlinkL46Rx            GpmMetricId = 353 // NvLink read for link 46 in bytes since reboot
	GpmMetricNvlinkL46Tx            GpmMetricId = 354 // NvLink write for link 46 in bytes since reboot
	GpmMetricNvlinkL47Rx            GpmMetricId = 355 // NvLink read for link 47 in bytes since reboot
	GpmMetricNvlinkL47Tx            GpmMetricId = 356 // NvLink write for link 47 in bytes since reboot
	GpmMetricNvlinkL48Rx            GpmMetricId = 357 // NvLink read for link 48 in bytes since reboot
	GpmMetricNvlinkL48Tx            GpmMetricId = 358 // NvLink write for link 48 in bytes since reboot
	GpmMetricNvlinkL49Rx            GpmMetricId = 359 // NvLink read for link 49 in bytes since reboot
	GpmMetricNvlinkL49Tx            GpmMetricId = 360 // NvLink write for link 49 in bytes since reboot
	GpmMetricNvlinkL50Rx            GpmMetricId = 361 // NvLink read for link 50 in bytes since reboot
	GpmMetricNvlinkL50Tx            GpmMetricId = 362 // NvLink write for link 50 in bytes since reboot
	GpmMetricNvlinkL51Rx            GpmMetricId = 363 // NvLink read for link 51 in bytes since reboot
	GpmMetricNvlinkL51Tx            GpmMetricId = 364 // NvLink write for link 51 in bytes since reboot
	GpmMetricNvlinkL52Rx            GpmMetricId = 365 // NvLink read for link 52 in bytes since reboot
	GpmMetricNvlinkL52Tx            GpmMetricId = 366 // NvLink write for link 52 in bytes since reboot
	GpmMetricNvlinkL53Rx            GpmMetricId = 367 // NvLink read for link 53 in bytes since reboot
	GpmMetricNvlinkL53Tx            GpmMetricId = 368 // NvLink write for link 53 in bytes since reboot
	GpmMetricNvlinkL54Rx            GpmMetricId = 369 // NvLink read for link 54 in bytes since reboot
	GpmMetricNvlinkL54Tx            GpmMetricId = 370 // NvLink write for link 54 in bytes since reboot
	GpmMetricNvlinkL55Rx            GpmMetricId = 371 // NvLink read for link 55 in bytes since reboot
	GpmMetricNvlinkL55Tx            GpmMetricId = 372 // NvLink write for link 55 in bytes since reboot
	GpmMetricNvlinkL56Rx            GpmMetricId = 373 // NvLink read for link 56 in bytes since reboot
	GpmMetricNvlinkL56Tx            GpmMetricId = 374 // NvLink write for link 56 in bytes since reboot
	GpmMetricNvlinkL57Rx            GpmMetricId = 375 // NvLink read for link 57 in bytes since reboot
	GpmMetricNvlinkL57Tx            GpmMetricId = 376 // NvLink write for link 57 in bytes since reboot
	GpmMetricNvlinkL58Rx            GpmMetricId = 377 // NvLink read for link 58 in bytes since reboot
	GpmMetricNvlinkL58Tx            GpmMetricId = 378 // NvLink write for link 58 in bytes since reboot
	GpmMetricNvlinkL59Rx            GpmMetricId = 379 // NvLink read for link 59 in bytes since reboot
	GpmMetricNvlinkL59Tx            GpmMetricId = 380 // NvLink write for link 59 in bytes since reboot
	GpmMetricNvlinkL60Rx            GpmMetricId = 381 // NvLink read for link 60 in bytes since reboot
	GpmMetricNvlinkL60Tx            GpmMetricId = 382 // NvLink write for link 60 in bytes since reboot
	GpmMetricNvlinkL61Rx            GpmMetricId = 383 // NvLink read for link 61 in bytes since reboot
	GpmMetricNvlinkL61Tx            GpmMetricId = 384 // NvLink write for link 61 in bytes since reboot
	GpmMetricNvlinkL62Rx            GpmMetricId = 385 // NvLink read for link 62 in bytes since reboot
	GpmMetricNvlinkL62Tx            GpmMetricId = 386 // NvLink write for link 62 in bytes since reboot
	GpmMetricNvlinkL63Rx            GpmMetricId = 387 // NvLink read for link 63 in bytes since reboot
	GpmMetricNvlinkL63Tx            GpmMetricId = 388 // NvLink write for link 63 in bytes since reboot
	GpmMetricNvlinkL64Rx            GpmMetricId = 389 // NvLink read for link 64 in bytes since reboot
	GpmMetricNvlinkL64Tx            GpmMetricId = 390 // NvLink write for link 64 in bytes since reboot
	GpmMetricNvlinkL65Rx            GpmMetricId = 391 // NvLink read for link 65 in bytes since reboot
	GpmMetricNvlinkL65Tx            GpmMetricId = 392 // NvLink write for link 65 in bytes since reboot
	GpmMetricNvlinkL66Rx            GpmMetricId = 393 // NvLink read for link 66 in bytes since reboot
	GpmMetricNvlinkL66Tx            GpmMetricId = 394 // NvLink write for link 66 in bytes since reboot
	GpmMetricNvlinkL67Rx            GpmMetricId = 395 // NvLink read for link 67 in bytes since reboot
	GpmMetricNvlinkL67Tx            GpmMetricId = 396 // NvLink write for link 67 in bytes since reboot
	GpmMetricNvlinkL68Rx            GpmMetricId = 397 // NvLink read for link 68 in bytes since reboot
	GpmMetricNvlinkL68Tx            GpmMetricId = 398 // NvLink write for link 68 in bytes since reboot
	GpmMetricNvlinkL69Rx            GpmMetricId = 399 // NvLink read for link 69 in bytes since reboot
	GpmMetricNvlinkL69Tx            GpmMetricId = 400 // NvLink write for link 69 in bytes since reboot
	GpmMetricNvlinkL70Rx            GpmMetricId = 401 // NvLink read for link 70 in bytes since reboot
	GpmMetricNvlinkL70Tx            GpmMetricId = 402 // NvLink write for link 70 in bytes since reboot
	GpmMetricNvlinkL71Rx            GpmMetricId = 403 // NvLink read for link 71 in bytes since reboot
	GpmMetricNvlinkL71Tx            GpmMetricId = 404 // NvLink write for link 71 in bytes since reboot
	GpmMetricNvlinkL36RxPerSec      GpmMetricId = 405 // NvLink read bandwidth for link 36 in MiB/sec
	GpmMetricNvlinkL36TxPerSec      GpmMetricId = 406 // NvLink write bandwidth for link 36 in MiB/sec
	GpmMetricNvlinkL37RxPerSec      GpmMetricId = 407 // NvLink read bandwidth for link 37 in MiB/sec
	GpmMetricNvlinkL37TxPerSec      GpmMetricId = 408 // NvLink write bandwidth for link 37 in MiB/sec
	GpmMetricNvlinkL38RxPerSec      GpmMetricId = 409 // NvLink read bandwidth for link 38 in MiB/sec
	GpmMetricNvlinkL38TxPerSec      GpmMetricId = 410 // NvLink write bandwidth for link 38 in MiB/sec
	GpmMetricNvlinkL39RxPerSec      GpmMetricId = 411 // NvLink read bandwidth for link 39 in MiB/sec
	GpmMetricNvlinkL39TxPerSec      GpmMetricId = 412 // NvLink write bandwidth for link 39 in MiB/sec
	GpmMetricNvlinkL40RxPerSec      GpmMetricId = 413 // NvLink read bandwidth for link 40 in MiB/sec
	GpmMetricNvlinkL40TxPerSec      GpmMetricId = 414 // NvLink write bandwidth for link 40 in MiB/sec
	GpmMetricNvlinkL41RxPerSec      GpmMetricId = 415 // NvLink read bandwidth for link 41 in MiB/sec
	GpmMetricNvlinkL41TxPerSec      GpmMetricId = 416 // NvLink write bandwidth for link 41 in MiB/sec
	GpmMetricNvlinkL42RxPerSec      GpmMetricId = 417 // NvLink read bandwidth for link 42 in MiB/sec
	GpmMetricNvlinkL42TxPerSec      GpmMetricId = 418 // NvLink write bandwidth for link 42 in MiB/sec
	GpmMetricNvlinkL43RxPerSec      GpmMetricId = 419 // NvLink read bandwidth for link 43 in MiB/sec
	GpmMetricNvlinkL43TxPerSec      GpmMetricId = 420 // NvLink write bandwidth for link 43 in MiB/sec
	GpmMetricNvlinkL44RxPerSec      GpmMetricId = 421 // NvLink read bandwidth for link 44 in MiB/sec
	GpmMetricNvlinkL44TxPerSec      GpmMetricId = 422 // NvLink write bandwidth for link 44 in MiB/sec
	GpmMetricNvlinkL45RxPerSec      GpmMetricId = 423 // NvLink read bandwidth for link 45 in MiB/sec
	GpmMetricNvlinkL45TxPerSec      GpmMetricId = 424 // NvLink write bandwidth for link 45 in MiB/sec
	GpmMetricNvlinkL46RxPerSec      GpmMetricId = 425 // NvLink read bandwidth for link 46 in MiB/sec
	GpmMetricNvlinkL46TxPerSec      GpmMetricId = 426 // NvLink write bandwidth for link 46 in MiB/sec
	GpmMetricNvlinkL47RxPerSec      GpmMetricId = 427 // NvLink read bandwidth for link 47 in MiB/sec
	GpmMetricNvlinkL47TxPerSec      GpmMetricId = 428 // NvLink write bandwidth for link 47 in MiB/sec
	GpmMetricNvlinkL48RxPerSec      GpmMetricId = 429 // NvLink read bandwidth for link 48 in MiB/sec
	GpmMetricNvlinkL48TxPerSec      GpmMetricId = 430 // NvLink write bandwidth for link 48 in MiB/sec
	GpmMetricNvlinkL49RxPerSec      GpmMetricId = 431 // NvLink read bandwidth for link 49 in MiB/sec
	GpmMetricNvlinkL49TxPerSec      GpmMetricId = 432 // NvLink write bandwidth for link 49 in MiB/sec
	GpmMetricNvlinkL50RxPerSec      GpmMetricId = 433 // NvLink read bandwidth for link 50 in MiB/sec
	GpmMetricNvlinkL50TxPerSec      GpmMetricId = 434 // NvLink write bandwidth for link 50 in MiB/sec
	GpmMetricNvlinkL51RxPerSec      GpmMetricId = 435 // NvLink read bandwidth for link 51 in MiB/sec
	GpmMetricNvlinkL51TxPerSec      GpmMetricId = 436 // NvLink write bandwidth for link 51 in MiB/sec
	GpmMetricNvlinkL52RxPerSec      GpmMetricId = 437 // NvLink read bandwidth for link 52 in MiB/sec
	GpmMetricNvlinkL52TxPerSec      GpmMetricId = 438 // NvLink write bandwidth for link 52 in MiB/sec
	GpmMetricNvlinkL53RxPerSec      GpmMetricId = 439 // NvLink read bandwidth for link 53 in MiB/sec
	GpmMetricNvlinkL53TxPerSec      GpmMetricId = 440 // NvLink write bandwidth for link 53 in MiB/sec
	GpmMetricNvlinkL54RxPerSec      GpmMetricId = 441 // NvLink read bandwidth for link 54 in MiB/sec
	GpmMetricNvlinkL54TxPerSec      GpmMetricId = 442 // NvLink write bandwidth for link 54 in MiB/sec
	GpmMetricNvlinkL55RxPerSec      GpmMetricId = 443 // NvLink read bandwidth for link 55 in MiB/sec
	GpmMetricNvlinkL55TxPerSec      GpmMetricId = 444 // NvLink write bandwidth for link 55 in MiB/sec
	GpmMetricNvlinkL56RxPerSec      GpmMetricId = 445 // NvLink read bandwidth for link 56 in MiB/sec
	GpmMetricNvlinkL56TxPerSec      GpmMetricId = 446 // NvLink write bandwidth for link 56 in MiB/sec
	GpmMetricNvlinkL57RxPerSec      GpmMetricId = 447 // NvLink read bandwidth for link 57 in MiB/sec
	GpmMetricNvlinkL57TxPerSec      GpmMetricId = 448 // NvLink write bandwidth for link 57 in MiB/sec
	GpmMetricNvlinkL58RxPerSec      GpmMetricId = 449 // NvLink read bandwidth for link 58 in MiB/sec
	GpmMetricNvlinkL58TxPerSec      GpmMetricId = 450 // NvLink write bandwidth for link 58 in MiB/sec
	GpmMetricNvlinkL59RxPerSec      GpmMetricId = 451 // NvLink read bandwidth for link 59 in MiB/sec
	GpmMetricNvlinkL59TxPerSec      GpmMetricId = 452 // NvLink write bandwidth for link 59 in MiB/sec
	GpmMetricNvlinkL60RxPerSec      GpmMetricId = 453 // NvLink read bandwidth for link 60 in MiB/sec
	GpmMetricNvlinkL60TxPerSec      GpmMetricId = 454 // NvLink write bandwidth for link 60 in MiB/sec
	GpmMetricNvlinkL61RxPerSec      GpmMetricId = 455 // NvLink read bandwidth for link 61 in MiB/sec
	GpmMetricNvlinkL61TxPerSec      GpmMetricId = 456 // NvLink write bandwidth for link 61 in MiB/sec
	GpmMetricNvlinkL62RxPerSec      GpmMetricId = 457 // NvLink read bandwidth for link 62 in MiB/sec
	GpmMetricNvlinkL62TxPerSec      GpmMetricId = 458 // NvLink write bandwidth for link 62 in MiB/sec
	GpmMetricNvlinkL63RxPerSec      GpmMetricId = 459 // NvLink read bandwidth for link 63 in MiB/sec
	GpmMetricNvlinkL63TxPerSec      GpmMetricId = 460 // NvLink write bandwidth for link 63 in MiB/sec
	GpmMetricNvlinkL64RxPerSec      GpmMetricId = 461 // NvLink read bandwidth for link 64 in MiB/sec
	GpmMetricNvlinkL64TxPerSec      GpmMetricId = 462 // NvLink write bandwidth for link 64 in MiB/sec
	GpmMetricNvlinkL65RxPerSec      GpmMetricId = 463 // NvLink read bandwidth for link 65 in MiB/sec
	GpmMetricNvlinkL65TxPerSec      GpmMetricId = 464 // NvLink write bandwidth for link 65 in MiB/sec
	GpmMetricNvlinkL66RxPerSec      GpmMetricId = 465 // NvLink read bandwidth for link 66 in MiB/sec
	GpmMetricNvlinkL66TxPerSec      GpmMetricId = 466 // NvLink write bandwidth for link 66 in MiB/sec
	GpmMetricNvlinkL67RxPerSec      GpmMetricId = 467 // NvLink read bandwidth for link 67 in MiB/sec
	GpmMetricNvlinkL67TxPerSec      GpmMetricId = 468 // NvLink write bandwidth for link 67 in MiB/sec
	GpmMetricNvlinkL68RxPerSec      GpmMetricId = 469 // NvLink read bandwidth for link 68 in MiB/sec
	GpmMetricNvlinkL68TxPerSec      GpmMetricId = 470 // NvLink write bandwidth for link 68 in MiB/sec
	GpmMetricNvlinkL69RxPerSec      GpmMetricId = 471 // NvLink read bandwidth for link 69 in MiB/sec
	GpmMetricNvlinkL69TxPerSec      GpmMetricId = 472 // NvLink write bandwidth for link 69 in MiB/sec
	GpmMetricNvlinkL70RxPerSec      GpmMetricId = 473 // NvLink read bandwidth for link 70 in MiB/sec
	GpmMetricNvlinkL70TxPerSec      GpmMetricId = 474 // NvLink write bandwidth for link 70 in MiB/sec
	GpmMetricNvlinkL71RxPerSec      GpmMetricId = 475 // NvLink read bandwidth for link 71 in MiB/sec
	GpmMetricNvlinkL71TxPerSec      GpmMetricId = 476 // NvLink write bandwidth for link 71 in MiB/sec
)

func (GpmMetricId) String

func (e GpmMetricId) String() string

String returns the constant name, or a numeric representation for unknown values.

type GpmMetricsGetParams

type GpmMetricsGetParams struct {
	Version    uint32
	NumMetrics uint32
	Sample1    GpmSample
	Sample2    GpmSample
	Metrics    [477]GpmMetric
}

GpmMetricsGetParams represents GPM buffer information.

type GpmSample

type GpmSample uintptr

GpmSample is an opaque handle for nvmlGpmSample_t.

func NewGpmSample

func NewGpmSample() (GpmSample, error)

NewGpmSample allocates a sample buffer to be used with NVML GPM .

You will need to allocate at least two of these buffers to use with the NVML GPM feature For Hopper or newer fully supported devices.

  • gpmSample: Where the allocated sample will be stored

Errors:

Wraps nvmlGpmSampleAlloc.

func (*GpmSample) Close

func (g *GpmSample) Close() error

Close frees an allocated sample buffer that was allocated with NewGpmSample

For Hopper or newer fully supported devices.

Errors:

If g is zero, Close returns nil. Otherwise Close sets g to zero when the call succeeds and leaves it unchanged when it fails. Only g is zeroed: a copy of it still refers to the released object.

Wraps nvmlGpmSampleFree.

func (GpmSample) Get

func (g GpmSample) Get(device Device) error

Get reads a sample of GPM metrics into the provided gpmSample buffer.

After two samples are gathered, you can call nvmlGpmMetricGet on those samples to retrive metrics For Hopper or newer fully supported devices.

Note: The interval between two GpmSample.Get calls should be greater than 100ms due to the internal sample refresh rate.

Note: This API supports the device handle and MIG device handle.

  • device: The device handle or MIG device handle to get samples for

Wraps nvmlGpmSampleGet.

type GpmSupport

type GpmSupport struct {
	Version           uint32
	IsSupportedDevice uint32
}

GpmSupport represents GPM device information.

type GpuDynamicPstatesInfo

type GpuDynamicPstatesInfo struct {
	Flags       uint32
	Utilization [8][4]uint32
}

GpuDynamicPstatesInfo represents nvmlGpuDynamicPstatesInfo_t.

type GpuFabricCliqueV1

type GpuFabricCliqueV1 struct {
	Type uint8
	Id   uint32
}

GpuFabricCliqueV1 represents fabric clique entry.

Each entry represents a single (type, id) pair describing a clique assignment for a given fabric operation type.

type GpuFabricInfo

type GpuFabricInfo struct {
	ClusterUuid [16]uint8
	Status      Result
	CliqueId    uint32
	State       GpuFabricState
}

GpuFabricInfo contains the device fabric information.

type GpuFabricInfoV deprecated

type GpuFabricInfoV struct {
	Version       uint32
	ClusterUuid   [16]uint8
	Status        Result
	CliqueId      uint32
	State         GpuFabricState
	HealthMask    uint32
	HealthSummary uint8
}

GpuFabricInfoV represents GPU Fabric information (v3).

Deprecated: Use GpuFabricInfoV4 instead. GpuFabricInfoV is deprecated and will be removed in a future release.

type GpuFabricInfoV2 deprecated

type GpuFabricInfoV2 struct {
	Version     uint32
	ClusterUuid [16]uint8
	Status      Result
	CliqueId    uint32
	State       GpuFabricState
	HealthMask  uint32
}

GpuFabricInfoV2 represents GPU Fabric information (v2).

Version 2 adds the GpuFabricInfoV2.version field to the start of the structure, and the GpuFabricInfoV2.healthMask field to the end. This structure is not backwards-compatible with GpuFabricInfo.

Deprecated: Use GpuFabricInfoV instead. GpuFabricInfoV2 is deprecated and will be removed in a future release.

type GpuFabricInfoV4

type GpuFabricInfoV4 struct {
	ClusterUuid   [16]uint8
	Status        Result
	Cliques       [64]GpuFabricCliqueV1
	NumCliques    uint32
	State         GpuFabricState
	HealthMask    uint32
	HealthSummary uint8
}

GpuFabricInfoV4 represents GPU Fabric information (v4).

Extends v3 by replacing the single cliqueId field with a flat array of (type, id) clique entries. The legacy v3 cliqueId maps to the id of the first GpuFabricCliqueTypeUnicastPointer entry.

type GpuFabricInfoVV3

type GpuFabricInfoVV3 = GpuFabricInfoV

GpuFabricInfoVV3 is an alias for GpuFabricInfoV.

type GpuFabricState

type GpuFabricState uint8

GpuFabricState represents probe State of GPU registration process.

const (
	GpuFabricStateNotSupported GpuFabricState = 0 // Fabric Probe State not supported
	GpuFabricStateNotStarted   GpuFabricState = 1 // Fabric Probe has not started
	GpuFabricStateInProgress   GpuFabricState = 2 // Fabric Probe in progress
	GpuFabricStateCompleted    GpuFabricState = 3 // Fabric Probe State completed
)

func (GpuFabricState) String

func (e GpuFabricState) String() string

String returns the constant name, or a numeric representation for unknown values.

type GpuInstance

type GpuInstance uintptr

GpuInstance is an opaque handle for nvmlGpuInstance_t.

func (GpuInstance) ActiveVgpus

func (g GpuInstance) ActiveVgpus(pVgpuInstanceInfo *ActiveVgpuInstanceInfo) error

ActiveVgpus retrieves the active vGPU instances within a GPU instance.

An array of active vGPU instances is returned in the caller-supplied buffer pointed at by pVgpuInstanceInfo->vgpuInstances. The array element count is passed in pVgpuInstanceInfo->vgpuCount, and pVgpuInstanceInfo->vgpuCount is used to return the number of vGPU instances written to the buffer. If the supplied buffer is not large enough to accommodate the vGPU instance array, the function returns ErrInsufficientSize, with the element count of VgpuInstance array required in pVgpuInstanceInfo->vgpuCount. To query the number of active vGPU instances, call this function with pVgpuInstanceInfo->vgpuCount = 0 and pVgpuInstanceInfo->vgpuTypeIds = NULL. The code will return ErrInsufficientSize, or Success if no vGPU Types are active.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceGetActiveVgpus.

Errors:

Wraps nvmlGpuInstanceGetActiveVgpus.

func (*GpuInstance) Close

func (g *GpuInstance) Close() error

Close destroys GPU instance.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user.

Errors:

  • ErrInvalidArgument: If gpuInstance is invalid
  • ErrInUse: If the GPU instance is in use. This error would be returned if processes (e.g. CUDA application) or compute instances are active on the GPU instance.
  • ErrNotSupported: If device doesn’t have MIG mode enabled or in vGPU guest
  • ErrNoPermission: If user doesn’t have permission to perform the operation
  • ErrUninitialized: If library has not been successfully initialized

If g is zero, Close returns nil. Otherwise Close sets g to zero when the call succeeds and leaves it unchanged when it fails. Only g is zeroed: a copy of it still refers to the released object.

Wraps nvmlGpuInstanceDestroy.

func (GpuInstance) ComputeInstanceById

func (g GpuInstance) ComputeInstanceById(id uint32) (ComputeInstance, error)

ComputeInstanceById gets compute instance for given instance ID.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user.

  • id: The compute instance ID
  • computeInstance: Returns compute instance

Errors:

Wraps nvmlGpuInstanceGetComputeInstanceById.

func (GpuInstance) ComputeInstancePossiblePlacements

func (g GpuInstance) ComputeInstancePossiblePlacements(profileId uint32, placements *ComputeInstancePlacement, count *uint32) error

ComputeInstancePossiblePlacements gets compute instance placements.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user. A placement represents the location of a compute instance within a GPU instance. This API only returns all the possible placements for the given profile. A created compute instance occupies compute slices described by its placement. Creation of new compute instance will fail if there is overlap with the already occupied compute slices.

  • profileId: The compute instance profile ID. See GpuInstance.ComputeInstanceProfileInfo
  • placements: Returns placements allowed for the profile. Can be NULL to discover number of allowed placements for this profile. If non-NULL must be large enough to accommodate the placements supported by the profile
  • count: Returns number of allowed placemenets for the profile

Errors:

Wraps nvmlGpuInstanceGetComputeInstancePossiblePlacements.

func (GpuInstance) ComputeInstanceProfileInfo

func (g GpuInstance) ComputeInstanceProfileInfo(profile uint32, engProfile uint32) (ComputeInstanceProfileInfo, error)

ComputeInstanceProfileInfo gets compute instance profile information.

Information provided by this API is immutable throughout the lifetime of a MIG mode. For Ampere or newer fully supported devices. Supported on Linux only.

Note: This API can be used to enumerate all MIG profiles supported by NVML in a forward compatible way by invoking it on profile values starting from 0, until the API returns ErrInvalidArgument.

  • profile: One of the NVML_COMPUTE_INSTANCE_PROFILE_*
  • engProfile: One of the NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_*
  • info: Returns detailed profile information

Errors:

Wraps nvmlGpuInstanceGetComputeInstanceProfileInfo.

func (GpuInstance) ComputeInstanceProfileInfoV

func (g GpuInstance) ComputeInstanceProfileInfoV(profile uint32, engProfile uint32) (ComputeInstanceProfileInfoV2, error)

ComputeInstanceProfileInfoV returns information about a compute instance profile in a versioned structure, of version 2 or later.

Versioned wrapper around GpuInstance.ComputeInstanceProfileInfo that accepts a versioned ComputeInstanceProfileInfoV2 or later output structure.

For Ampere or newer fully supported devices. Supported on Linux only.

Note: The caller must set the GpuInstanceProfileInfoV2.version field to the appropriate version prior to calling this function.

  • profile: One of the NVML_COMPUTE_INSTANCE_PROFILE_*
  • engProfile: One of the NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_*
  • info: Returns detailed profile information

Errors:

Wraps nvmlGpuInstanceGetComputeInstanceProfileInfoV.

func (GpuInstance) ComputeInstanceRemainingCapacity

func (g GpuInstance) ComputeInstanceRemainingCapacity(profileId uint32, count *uint32) error

ComputeInstanceRemainingCapacity gets compute instance profile capacity.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user.

Errors:

Wraps nvmlGpuInstanceGetComputeInstanceRemainingCapacity.

func (GpuInstance) ComputeInstances

func (g GpuInstance) ComputeInstances(profileId uint32, computeInstances *ComputeInstance, count *uint32) error

ComputeInstances gets compute instances for given profile ID.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user.

Errors:

Wraps nvmlGpuInstanceGetComputeInstances.

func (GpuInstance) CreatableVgpus

func (g GpuInstance) CreatableVgpus(pVgpus *VgpuTypeIdInfo) error

CreatableVgpus queries the currently creatable vGPU types on a specific GPU Instance.

The function returns an array of vGPU types that can be created for a specified GPU instance. This array is stored in a caller-supplied buffer, with the buffer’s element count passed through pVgpus->vgpuCount. The number of vGPU types written to the buffer is indicated by pVgpus->vgpuCount. If the buffer is too small to hold the vGPU type array, the function returns ErrInsufficientSize and updates pVgpus->vgpuCount with the required element count. To determine the creatable vGPUs for a GPU Instance, invoke this function with pVgpus->vgpuCount set to 0 and pVgpus->vgpuTypeIds as NULL. This will result in ErrInsufficientSize being returned, along with the count value in pVgpus->vgpuCount. The creatable vGPU types may differ over time, as there may be restrictions on what type of vGPUs can concurrently run on the device.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceGetCreatableVgpus.

Errors:

Wraps nvmlGpuInstanceGetCreatableVgpus.

func (GpuInstance) CreateComputeInstance

func (g GpuInstance) CreateComputeInstance(profileId uint32) (ComputeInstance, error)

CreateComputeInstance creates compute instance.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user. If the parent device is unbound, reset or the parent GPU instance is destroyed or the compute instance is destroyed explicitly, the compute instance handle would become invalid. The compute instance must be recreated to acquire a valid handle.

Errors:

Wraps nvmlGpuInstanceCreateComputeInstance.

func (GpuInstance) CreateComputeInstanceWithPlacement

func (g GpuInstance) CreateComputeInstanceWithPlacement(profileId uint32, placement *ComputeInstancePlacement) (ComputeInstance, error)

CreateComputeInstanceWithPlacement creates compute instance with the specified placement.

For Ampere or newer fully supported devices. Supported on Linux only. Requires privileged user. If the parent device is unbound, reset or the parent GPU instance is destroyed or the compute instance is destroyed explicitly, the compute instance handle would become invalid. The compute instance must be recreated to acquire a valid handle.

Errors:

Wraps nvmlGpuInstanceCreateComputeInstanceWithPlacement.

func (GpuInstance) Info

func (g GpuInstance) Info() (GpuInstanceInfo, error)

Info gets GPU instance information.

For Ampere or newer fully supported devices. Supported on Linux only.

  • info: Return GPU instance information

Errors:

Wraps nvmlGpuInstanceGetInfo.

func (GpuInstance) SetVgpuHeterogeneousMode

func (g GpuInstance) SetVgpuHeterogeneousMode(pHeterogeneousMode *VgpuHeterogeneousMode) error

SetVgpuHeterogeneousMode enables or disables vGPU heterogeneous mode for the GPU instance.

When in heterogeneous mode, a vGPU can concurrently host timesliced vGPUs with differing framebuffer sizes. API would return an appropriate error code upon unsuccessful activation. For example, the heterogeneous mode set will fail with error ErrInUse if any vGPU instance is active within the GPU instance. The caller of this API is expected to shutdown the vGPU VMs and retry setting the mode. On successful return, the function updates the vGPU heterogeneous mode with the user provided pHeterogeneousMode->mode. pHeterogeneousMode->version is the version number of the structure VgpuHeterogeneousMode, the caller should set the correct version number to set the vGPU heterogeneous mode.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceSetVgpuHeterogeneousMode.

Errors:

Wraps nvmlGpuInstanceSetVgpuHeterogeneousMode.

func (GpuInstance) SetVgpuSchedulerState deprecated

func (g GpuInstance) SetVgpuSchedulerState(pScheduler *VgpuSchedulerState) error

SetVgpuSchedulerState sets vGPU scheduler state for the given GPU instance

For Blackwell &tm GB20x; or newer fully supported devices. Scheduler state and params will be allowed to set only when no VM is running within the GPU instance. In VgpuSchedulerState, IFF enableARRMode is enabled then provide the avgFactor and frequency as input. If enableARRMode is disabled then provide timeslice as input. The scheduler state change won’t persist across module load/unload and GPU Instance creation/deletion.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceSetVgpuSchedulerState.

Errors:

Wraps nvmlGpuInstanceSetVgpuSchedulerState.

Deprecated: Deprecated in CUDA 13.0. Use GpuInstance.SetVgpuSchedulerStateV2 instead.

func (GpuInstance) SetVgpuSchedulerStateV1 deprecated

func (g GpuInstance) SetVgpuSchedulerStateV1(pScheduler *VgpuSchedulerState) error

SetVgpuSchedulerStateV1 sets vGPU scheduler state for the given GPU instance

For Blackwell &tm GB20x; or newer fully supported devices. Scheduler state and params will be allowed to set only when no VM is running within the GPU instance. In VgpuSchedulerState, IFF enableARRMode is enabled then provide the avgFactor and frequency as input. If enableARRMode is disabled then provide timeslice as input. The scheduler state change won’t persist across module load/unload and GPU Instance creation/deletion.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceSetVgpuSchedulerStateV1.

Errors:

Wraps nvmlGpuInstanceSetVgpuSchedulerState.

Deprecated: Deprecated in CUDA 13.0. Use GpuInstance.SetVgpuSchedulerStateV2 instead.

func (GpuInstance) SetVgpuSchedulerStateV2

func (g GpuInstance) SetVgpuSchedulerStateV2(pSchedulerState *VgpuSchedulerStateV2) error

SetVgpuSchedulerStateV2 sets vGPU scheduler state for the given GPU instance.

For Blackwell &tm GB20x; or newer fully supported devices. Scheduler state and params will be allowed to set only when no VM is running within the GPU instance. The scheduler state change won’t persist across module load/unload and GPU Instance creation/deletion.

Requires CUDA 13.2 (driver r595) or later; see HasGpuInstanceSetVgpuSchedulerStateV2.

Errors:

  • ErrInvalidArgument: If gpuInstance is NULL or invalid, or pSchedulerState is NULL or GPU Instance Id is invalid
  • ErrNotSupported: If not on a vGPU host or an unsupported GPU or if any vGPU instance exists
  • ErrResetRequired: If setting the state failed with fatal error, reboot is required
  • ErrUnknown: On any unexpected error

Wraps nvmlGpuInstanceSetVgpuSchedulerState_v2.

func (GpuInstance) VgpuHeterogeneousMode

func (g GpuInstance) VgpuHeterogeneousMode(pHeterogeneousMode *VgpuHeterogeneousMode) error

VgpuHeterogeneousMode gets the vGPU heterogeneous mode for the GPU instance.

When in heterogeneous mode, a vGPU can concurrently host timesliced vGPUs with differing framebuffer sizes. On successful return, the function returns pHeterogeneousMode->mode with the current vGPU heterogeneous mode. pHeterogeneousMode->version is the version number of the structure VgpuHeterogeneousMode, the caller should set the correct version number to retrieve the vGPU heterogeneous mode. pHeterogeneousMode->mode can either be FeatureEnabled or FeatureDisabled. For Blackwell &tm GB20x; or newer fully supported devices.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceGetVgpuHeterogeneousMode.

Errors:

Wraps nvmlGpuInstanceGetVgpuHeterogeneousMode.

func (GpuInstance) VgpuSchedulerLog deprecated

func (g GpuInstance) VgpuSchedulerLog(pSchedulerLogInfo *VgpuSchedulerLogInfo) error

VgpuSchedulerLog returns the vGPU scheduler logs for the given GPU instance.

pSchedulerLogInfo points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed SchedulerSwMaxLogEntries. To get the entire logs, call the function atleast 5 times a second. For Blackwell &tm GB20x; or newer fully supported devices.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceGetVgpuSchedulerLog.

  • pSchedulerLogInfo: Reference in which pSchedulerLogInfo is written

A nil error means vGPU scheduler logs are successfully obtained.

Errors:

Wraps nvmlGpuInstanceGetVgpuSchedulerLog.

Deprecated: Deprecated in CUDA 13.0. Use GpuInstance.VgpuSchedulerLogV2 instead.

func (GpuInstance) VgpuSchedulerLogV1 deprecated

func (g GpuInstance) VgpuSchedulerLogV1(pSchedulerLogInfo *VgpuSchedulerLogInfo) error

VgpuSchedulerLogV1 returns the vGPU scheduler logs for the given GPU instance.

pSchedulerLogInfo points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed SchedulerSwMaxLogEntries. To get the entire logs, call the function atleast 5 times a second. For Blackwell &tm GB20x; or newer fully supported devices.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceGetVgpuSchedulerLogV1.

  • pSchedulerLogInfo: Reference in which pSchedulerLogInfo is written

A nil error means vGPU scheduler logs are successfully obtained.

Errors:

Wraps nvmlGpuInstanceGetVgpuSchedulerLog.

Deprecated: Deprecated in CUDA 13.0. Use GpuInstance.VgpuSchedulerLogV2 instead.

func (GpuInstance) VgpuSchedulerLogV2

func (g GpuInstance) VgpuSchedulerLogV2(pSchedulerLogInfo *VgpuSchedulerLogInfoV2) error

VgpuSchedulerLogV2 returns the vGPU scheduler logs for the given GPU instance.

pSchedulerLogInfo points to a caller-allocated structure to contain the logs. The number of elements returned will never exceed SchedulerSwMaxLogEntries. To get the entire logs, call the function atleast 5 times a second. For Blackwell &tm GB20x; or newer fully supported devices.

Requires CUDA 13.2 (driver r595) or later; see HasGpuInstanceGetVgpuSchedulerLogV2.

  • pSchedulerLogInfo: Reference in which pSchedulerLogInfo is written

A nil error means vGPU scheduler logs are successfully obtained.

Errors:

Wraps nvmlGpuInstanceGetVgpuSchedulerLog_v2.

func (GpuInstance) VgpuSchedulerState deprecated

func (g GpuInstance) VgpuSchedulerState(pSchedulerStateInfo *VgpuSchedulerStateInfo) error

VgpuSchedulerState returns the vGPU scheduler state for the given GPU instance.

The information returned in VgpuSchedulerStateInfo is not relevant if the BEST EFFORT policy is set. For Blackwell &tm GB20x; or newer fully supported devices.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceGetVgpuSchedulerState.

  • pSchedulerStateInfo: Reference in which pSchedulerStateInfo is returned

A nil error means vGPU scheduler state is successfully obtained.

Errors:

Wraps nvmlGpuInstanceGetVgpuSchedulerState.

Deprecated: Deprecated in CUDA 13.0. Use GpuInstance.VgpuSchedulerStateV2 instead.

func (GpuInstance) VgpuSchedulerStateV1 deprecated

func (g GpuInstance) VgpuSchedulerStateV1(pSchedulerStateInfo *VgpuSchedulerStateInfo) error

VgpuSchedulerStateV1 returns the vGPU scheduler state for the given GPU instance.

The information returned in VgpuSchedulerStateInfo is not relevant if the BEST EFFORT policy is set. For Blackwell &tm GB20x; or newer fully supported devices.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceGetVgpuSchedulerStateV1.

  • pSchedulerStateInfo: Reference in which pSchedulerStateInfo is returned

A nil error means vGPU scheduler state is successfully obtained.

Errors:

Wraps nvmlGpuInstanceGetVgpuSchedulerState.

Deprecated: Deprecated in CUDA 13.0. Use GpuInstance.VgpuSchedulerStateV2 instead.

func (GpuInstance) VgpuSchedulerStateV2

func (g GpuInstance) VgpuSchedulerStateV2(pSchedulerStateInfo *VgpuSchedulerStateInfoV2) error

VgpuSchedulerStateV2 returns the vGPU scheduler state for the given GPU instance.

The information returned in VgpuSchedulerStateInfoV2 is not relevant if the BEST EFFORT policy is set. For Blackwell &tm GB20x; or newer fully supported devices.

Requires CUDA 13.2 (driver r595) or later; see HasGpuInstanceGetVgpuSchedulerStateV2.

  • pSchedulerStateInfo: Reference in which pSchedulerStateInfo is returned

A nil error means vGPU scheduler state is successfully obtained.

Errors:

Wraps nvmlGpuInstanceGetVgpuSchedulerState_v2.

func (GpuInstance) VgpuTypeCreatablePlacements

func (g GpuInstance) VgpuTypeCreatablePlacements(pCreatablePlacementInfo *VgpuCreatablePlacementInfo) error

VgpuTypeCreatablePlacements queries the creatable vGPU placement ID of the vGPU type within a GPU instance.

For Blackwell &tm GB20x; or newer fully supported devices. An array of creatable vGPU placement IDs for the vGPU type ID indicated by pCreatablePlacementInfo->vgpuTypeId is returned in the caller-supplied buffer of pCreatablePlacementInfo->placementIds. Memory needed for the placementIds array should be allocated based on maximum instances of a vGPU type per GPU instance which can be queried via VgpuTypeGetMaxInstancesPerGpuInstance. If the provided count by the caller is insufficient, the function will return ErrInsufficientSize along with the number of required entries in pCreatablePlacementInfo->count. The caller should then reallocate a buffer with the size of pCreatablePlacementInfo->count * sizeof(pCreatablePlacementInfo->placementIds) and invoke the function again. The creatable vGPU placement IDs may differ over time, as there may be restrictions on what type of vGPU the vGPU instance is running.

Requires CUDA 12.9 (driver r575) or later; see HasGpuInstanceGetVgpuTypeCreatablePlacements.

Errors:

Wraps nvmlGpuInstanceGetVgpuTypeCreatablePlacements.

type GpuInstanceInfo

type GpuInstanceInfo struct {
	Device    Device
	Id        uint32
	ProfileId uint32
	Placement GpuInstancePlacement
}

GpuInstanceInfo represents nvmlGpuInstanceInfo_t.

type GpuInstancePlacement

type GpuInstancePlacement struct {
	Start uint32
	Size  uint32
}

GpuInstancePlacement represents nvmlGpuInstancePlacement_t.

type GpuInstanceProfileInfo

type GpuInstanceProfileInfo struct {
	Id                  uint32
	IsP2pSupported      uint32
	SliceCount          uint32
	InstanceCount       uint32
	MultiprocessorCount uint32
	CopyEngineCount     uint32
	DecoderCount        uint32
	EncoderCount        uint32
	JpegCount           uint32
	OfaCount            uint32
	MemorySizeMB        uint64
}

GpuInstanceProfileInfo represents GPU instance profile information.

type GpuInstanceProfileInfoV2

type GpuInstanceProfileInfoV2 struct {
	Version             uint32
	Id                  uint32
	IsP2pSupported      uint32
	SliceCount          uint32
	InstanceCount       uint32
	MultiprocessorCount uint32
	CopyEngineCount     uint32
	DecoderCount        uint32
	EncoderCount        uint32
	JpegCount           uint32
	OfaCount            uint32
	MemorySizeMB        uint64
	Name                [96]byte
}

GpuInstanceProfileInfoV2 represents GPU instance profile information (v2).

Version 2 adds the GpuInstanceProfileInfoV2.version field to the start of the structure, and the GpuInstanceProfileInfoV2.name field to the end. This structure is not backwards-compatible with GpuInstanceProfileInfo.

type GpuInstanceProfileInfoV3

type GpuInstanceProfileInfoV3 struct {
	Version             uint32
	Id                  uint32
	SliceCount          uint32
	InstanceCount       uint32
	MultiprocessorCount uint32
	CopyEngineCount     uint32
	DecoderCount        uint32
	EncoderCount        uint32
	JpegCount           uint32
	OfaCount            uint32
	MemorySizeMB        uint64
	Name                [96]byte
	Capabilities        uint32
}

GpuInstanceProfileInfoV3 represents GPU instance profile information (v3).

Version 3 removes isP2pSupported field and adds the GpuInstanceProfileInfoV3.capabilities field GpuInstanceProfileInfo.

type GpuOperationMode

type GpuOperationMode int32

GpuOperationMode represents GPU Operation Mode.

GOM allows to reduce power usage and optimize GPU throughput by disabling GPU features. Each GOM is designed to meet specific user needs.

const (
	GomAllOn   GpuOperationMode = 0 // Everything is enabled and running at full speed
	GomCompute GpuOperationMode = 1 // Designed for running only compute tasks. Graphics operations
	GomLowDp   GpuOperationMode = 2 // Designed for running graphics applications that don't require
)

func (GpuOperationMode) String

func (e GpuOperationMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type GpuOperationalEventConfigV1

type GpuOperationalEventConfigV1 struct {
	Uuid        [96]byte
	MinLogLevel uint32
	MinSeverity uint32
}

GpuOperationalEventConfigV1 represents configuration for registering structured GPU Operational Events with EventSet.RegisterGpuOperationalEvents.

Initialize the structure to zero and then set uuid to select the target GPU. Default values register new device-wide events with log-level and severity filters disabled.

type GpuOperationalEventContextType

type GpuOperationalEventContextType int32

GpuOperationalEventContextType represents NVML-defined GPU Operational Event context classifications.

These values describe the NVML public interpretation of a context payload. The original source-defined context type is returned separately in [EventSetGetContextInfoV1]sourceEventContextType.

const (
	GpuOperationalEventContextTypeUnknown   GpuOperationalEventContextType = 0 // No NVML public interpretation is defined for this context payload.
	GpuOperationalEventContextTypeLegacyXid GpuOperationalEventContextType = 1 // Context payload can be decoded with [EventSet.GpuOperationalEventContextLegacyXid].
)

func (GpuOperationalEventContextType) String

String returns the constant name, or a numeric representation for unknown values.

type GpuOperationalEventLogLevel

type GpuOperationalEventLogLevel int32

GpuOperationalEventLogLevel represents log-level values used by GPU Operational Events.

These values are used both for event reporting in EventSetWaitV3 and for subscription filtering in GpuOperationalEventConfigV1. Higher numeric values represent more selective log levels. GpuOperationalEventLogLevelAll disables log-level filtering when used as a subscription threshold. Event data may contain newer log-level values that are not named in this header; clients should handle unrecognized numeric values.

const (
	GpuOperationalEventLogLevelAll       GpuOperationalEventLogLevel = 0  // Matches all GPU Operational Event log levels.
	GpuOperationalEventLogLevelTelemetry GpuOperationalEventLogLevel = 10 // High-volume telemetry events.
	GpuOperationalEventLogLevelDiag      GpuOperationalEventLogLevel = 20 // Diagnostic events.
	GpuOperationalEventLogLevelNotice    GpuOperationalEventLogLevel = 30 // Notable operational events.
	GpuOperationalEventLogLevelWarning   GpuOperationalEventLogLevel = 40 // Warning events.
	GpuOperationalEventLogLevelError     GpuOperationalEventLogLevel = 50 // Error events.
)

func (GpuOperationalEventLogLevel) String

String returns the constant name, or a numeric representation for unknown values.

type GpuP2PCapsIndex

type GpuP2PCapsIndex int32

GpuP2PCapsIndex represents nvmlGpuP2PCapsIndex_t.

const (
	P2PCapsIndexRead    GpuP2PCapsIndex = 0
	P2PCapsIndexWrite   GpuP2PCapsIndex = 1
	P2PCapsIndexNvlink  GpuP2PCapsIndex = 2
	P2PCapsIndexAtomics GpuP2PCapsIndex = 3
	P2PCapsIndexPci     GpuP2PCapsIndex = 4
	P2PCapsIndexProp    GpuP2PCapsIndex = P2PCapsIndexPci
	P2PCapsIndexUnknown GpuP2PCapsIndex = 5
)

func (GpuP2PCapsIndex) String

func (e GpuP2PCapsIndex) String() string

String returns the constant name, or a numeric representation for unknown values.

type GpuP2PStatus

type GpuP2PStatus int32

GpuP2PStatus represents nvmlGpuP2PStatus_t.

const (
	P2PStatusOk                      GpuP2PStatus = 0
	P2PStatusChipsetNotSuppored      GpuP2PStatus = 1
	P2PStatusChipsetNotSupported     GpuP2PStatus = P2PStatusChipsetNotSuppored
	P2PStatusGpuNotSupported         GpuP2PStatus = 2
	P2PStatusIohTopologyNotSupported GpuP2PStatus = 3
	P2PStatusDisabledByRegkey        GpuP2PStatus = 4
	P2PStatusNotSupported            GpuP2PStatus = 5
	P2PStatusUnknown                 GpuP2PStatus = 6
)

func (GpuP2PStatus) String

func (e GpuP2PStatus) String() string

String returns the constant name, or a numeric representation for unknown values.

type GpuThermalSettings

type GpuThermalSettings struct {
	Count  uint32
	Sensor [3][5]uint32
}

GpuThermalSettings holds the thermal sensor settings.

type GpuTopologyLevel

type GpuTopologyLevel int32

GpuTopologyLevel represents level relationships within a system between two GPUs The enums are spaced to allow for future relationships.

const (
	TopologyInternal   GpuTopologyLevel = 0  // e.g. Tesla K80
	TopologySingle     GpuTopologyLevel = 10 // all devices that only need traverse a single PCIe switch
	TopologyMultiple   GpuTopologyLevel = 20 // all devices that need not traverse a host bridge
	TopologyHostbridge GpuTopologyLevel = 30 // all devices that are connected to the same host bridge
	TopologyNode       GpuTopologyLevel = 40 // all devices that are connected to the same NUMA node but possibly multiple host bridges
	TopologySystem     GpuTopologyLevel = 50 // all devices in the system
)

func (GpuTopologyLevel) String

func (e GpuTopologyLevel) String() string

String returns the constant name, or a numeric representation for unknown values.

type GpuUptimeV1

type GpuUptimeV1 struct {
	Uptime uint32
}

GpuUptimeV1 represents GPU Uptime.

type GpuUtilizationDomainId

type GpuUtilizationDomainId int32

GpuUtilizationDomainId represents the GPU utilization domains.

const (
	GpuUtilizationDomainGpu GpuUtilizationDomainId = 0 // Graphics engine domain
	GpuUtilizationDomainFb  GpuUtilizationDomainId = 1 // Frame buffer domain
	GpuUtilizationDomainVid GpuUtilizationDomainId = 2 // Video engine domain
	GpuUtilizationDomainBus GpuUtilizationDomainId = 3 // Bus interface domain
)

func (GpuUtilizationDomainId) String

func (e GpuUtilizationDomainId) String() string

String returns the constant name, or a numeric representation for unknown values.

type GpuVirtualizationMode

type GpuVirtualizationMode int32

GpuVirtualizationMode represents nvmlGpuVirtualizationMode_t.

const (
	GpuVirtualizationModeNone        GpuVirtualizationMode = 0 // Represents Bare Metal GPU
	GpuVirtualizationModePassthrough GpuVirtualizationMode = 1 // Device is associated with GPU-Passthorugh
	GpuVirtualizationModeVgpu        GpuVirtualizationMode = 2 // Device is associated with vGPU inside virtual machine.
	GpuVirtualizationModeHostVgpu    GpuVirtualizationMode = 3 // Device is associated with VGX hypervisor in vGPU mode
	GpuVirtualizationModeHostVsga    GpuVirtualizationMode = 4 // Device is associated with VGX hypervisor in vSGA mode
)

func (GpuVirtualizationMode) String

func (e GpuVirtualizationMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type GridLicensableFeature

type GridLicensableFeature struct {
	FeatureCode    GridLicenseFeatureCode
	FeatureState   uint32
	LicenseInfo    [128]byte
	ProductName    [128]byte
	FeatureEnabled uint32
	LicenseExpiry  GridLicenseExpiry
}

GridLicensableFeature contains vGPU software licensable feature information.

type GridLicensableFeatures

type GridLicensableFeatures struct {
	IsGridLicenseSupported  int32
	LicensableFeaturesCount uint32
	GridLicensableFeatures  [3]GridLicensableFeature
}

GridLicensableFeatures stores vGPU software licensable features.

type GridLicenseExpiry

type GridLicenseExpiry struct {
	Year   uint32
	Month  uint16
	Day    uint16
	Hour   uint16
	Min    uint16
	Sec    uint16
	Status uint8
}

GridLicenseExpiry stores license expiry date and time values.

type GridLicenseFeatureCode

type GridLicenseFeatureCode int32

GridLicenseFeatureCode represents vGPU software licensable features.

const (
	GridLicenseFeatureCodeUnknown   GridLicenseFeatureCode = 0 // Unknown
	GridLicenseFeatureCodeVgpu      GridLicenseFeatureCode = 1 // Virtual GPU
	GridLicenseFeatureCodeNvidiaRtx GridLicenseFeatureCode = 2 // Nvidia RTX
	//
	// Deprecated: Deprecated by NVIDIA. Do not use.
	GridLicenseFeatureCodeVworkstation GridLicenseFeatureCode = GridLicenseFeatureCodeNvidiaRtx
	GridLicenseFeatureCodeGaming       GridLicenseFeatureCode = 3 // Gaming
	GridLicenseFeatureCodeCompute      GridLicenseFeatureCode = 4 // Compute
	GridLicenseFeatureCodeVgamedev     GridLicenseFeatureCode = 5 // vGameDev
)

func (GridLicenseFeatureCode) String

func (e GridLicenseFeatureCode) String() string

String returns the constant name, or a numeric representation for unknown values.

type HostVgpuMode

type HostVgpuMode int32

HostVgpuMode represents host vGPU modes.

const (
	HostVgpuModeNonSriov HostVgpuMode = 0 // Non SR-IOV mode
	HostVgpuModeSriov    HostVgpuMode = 1 // SR-IOV mode
)

func (HostVgpuMode) String

func (e HostVgpuMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type HostnameV1

type HostnameV1 struct {
	Value [64]byte
}

HostnameV1 stores the hostname string assigned to a GPU device.

type HwbcEntry

type HwbcEntry struct {
	HwbcId          uint32
	FirmwareVersion [32]byte
}

HwbcEntry represents description of HWBC entry.

type InforomObject

type InforomObject int32

InforomObject represents available infoROM objects.

const (
	InforomOem   InforomObject = 0 // An object defined by OEM
	InforomEcc   InforomObject = 1 // The ECC object determining the level of ECC support
	InforomPower InforomObject = 2 // The power management object
	InforomDen   InforomObject = 3 // DRAM Encryption object
	InforomCount InforomObject = 4 // This counts the number of infoROM objects the driver knows about
)

func (InforomObject) String

func (e InforomObject) String() string

String returns the constant name, or a numeric representation for unknown values.

type IntNvLinkDeviceType

type IntNvLinkDeviceType int32

IntNvLinkDeviceType represents NvLink's remote device type.

const (
	NvlinkDeviceTypeGpu     IntNvLinkDeviceType = 0x00
	NvlinkDeviceTypeIbmnpu  IntNvLinkDeviceType = 0x01
	NvlinkDeviceTypeSwitch  IntNvLinkDeviceType = 0x02
	NvlinkDeviceTypeUnknown IntNvLinkDeviceType = 0xFF
)

func (IntNvLinkDeviceType) String

func (e IntNvLinkDeviceType) String() string

String returns the constant name, or a numeric representation for unknown values.

type LedColor

type LedColor int32

LedColor represents led color enum.

const (
	LedColorGreen LedColor = 0 // GREEN, indicates good health
	LedColorAmber LedColor = 1 // AMBER, indicates problem
)

func (LedColor) String

func (e LedColor) String() string

String returns the constant name, or a numeric representation for unknown values.

type LedState

type LedState struct {
	Cause [256]byte
	Color LedColor
}

LedState represents LED states for an S-class unit.

type LibraryAttempt

type LibraryAttempt struct {
	Name string // path or soname passed to dlopen
	Err  error
}

LibraryAttempt records one failed attempt to open the shared library.

type LibraryConflictError

type LibraryConflictError struct {
	Loaded    string
	Requested string

	// Implicit reports that the loaded library was opened lazily and no
	// successful Load has since acknowledged it. A
	// caller that sees this called some
	// other function first, and that call took the default search list.
	Implicit bool
}

LibraryConflictError reports a Load call naming a different library than the one already loaded. Only one library is loaded per process.

func (*LibraryConflictError) Error

func (e *LibraryConflictError) Error() string

Error reports the conflicting library paths, and whether the library that is already loaded got there without a Load call.

type LibraryError

type LibraryError struct {
	Library  string
	Env      string
	Path     string
	Attempts []LibraryAttempt
	Hint     string
}

LibraryError reports that libnvidia-ml could not be opened. Attempts lists every name tried in order. Path is set when an explicit path, from Load or NVML_LIB_PATH, was requested and failed. Hint reports pkg-config discovery results and query failures, when discovery ran.

func (*LibraryError) Error

func (e *LibraryError) Error() string

Error describes the library load attempts and their errors.

func (*LibraryError) Unwrap

func (e *LibraryError) Unwrap() []error

Unwrap returns the error from each attempt.

type MarginTemperature

type MarginTemperature struct {
	Version           uint32
	MarginTemperature int32
}

MarginTemperature represents margin temperature values.

type MarginTemperatureV1

type MarginTemperatureV1 = MarginTemperature

MarginTemperatureV1 is an alias for MarginTemperature.

type Mask255

type Mask255 struct {
	Mask [8]uint32
}

Mask255 represents nvmlMask255_t.

type Memory

type Memory struct {
	Total uint64
	Free  uint64
	Used  uint64
}

Memory represents memory allocation information for a device (v1).

The total amount is equal to the sum of the amounts of free and used memory.

type MemoryErrorType

type MemoryErrorType int32

MemoryErrorType represents memory error types.

const (
	MemoryErrorTypeCorrected   MemoryErrorType = 0 // A memory error that was corrected. For ECC errors, these are single bit errors For Texture memory, these are errors fixed by resend
	MemoryErrorTypeUncorrected MemoryErrorType = 1 // A memory error that was not corrected. For ECC errors, these are double bit errors For Texture memory, these are errors where the resend fails
	MemoryErrorTypeCount       MemoryErrorType = 2 // Count of memory error types
)

func (MemoryErrorType) String

func (e MemoryErrorType) String() string

String returns the constant name, or a numeric representation for unknown values.

type MemoryLocation

type MemoryLocation int32

MemoryLocation represents see Device.MemoryErrorCounter.

const (
	MemoryLocationL1Cache       MemoryLocation = 0 // GPU L1 Cache
	MemoryLocationL2Cache       MemoryLocation = 1 // GPU L2 Cache
	MemoryLocationDram          MemoryLocation = 2 // Turing+ DRAM
	MemoryLocationDeviceMemory  MemoryLocation = 2 // GPU Device Memory
	MemoryLocationRegisterFile  MemoryLocation = 3 // GPU Register File
	MemoryLocationTextureMemory MemoryLocation = 4 // GPU Texture Memory
	MemoryLocationTextureShm    MemoryLocation = 5 // Shared memory
	MemoryLocationCbu           MemoryLocation = 6 // CBU
	MemoryLocationSram          MemoryLocation = 7 // Turing+ SRAM
	MemoryLocationCount         MemoryLocation = 8 // This counts the number of memory locations the driver knows about
)

func (MemoryLocation) String

func (e MemoryLocation) String() string

String returns the constant name, or a numeric representation for unknown values.

type MemoryV2

type MemoryV2 struct {
	Version  uint32
	Total    uint64
	Reserved uint64
	Free     uint64
	Used     uint64
}

MemoryV2 represents memory allocation information for a device (v2).

Version 2 adds versioning for the struct and the amount of system-reserved memory as an output.

type NvLinkCapability

type NvLinkCapability int32

NvLinkCapability represents NvLink queryable capabilities.

const (
	NvlinkCapP2PSupported  NvLinkCapability = 0 // P2P over NVLink is supported
	NvlinkCapSysmemAccess  NvLinkCapability = 1 // Access to system memory is supported
	NvlinkCapP2PAtomics    NvLinkCapability = 2 // P2P atomics are supported
	NvlinkCapSysmemAtomics NvLinkCapability = 3 // System memory atomics are supported
	NvlinkCapSliBridge     NvLinkCapability = 4 // SLI is supported over this link
	NvlinkCapValid         NvLinkCapability = 5 // Link is supported on this device
	NvlinkCapCount         NvLinkCapability = 6
)

func (NvLinkCapability) String

func (e NvLinkCapability) String() string

String returns the constant name, or a numeric representation for unknown values.

type NvLinkErrorCounter

type NvLinkErrorCounter int32

NvLinkErrorCounter represents NvLink queryable error counters.

const (
	NvlinkErrorDlReplay   NvLinkErrorCounter = 0 // Data link transmit replay error counter
	NvlinkErrorDlRecovery NvLinkErrorCounter = 1 // Data link transmit recovery error counter
	NvlinkErrorDlCrcFlit  NvLinkErrorCounter = 2 // Data link receive flow control digit CRC error counter
	NvlinkErrorDlCrcData  NvLinkErrorCounter = 3 // Data link receive data CRC error counter
	NvlinkErrorDlEccData  NvLinkErrorCounter = 4 // Data link receive data ECC error counter
	NvlinkErrorCount      NvLinkErrorCounter = 5
)

func (NvLinkErrorCounter) String

func (e NvLinkErrorCounter) String() string

String returns the constant name, or a numeric representation for unknown values.

type NvLinkInfo

type NvLinkInfo struct {
	Version       uint32
	IsNvleEnabled uint32
	FirmwareInfo  NvlinkFirmwareInfo
}

NvLinkInfo represents per device NVLINK information v2.

type NvLinkInfoV1

type NvLinkInfoV1 struct {
	Version       uint32
	IsNvleEnabled uint32
}

NvLinkInfoV1 represents per device NVLINK information v1.

type NvLinkInfoV2

type NvLinkInfoV2 = NvLinkInfo

NvLinkInfoV2 is an alias for NvLinkInfo.

type NvLinkInfoV3

type NvLinkInfoV3 struct {
	IsNvleEnabled uint32
	FirmwareInfo  NvlinkFirmwareInfo
	IsNvleReady   uint32
}

NvLinkInfoV3 represents per device NVLINK information v3.

type NvLinkPowerThres

type NvLinkPowerThres struct {
	LowPwrThreshold uint32
}

NvLinkPowerThres contains low Power parameters.

type NvLinkUtilizationControl

type NvLinkUtilizationControl struct {
	Units     NvLinkUtilizationCountUnits
	Pktfilter NvLinkUtilizationCountPktTypes
}

NvLinkUtilizationControl defines the NVLINK counter controls.

type NvLinkUtilizationCountPktTypes

type NvLinkUtilizationCountPktTypes int32

NvLinkUtilizationCountPktTypes represents the NvLink utilization counter packet types to count ** this is ONLY applicable with the units as packets or bytes ** as specified in NvLinkUtilizationCountUnits ** all packet filter descriptions are target GPU centric ** these can be "OR'd" together.

const (
	NvlinkCounterPktfilterNop        NvLinkUtilizationCountPktTypes = 0x1  // no operation packets
	NvlinkCounterPktfilterRead       NvLinkUtilizationCountPktTypes = 0x2  // read packets
	NvlinkCounterPktfilterWrite      NvLinkUtilizationCountPktTypes = 0x4  // write packets
	NvlinkCounterPktfilterRatom      NvLinkUtilizationCountPktTypes = 0x8  // reduction atomic requests
	NvlinkCounterPktfilterNratom     NvLinkUtilizationCountPktTypes = 0x10 // non-reduction atomic requests
	NvlinkCounterPktfilterFlush      NvLinkUtilizationCountPktTypes = 0x20 // flush requests
	NvlinkCounterPktfilterRespdata   NvLinkUtilizationCountPktTypes = 0x40 // responses with data
	NvlinkCounterPktfilterRespnodata NvLinkUtilizationCountPktTypes = 0x80 // responses without data
	NvlinkCounterPktfilterAll        NvLinkUtilizationCountPktTypes = 0xFF // all packets
)

func (NvLinkUtilizationCountPktTypes) String

String returns the constant name, or a numeric representation for unknown values.

type NvLinkUtilizationCountUnits

type NvLinkUtilizationCountUnits int32

NvLinkUtilizationCountUnits represents the NvLink utilization counter packet units.

const (
	NvlinkCounterUnitCycles   NvLinkUtilizationCountUnits = 0 // count by cycles
	NvlinkCounterUnitPackets  NvLinkUtilizationCountUnits = 1 // count by packets
	NvlinkCounterUnitBytes    NvLinkUtilizationCountUnits = 2 // count by bytes
	NvlinkCounterUnitReserved NvLinkUtilizationCountUnits = 3 // count reserved for internal use
	NvlinkCounterUnitCount    NvLinkUtilizationCountUnits = 4
)

func (NvLinkUtilizationCountUnits) String

String returns the constant name, or a numeric representation for unknown values.

type NvlinkFirmwareInfo

type NvlinkFirmwareInfo struct {
	FirmwareVersion [100]NvlinkFirmwareVersion
	NumValidEntries uint32
}

NvlinkFirmwareInfo represents NVLINK firmware information.

type NvlinkFirmwareVersion

type NvlinkFirmwareVersion struct {
	UcodeType uint8
	Major     uint32
	Minor     uint32
	SubMinor  uint32
}

NvlinkFirmwareVersion represents NVLINK firmware Semantic versioning and ucode type.

type NvlinkGetBwMode

type NvlinkGetBwMode struct {
	Version uint32
	BIsBest uint32
	BwMode  uint8
}

NvlinkGetBwMode represents nvmlNvlinkGetBwMode_v1_t.

type NvlinkGetBwModeV1

type NvlinkGetBwModeV1 = NvlinkGetBwMode

NvlinkGetBwModeV1 is an alias for NvlinkGetBwMode.

type NvlinkGetRemapTableInfoV1

type NvlinkGetRemapTableInfoV1 struct {
	Alid            uint32
	FlaRemapTabAddr [4096]uint32
	GpaRemapTabAddr [4096]uint32
	RemapTabSize    uint32
}

NvlinkGetRemapTableInfoV1 is a structure for NVLink remap table information.

type NvlinkLockRemapTableV1

type NvlinkLockRemapTableV1 struct {
	BRemapTableLocked       uint8
	BRemapTableLockDisabled uint8
}

NvlinkLockRemapTableV1 is a structure for the NVLink remap table and MSE lock operation.

type NvlinkNvlePrivateInfoV1

type NvlinkNvlePrivateInfoV1 struct {
	Data [256]uint8
	Size uint32
}

NvlinkNvlePrivateInfoV1 is a structure for NVLink NVLE private (opaque) information.

type NvlinkSetBwMode

type NvlinkSetBwMode struct {
	Version  uint32
	BSetBest uint32
	BwMode   uint8
}

NvlinkSetBwMode represents nvmlNvlinkSetBwMode_v1_t.

type NvlinkSetBwModeAsyncV1

type NvlinkSetBwModeAsyncV1 struct {
	BSetBest           uint32
	BwMode             uint32
	AsyncPollTimeoutMs uint32
}

NvlinkSetBwModeAsyncV1 describes the parameters involved to setting Nvlink RBM mode asynchronously.

This structure holds the parameters needed to correctly set a Device's Nvlink Reduced Bandwidth Mode asynchronously. Polling for GpuFabricStateCompleted from Device.GpuFabricInfoV is needed to check if the setting was applied.

type NvlinkSetBwModeV1

type NvlinkSetBwModeV1 = NvlinkSetBwMode

NvlinkSetBwModeV1 is an alias for NvlinkSetBwMode.

type NvlinkSetNvleReadyV1

type NvlinkSetNvleReadyV1 struct {
	BNvleReady uint8
}

NvlinkSetNvleReadyV1 is a structure for the NVLink NVLE ready state.

type NvlinkSetupNvleEncryptionKeyV1

type NvlinkSetupNvleEncryptionKeyV1 struct {
	NvleKey                  [32]uint8
	LocalGpuAlid             uint32
	RemoteGpuAlid            uint32
	LocalGpuNvlePrivateInfo  NvlinkNvlePrivateInfoV1
	RemoteGpuNvlePrivateInfo NvlinkNvlePrivateInfoV1
}

NvlinkSetupNvleEncryptionKeyV1 is a structure for NVLink NVLE encryption key setup.

type NvlinkSupportedBwModes

type NvlinkSupportedBwModes struct {
	Version      uint32
	BwModes      [23]uint8
	TotalBwModes uint8
}

NvlinkSupportedBwModes represents nvmlNvlinkSupportedBwModes_v1_t.

type NvlinkSupportedBwModesV1

type NvlinkSupportedBwModesV1 = NvlinkSupportedBwModes

NvlinkSupportedBwModesV1 is an alias for NvlinkSupportedBwModes.

type NvlinkTelemetrySampleType

type NvlinkTelemetrySampleType int32

NvlinkTelemetrySampleType represents per-link NVLink telemetry sample types.

const (
	NvlinkTelemetrySampleTypeThroughputRawTx NvlinkTelemetrySampleType = 0 // Raw TX flit counter for a single link
	NvlinkTelemetrySampleTypeThroughputRawRx NvlinkTelemetrySampleType = 1 // Raw RX flit counter for a single link
	NvlinkTelemetrySampleTypeCount           NvlinkTelemetrySampleType = 2 // Number of valid sample types
)

func (NvlinkTelemetrySampleType) String

func (e NvlinkTelemetrySampleType) String() string

String returns the constant name, or a numeric representation for unknown values.

type NvlinkTelemetrySampleV1

type NvlinkTelemetrySampleV1 struct {
	LinkId      uint32
	SampleType  uint32
	SampleCount uint32
	Samples     uintptr
	NvmlReturn  Result
}

NvlinkTelemetrySampleV1 represents one (link, metric) telemetry request / response slot.

type NvlinkTelemetrySamplesV1

type NvlinkTelemetrySamplesV1 struct {
	TelemetryCount   uint32
	TelemetrySamples uintptr
}

NvlinkTelemetrySamplesV1 represents batched NVLink telemetry request.

type NvlinkVersion

type NvlinkVersion int32

NvlinkVersion represents nvlink Version.

const (
	NvlinkVersionInvalid NvlinkVersion = 0 // NVLink version is invalid
	NvlinkVersion10      NvlinkVersion = 1 // NVLink Version 1.0
	NvlinkVersion20      NvlinkVersion = 2 // NVLink Version 2.0
	NvlinkVersion22      NvlinkVersion = 3 // NVLink Version 2.2
	NvlinkVersion30      NvlinkVersion = 4 // NVLink Version 3.0
	NvlinkVersion31      NvlinkVersion = 5 // NVLink Version 3.1
	NvlinkVersion40      NvlinkVersion = 6 // NVLink Version 4.0
	NvlinkVersion50      NvlinkVersion = 7 // NVLink Version 5.0
	NvlinkVersion60      NvlinkVersion = 8 // NVLink Version 6.0
)

func (NvlinkVersion) String

func (e NvlinkVersion) String() string

String returns the constant name, or a numeric representation for unknown values.

type ObservedMetrics

type ObservedMetrics struct {
	InitialDramclkEst [3]PwrModelMetricsDlppm1xDramclkEstimates
	BValid            uint8
	CoreRail          CoreRailMetrics
	FbRail            RailMetrics
	TgpPwrTuple       PmgrPwrTuple
	PerfMetrics       PwrModelMetricsDlppm1xPerf
}

ObservedMetrics represents observed metrics from the power model, including initial DRAMCLK estimates and current measurements.

type OperationalEventSeverity

type OperationalEventSeverity int32

OperationalEventSeverity represents severity values used by Operational Events.

These values are used both for event reporting in EventSetWaitV3 and for subscription filtering in GpuOperationalEventConfigV1. Higher numeric values represent more selective severities. OperationalEventSeverityAll disables severity filtering when used as a subscription threshold. Event data may contain newer severity values that are not named in this header; clients should handle unrecognized numeric values.

const (
	OperationalEventSeverityAll           OperationalEventSeverity = 0  // Matches all Operational Event severities.
	OperationalEventSeverityInformational OperationalEventSeverity = 10 // Informational event.
	OperationalEventSeverityCorrected     OperationalEventSeverity = 20 // Corrected error event.
	OperationalEventSeverityRecoverable   OperationalEventSeverity = 30 // Recoverable error event.
	OperationalEventSeverityFatal         OperationalEventSeverity = 40 // Fatal error event.
)

func (OperationalEventSeverity) String

func (e OperationalEventSeverity) String() string

String returns the constant name, or a numeric representation for unknown values.

type PRMCounterId

type PRMCounterId int32

PRMCounterId represents PRM Counter IDs.

const (
	PrmCounterIdNone                                                       PRMCounterId = 0    // Sentinel
	PrmCounterIdPpcntPhysicalLayerCtrsLinkDownEvents                       PRMCounterId = 1    // PPCNT group 0x12, link_down_events
	PrmCounterIdPpcntPhysicalLayerCtrsSuccessfulRecoveryEvents             PRMCounterId = 2    // PPCNT group 0x12, successful_recovery_events
	PrmCounterIdPpcntRecoveryCtrsTotalSuccessfulRecoveryEvents             PRMCounterId = 101  // PPCNT group 0x1A, total_successful_recovery_events
	PrmCounterIdPpcntRecoveryCtrsTimeSinceLastRecovery                     PRMCounterId = 102  // PPCNT group 0x1A, time_since_last_recovery
	PrmCounterIdPpcntRecoveryCtrsTimeBetweenLastTwoRecoveries              PRMCounterId = 103  // PPCNT group 0x1A, time_between_last_two_recoveries
	PrmCounterIdPpcntRecoveryCtrsTimeInLastHostSerdesFeqRecovery           PRMCounterId = 104  // PPCNT group 0x1A, time_in_last_host_serdes_feq_recovery
	PrmCounterIdPpcntRecoveryCtrsTotalTimeInHostSerdesFeqRecovery          PRMCounterId = 105  // PPCNT group 0x1A, total_time_in_host_serdes_feq_recovery
	PrmCounterIdPpcntRecoveryCtrsTotalHostSerdesFeqRecoveryCount           PRMCounterId = 106  // PPCNT group 0x1A, total_host_serdes_feq_recovery_count
	PrmCounterIdPpcntRecoveryCtrsTotalHostSerdesFeqSuccessfulRecoveryCount PRMCounterId = 107  // PPCNT group 0x1A, total_host_serdes_feq_successful_recovery_count
	PrmCounterIdPpcntRecoveryCtrsLastHostSerdesFeqAttemptsCount            PRMCounterId = 108  // PPCNT group 0x1A, last_host_serdes_feq_attempts_count
	PrmCounterIdPpcntRecoveryCtrsLastSuccessfulRecoveryStepAttempts        PRMCounterId = 109  // PPCNT group 0x1A, last_successful_recovery_step_attempts
	PrmCounterIdPpcntRecoveryCtrsLastSuccessfulRecoveryTime                PRMCounterId = 110  // PPCNT group 0x1A, last_successful_recovery_time
	PrmCounterIdPpcntRecoveryCtrsTotalSuccessfulRecoveryTime               PRMCounterId = 111  // PPCNT group 0x1A, total_successful_recovery_time
	PrmCounterIdPpcntPortcountersPortXmitWait                              PRMCounterId = 201  // PPCNT group 0x20, port_xmit_wait
	PrmCounterIdPpcntPlrRcvCodes                                           PRMCounterId = 301  // PPCNT group 0x22, plr_rcv_codes
	PrmCounterIdPpcntPlrRcvCodeErr                                         PRMCounterId = 302  // PPCNT group 0x22, plr_rcv_code_err
	PrmCounterIdPpcntPlrRcvUncorrectableCode                               PRMCounterId = 303  // PPCNT group 0x22, plr_rcv_uncorrectable_code
	PrmCounterIdPpcntPlrXmitCodes                                          PRMCounterId = 304  // PPCNT group 0x22, plr_xmit_codes
	PrmCounterIdPpcntPlrXmitRetryCodes                                     PRMCounterId = 305  // PPCNT group 0x22, plr_xmit_retry_codes
	PrmCounterIdPpcntPlrXmitRetryEvents                                    PRMCounterId = 306  // PPCNT group 0x22, plr_xmit_retry_events
	PrmCounterIdPpcntPlrSyncEvents                                         PRMCounterId = 307  // PPCNT group 0x22, plr_sync_events
	PrmCounterIdPprmOperRecovery                                           PRMCounterId = 1001 // PPRM, oper_recovery
)

func (PRMCounterId) String

func (e PRMCounterId) String() string

String returns the constant name, or a numeric representation for unknown values.

type PRMCounterInputV1

type PRMCounterInputV1 struct {
	LocalPort uint32
}

PRMCounterInputV1 represents PRM counter input values.

type PRMCounterListV1

type PRMCounterListV1 struct {
	NumCounters uint32
	Counters    uintptr
}

PRMCounterListV1 represents PRM Counter List Structure v1.

type PRMCounterV1

type PRMCounterV1 struct {
	CounterId    uint32
	InData       PRMCounterInputV1
	CounterValue PRMCounterValueV1
}

PRMCounterV1 represents PRM Counter Structure v1.

type PRMCounterValueV1

type PRMCounterValueV1 struct {
	Status      Result
	OutputType  ValueType
	OutputValue Value
}

PRMCounterValueV1 represents PRM Counter Value Structure.

type PRMTLVV1

type PRMTLVV1 struct {
	DataSize       uint32
	Status         uint32
	AnonymousUnion [496]byte
}

PRMTLVV1 represents main PRM input structure.

func (*PRMTLVV1) InData

func (p *PRMTLVV1) InData() *[496]uint8

InData returns a pointer to the inData member of nvmlPRMTLV_v1_t, which shares its storage with every other member of the union.

func (*PRMTLVV1) OutData

func (p *PRMTLVV1) OutData() *[496]uint8

OutData returns a pointer to the outData member of nvmlPRMTLV_v1_t, which shares its storage with every other member of the union.

type PSUInfo

type PSUInfo struct {
	State   [256]byte
	Current uint32
	Voltage uint32
	Power   uint32
}

PSUInfo represents power usage information for an S-class unit.

The power supply state is a human readable string that equals "Normal" or contains a combination of "Abnormal" plus one or more of the following: - High voltage - Fan failure - Heatsink temperature - Current limit - Voltage below UV alarm threshold - Low-voltage - SI2C remote off command - MOD_DISABLE input - Short pin transition.

type PageRetirementCause

type PageRetirementCause int32

PageRetirementCause represents causes for page retirement.

const (
	PageRetirementCauseMultipleSingleBitEccErrors PageRetirementCause = 0 // Page was retired due to multiple single bit ECC error
	PageRetirementCauseDoubleBitEccError          PageRetirementCause = 1 // Page was retired due to double bit ECC error
	PageRetirementCauseCount                      PageRetirementCause = 2
)

func (PageRetirementCause) String

func (e PageRetirementCause) String() string

String returns the constant name, or a numeric representation for unknown values.

type PciInfo

type PciInfo struct {
	BusIdLegacy    [16]byte
	Domain         uint32
	Bus            uint32
	Device         uint32
	PciDeviceId    uint32
	PciSubSystemId uint32
	BusId          [32]byte
}

PciInfo represents PCI information about a GPU device.

type PciInfoExt

type PciInfoExt struct {
	Version        uint32
	Domain         uint32
	Bus            uint32
	Device         uint32
	PciDeviceId    uint32
	PciSubSystemId uint32
	BaseClass      uint32
	SubClass       uint32
	BusId          [32]byte
}

PciInfoExt represents PCI information about a GPU device.

type PciInfoExtV1

type PciInfoExtV1 = PciInfoExt

PciInfoExtV1 is an alias for PciInfoExt.

type PcieLinkState

type PcieLinkState int32

PcieLinkState represents parent bridge PCIe link state requested by DeviceRemoveGpu.

const (
	PcieLinkKeep     PcieLinkState = 0
	PcieLinkShutDown PcieLinkState = 1
)

func (PcieLinkState) String

func (e PcieLinkState) String() string

String returns the constant name, or a numeric representation for unknown values.

type PcieUtilCounter

type PcieUtilCounter int32

PcieUtilCounter represents the queryable PCIe utilization counters.

const (
	PcieUtilTxBytes PcieUtilCounter = 0 // 1KB granularity
	PcieUtilRxBytes PcieUtilCounter = 1 // 1KB granularity
	PcieUtilCount   PcieUtilCounter = 2
)

func (PcieUtilCounter) String

func (e PcieUtilCounter) String() string

String returns the constant name, or a numeric representation for unknown values.

type Pdi

type Pdi struct {
	Version uint32
	Value   uint64
}

Pdi represents the NVML PDI information.

type PdiV1

type PdiV1 = Pdi

PdiV1 is an alias for Pdi.

type PerfMetricControllerSample

type PerfMetricControllerSample struct {
	ControllerType uint32
	Data           [276]uint64
}

PerfMetricControllerSample represents performance metrics sample from a controller, which can be either DLPPC 2x or PFPP 1x.

type PerfMetricsDlppc2xSample

type PerfMetricsDlppc2xSample struct {
	ObservedMetrics ObservedMetrics
}

PerfMetricsDlppc2xSample represents performance metrics sample for DLPPC 2x controller.

type PerfMetricsPfpp1xSample

type PerfMetricsPfpp1xSample struct {
	EstimatedMetrics PwrModelMetricsPfpp1x
}

PerfMetricsPfpp1xSample represents performance metrics sample for PFPP 1x controller.

type PerfMetricsSample

type PerfMetricsSample struct {
	NumControllerData uint8
	ControllerData    [4]PerfMetricControllerSample
}

PerfMetricsSample represents single performance metrics sample containing data from one or more controllers.

type PerfMetricsSamplesV1

type PerfMetricsSamplesV1 struct {
	NumSamples uint32
	Samples    [13]PerfMetricsSample
}

PerfMetricsSamplesV1 represents collection of performance metrics samples (version 1).

This structure contains multiple samples for performance monitoring and profiling.

type PerfPolicyType

type PerfPolicyType int32

PerfPolicyType represents type of perf policy for which violation times can be queried.

const (
	PerfPolicyPower           PerfPolicyType = 0  // How long did power violations cause the GPU to be below application clocks
	PerfPolicyThermal         PerfPolicyType = 1  // How long did thermal violations cause the GPU to be below application clocks
	PerfPolicySyncBoost       PerfPolicyType = 2  // How long did sync boost cause the GPU to be below application clocks
	PerfPolicyBoardLimit      PerfPolicyType = 3  // How long did the board limit cause the GPU to be below application clocks
	PerfPolicyLowUtilization  PerfPolicyType = 4  // How long did low utilization cause the GPU to be below application clocks
	PerfPolicyReliability     PerfPolicyType = 5  // How long did the board reliability limit cause the GPU to be below application clocks
	PerfPolicyTotalAppClocks  PerfPolicyType = 10 // Total time the GPU was held below application clocks by any limiter (0 - 5 above)
	PerfPolicyTotalBaseClocks PerfPolicyType = 11 // Total time the GPU was held below base clocks
	PerfPolicyCount           PerfPolicyType = 12
)

func (PerfPolicyType) String

func (e PerfPolicyType) String() string

String returns the constant name, or a numeric representation for unknown values.

type PlatformInfo

type PlatformInfo struct {
	Version             uint32
	IbGuid              [16]uint8
	ChassisSerialNumber [16]uint8
	SlotNumber          uint8
	TrayIndex           uint8
	HostId              uint8
	PeerType            uint8
	ModuleId            uint8
}

PlatformInfo stores platform information (v2).

type PlatformInfoV1

type PlatformInfoV1 struct {
	Version                   uint32
	IbGuid                    [16]uint8
	RackGuid                  [16]uint8
	ChassisPhysicalSlotNumber uint8
	ComputeSlotIndex          uint8
	NodeIndex                 uint8
	PeerType                  uint8
	ModuleId                  uint8
}

PlatformInfoV1 stores platform information.

Note: NVIDIA plans to deprecate this type in a future release. Use PlatformInfo instead.

type PlatformInfoV2

type PlatformInfoV2 = PlatformInfo

PlatformInfoV2 is an alias for PlatformInfo.

type PmgrPwrTuple

type PmgrPwrTuple struct {
	PwrmW uint32
}

PmgrPwrTuple represents power tuple containing power consumption in milliwatts.

type PowerProfileOperation

type PowerProfileOperation int32

PowerProfileOperation is an enum for operation to perform on the requested profiles.

const (
	PowerProfileOperationClear           PowerProfileOperation = 0 // Remove the requested profiles from the existing list of requested profiles
	PowerProfileOperationSet             PowerProfileOperation = 1 // Add the requested profiles to the existing list of requested profiles
	PowerProfileOperationSetAndOverwrite PowerProfileOperation = 2 // Overwrite the existing list of requested profiles with just the requested profiles
)

func (PowerProfileOperation) String

func (e PowerProfileOperation) String() string

String returns the constant name, or a numeric representation for unknown values.

type PowerProfileType

type PowerProfileType int32

PowerProfileType represents workload power profile identifiers.

const (
	PowerProfileMaxP                      PowerProfileType = 0
	PowerProfileMaxQ                      PowerProfileType = 1
	PowerProfileCompute                   PowerProfileType = 2
	PowerProfileMemoryBound               PowerProfileType = 3
	PowerProfileNetwork                   PowerProfileType = 4
	PowerProfileBalanced                  PowerProfileType = 5
	PowerProfileLlmInference              PowerProfileType = 6
	PowerProfileLlmTraining               PowerProfileType = 7
	PowerProfileRbm                       PowerProfileType = 8
	PowerProfileDcpcie                    PowerProfileType = 9
	PowerProfileHmmaSparse                PowerProfileType = 10
	PowerProfileHmmaDense                 PowerProfileType = 11
	PowerProfileSyncBalanced              PowerProfileType = 12
	PowerProfileHpc                       PowerProfileType = 13
	PowerProfileMig                       PowerProfileType = 14
	PowerProfileMaxQ1                     PowerProfileType = 15
	PowerProfileNetworkBound              PowerProfileType = 16
	PowerProfileHighThroughputInference   PowerProfileType = 17
	PowerProfileMediumThroughputInference PowerProfileType = 18
	PowerProfileLowLatencyInference       PowerProfileType = 19
	PowerProfileTraining                  PowerProfileType = 20
	PowerProfileInference                 PowerProfileType = 21
	PowerProfileMaxQ2                     PowerProfileType = 22
	PowerProfileMaxQ3                     PowerProfileType = 23
	PowerProfileLowPriorityBackground     PowerProfileType = 24
)

func (PowerProfileType) String

func (e PowerProfileType) String() string

String returns the constant name, or a numeric representation for unknown values.

type PowerScopeType

type PowerScopeType uint8

PowerScopeType represents device Scope - This is useful to retrieve the telemetry at GPU and module (e.g. GPU + CPU) level.

const (
	PowerScopeGpu     PowerScopeType = 0 // Targets only GPU
	PowerScopeModule  PowerScopeType = 1 // Targets the whole module
	PowerScopeMemory  PowerScopeType = 2 // Targets the GPU Memory
	PowerScopeGpuBase PowerScopeType = 3 // Targets base GPU power
	PowerScopeCount   PowerScopeType = 4 // Maximum number of power scopes
)

func (PowerScopeType) String

func (e PowerScopeType) String() string

String returns the constant name, or a numeric representation for unknown values.

type PowerSmoothingProfile

type PowerSmoothingProfile struct {
	Version   uint32
	ProfileId uint32
	ParamId   uint32
	Value     float64
}

PowerSmoothingProfile represents power Smoothing Structure for Profile information.

type PowerSmoothingProfileV1

type PowerSmoothingProfileV1 = PowerSmoothingProfile

PowerSmoothingProfileV1 is an alias for PowerSmoothingProfile.

type PowerSmoothingState

type PowerSmoothingState struct {
	Version uint32
	State   EnableState
}

PowerSmoothingState represents power Smoothing Structure for Feature Enablement.

type PowerSmoothingStateV1

type PowerSmoothingStateV1 = PowerSmoothingState

PowerSmoothingStateV1 is an alias for PowerSmoothingState.

type PowerSource

type PowerSource uint32

PowerSource represents device Power Source.

const (
	PowerSourceAc         PowerSource = 0x00000000 // AC power source.
	PowerSourceBattery    PowerSource = 0x00000001 // Battery power source.
	PowerSourceUndersized PowerSource = 0x00000002 // Undersized power source.
)

func (PowerSource) String

func (e PowerSource) String() string

String returns the constant name, or a numeric representation for unknown values.

type PowerValueV2

type PowerValueV2 struct {
	Version      uint32
	PowerScope   PowerScopeType
	PowerValueMw uint32
}

PowerValueV2 contains the power management limit.

type ProcessDetailList

type ProcessDetailList struct {
	Version             uint32
	Mode                uint32
	NumProcArrayEntries uint32
	ProcArray           uintptr
}

ProcessDetailList represents information about all running processes on the GPU for the given mode.

type ProcessDetailListV1

type ProcessDetailListV1 = ProcessDetailList

ProcessDetailListV1 is an alias for ProcessDetailList.

type ProcessDetailV1

type ProcessDetailV1 struct {
	Pid                      uint32
	UsedGpuMemory            uint64
	GpuInstanceId            uint32
	ComputeInstanceId        uint32
	UsedGpuCcProtectedMemory uint64
}

ProcessDetailV1 represents information about running process on the GPU with protected memory.

type ProcessInfo

type ProcessInfo struct {
	Pid               uint32
	UsedGpuMemory     uint64
	GpuInstanceId     uint32
	ComputeInstanceId uint32
}

ProcessInfo represents information about running compute processes on the GPU.

type ProcessInfoV1

type ProcessInfoV1 struct {
	Pid           uint32
	UsedGpuMemory uint64
}

ProcessInfoV1 represents information about running compute processes on the GPU, legacy version for older versions of the API.

type ProcessMode

type ProcessMode int32

ProcessMode represents process mode.

const (
	ProcessModeCompute  ProcessMode = 0 // Processes with a compute context
	ProcessModeGraphics ProcessMode = 1 // Processes with a graphics context
	ProcessModeMps      ProcessMode = 2 // Processes with a MPS (Multi-Process Service) compute context
	ProcessModeAll      ProcessMode = 3 // All processes running on the GPU (compute, graphics, MPS, and other types)
)

func (ProcessMode) String

func (e ProcessMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type ProcessUtilizationInfoV1

type ProcessUtilizationInfoV1 struct {
	TimeStamp uint64
	Pid       uint32
	SmUtil    uint32
	MemUtil   uint32
	EncUtil   uint32
	DecUtil   uint32
	JpgUtil   uint32
	OfaUtil   uint32
}

ProcessUtilizationInfoV1 stores utilization value and process Id -- version 1.

type ProcessUtilizationSample

type ProcessUtilizationSample struct {
	Pid       uint32
	TimeStamp uint64
	SmUtil    uint32
	MemUtil   uint32
	EncUtil   uint32
	DecUtil   uint32
}

ProcessUtilizationSample stores utilization value and process Id.

type ProcessesUtilizationInfo

type ProcessesUtilizationInfo struct {
	Version             uint32
	ProcessSamplesCount uint32
	LastSeenTimeStamp   uint64
	ProcUtilArray       uintptr
}

ProcessesUtilizationInfo stores utilization and process ID for each running process -- version 1.

type ProcessesUtilizationInfoV1

type ProcessesUtilizationInfoV1 = ProcessesUtilizationInfo

ProcessesUtilizationInfoV1 is an alias for ProcessesUtilizationInfo.

type Pstates

type Pstates int32

Pstates represents allowed PStates.

const (
	Pstate0       Pstates = 0  // Performance state 0 -- Maximum Performance
	Pstate1       Pstates = 1  // Performance state 1
	Pstate2       Pstates = 2  // Performance state 2
	Pstate3       Pstates = 3  // Performance state 3
	Pstate4       Pstates = 4  // Performance state 4
	Pstate5       Pstates = 5  // Performance state 5
	Pstate6       Pstates = 6  // Performance state 6
	Pstate7       Pstates = 7  // Performance state 7
	Pstate8       Pstates = 8  // Performance state 8
	Pstate9       Pstates = 9  // Performance state 9
	Pstate10      Pstates = 10 // Performance state 10
	Pstate11      Pstates = 11 // Performance state 11
	Pstate12      Pstates = 12 // Performance state 12
	Pstate13      Pstates = 13 // Performance state 13
	Pstate14      Pstates = 14 // Performance state 14
	Pstate15      Pstates = 15 // Performance state 15 -- Minimum Performance
	PstateUnknown Pstates = 32 // Unknown performance state
)

func (Pstates) String

func (e Pstates) String() string

String returns the constant name, or a numeric representation for unknown values.

type PwrModelMetricsDlppm1x

type PwrModelMetricsDlppm1x struct {
	BValid      uint8
	CoreRail    CoreRailMetrics
	FbRail      RailMetrics
	TgpPwrTuple PmgrPwrTuple
	PerfMetrics PwrModelMetricsDlppm1xPerf
}

PwrModelMetricsDlppm1x represents complete power model metrics for DLPPM 1x, including rail metrics and TGP power.

type PwrModelMetricsDlppm1xDramclkEstimates

type PwrModelMetricsDlppm1xDramclkEstimates struct {
	EstimatedMetrics    [8]PwrModelMetricsDlppm1x
	NumEstimatedMetrics uint8
}

PwrModelMetricsDlppm1xDramclkEstimates represents DRAMCLK estimates containing multiple estimated metrics for different DRAMCLK frequencies.

type PwrModelMetricsDlppm1xPerf

type PwrModelMetricsDlppm1xPerf struct {
	Perfms uint32
}

PwrModelMetricsDlppm1xPerf represents performance metrics for DLPPM 1x power model.

type PwrModelMetricsPfpp1x

type PwrModelMetricsPfpp1x struct {
	NumVfPoints         uint8
	EstimatedMetrics    [32]PwrModelMetricsSamplePfpp1x
	BValid              uint8
	MaxPerfPerWattPoint PwrModelOperatingPointPfpp1x
	FmaxAtVmaxPoint     PwrModelOperatingPointPfpp1x
	TgpHeadroommW       uint32
}

PwrModelMetricsPfpp1x represents complete power model metrics for PFPP 1x, including estimated metrics and key operating points.

type PwrModelMetricsSamplePfpp1x

type PwrModelMetricsSamplePfpp1x struct {
	FreqkHz     [16]uint32
	EstTgpPwrmW uint32
}

PwrModelMetricsSamplePfpp1x represents power model metrics sample for PFPP 1x, containing frequency inputs and estimated TGP.

type PwrModelOperatingPointPfpp1x

type PwrModelOperatingPointPfpp1x struct {
	FreqkHz uint32
	PwrmW   uint32
}

PwrModelOperatingPointPfpp1x represents operating point for PFPP 1x power model, defining a frequency-power pair.

type RailMetrics

type RailMetrics struct {
	FreqkHz uint32
	UtilPct uint64
}

RailMetrics represents metrics for a single power rail, including frequency and utilization.

type RemappedRowsInfoV2

type RemappedRowsInfoV2 struct {
	CorrActiveRemaps   uint32
	CorrInactiveRemaps uint32
	UncActiveRemaps    uint32
	UncInactiveRemaps  uint32
	BPending           uint32
	BFailureOccurred   uint32
}

RemappedRowsInfoV2 represents nvmlRemappedRowsInfo_v2_t.

type RepairStatus

type RepairStatus struct {
	Version               uint32
	BChannelRepairPending uint32
	BTpcRepairPending     uint32
}

RepairStatus represents the NVML repair status.

type RepairStatusV1

type RepairStatusV1 = RepairStatus

RepairStatusV1 is an alias for RepairStatus.

type RestrictedAPI

type RestrictedAPI int32

RestrictedAPI represents API types that allow changes to default permission restrictions.

const (
	// RestrictedApiSetApplicationClocks: APIs that change application clocks, see [Device.SetApplicationsClocks]
	//
	// Deprecated: Deprecated by NVIDIA. Keeping definition for backward compatibility.
	RestrictedApiSetApplicationClocks RestrictedAPI = 0
	RestrictedApiSetAutoBoostedClocks RestrictedAPI = 1 // APIs that enable/disable Auto Boosted clocks
	RestrictedApiCount                RestrictedAPI = 2
)

func (RestrictedAPI) String

func (e RestrictedAPI) String() string

String returns the constant name, or a numeric representation for unknown values.

type Result

type Result int32

Result represents a nvidia-ml API error code (nvmlReturn_t).

When the library is loaded, Result.Error returns rich messages from ErrorString. When the library is not loaded, it falls back to the numeric error code and Go-defined name.

const (
	Success            Result = 0 // The operation was successful
	ErrUninitialized   Result = 1 // NVML was not first initialized with [Init]
	ErrInvalidArgument Result = 2 // A supplied argument is invalid
	ErrNotSupported    Result = 3 // The requested operation is not available on target device
	ErrNoPermission    Result = 4 // The current user does not have permission for operation
	//
	// Deprecated: Deprecated by NVIDIA. Multiple initializations are now allowed through ref counting.
	ErrAlreadyInitialized      Result = 5
	ErrNotFound                Result = 6   // A query to find an object was unsuccessful
	ErrInsufficientSize        Result = 7   // An input argument is not large enough
	ErrInsufficientPower       Result = 8   // A device's external power cables are not properly attached
	ErrDriverNotLoaded         Result = 9   // NVIDIA driver is not loaded
	ErrTimeout                 Result = 10  // User provided timeout passed
	ErrIrqIssue                Result = 11  // NVIDIA Kernel detected an interrupt issue with a GPU
	ErrLibraryNotFound         Result = 12  // NVML Shared Library couldn't be found or loaded
	ErrFunctionNotFound        Result = 13  // Local version of NVML doesn't implement this function
	ErrCorruptedInforom        Result = 14  // infoROM is corrupted
	ErrGpuIsLost               Result = 15  // The GPU has fallen off the bus or has otherwise become inaccessible
	ErrResetRequired           Result = 16  // The GPU requires a reset before it can be used again
	ErrOperatingSystem         Result = 17  // A generic operating system error occurred
	ErrLibRmVersionMismatch    Result = 18  // RM detects a driver/library version mismatch
	ErrInUse                   Result = 19  // An operation cannot be performed because the GPU is currently in use
	ErrMemory                  Result = 20  // Insufficient memory
	ErrNoData                  Result = 21  // No data
	ErrVgpuEccNotSupported     Result = 22  // The requested vgpu operation is not available on target device, becasue ECC is enabled
	ErrInsufficientResources   Result = 23  // Ran out of critical resources, other than memory
	ErrFreqNotSupported        Result = 24  // Ran out of critical resources, other than memory
	ErrArgumentVersionMismatch Result = 25  // The provided version is invalid/unsupported
	ErrDeprecated              Result = 26  // The requested functionality has been deprecated
	ErrNotReady                Result = 27  // The system is not ready for the request
	ErrGpuNotFound             Result = 28  // No GPUs were found
	ErrInvalidState            Result = 29  // Resource not in correct state to perform requested operation
	ErrResetTypeNotSupported   Result = 30  // Reset not supported for given device/parameters
	ErrUnknown                 Result = 999 // An internal driver error occurred
)

nvidia-ml error codes from nvml.h.

func (Result) Code

func (r Result) Code() int32

Code returns the underlying result code for programmatic error handling.

func (Result) Error

func (r Result) Error() string

Error implements the error interface. When the library is loaded, it returns the error description from ErrorString. Otherwise it returns a fallback string with the Go constant name and numeric code.

func (Result) String

func (r Result) String() string

String returns the Go constant name of the result.

type RowRemapperHistogramValues

type RowRemapperHistogramValues struct {
	Max     uint32
	High    uint32
	Partial uint32
	Low     uint32
	None    uint32
}

RowRemapperHistogramValues represents possible values that classify the remap availability for each bank.

The max field will contain the number of banks that have maximum remap availability (all reserved rows are available). None means that there are no reserved rows available.

type RusdSettingsV1

type RusdSettingsV1 struct {
	Version  uint32
	PollMask uint64
}

RusdSettingsV1 stores RUSD polling configuration for a GPU.

type Sample

type Sample struct {
	TimeStamp   uint64
	SampleValue Value
}

Sample represents information for Sample.

type SamplingType

type SamplingType int32

SamplingType represents type of Sampling Event.

const (
	TotalPowerSamples        SamplingType = 0 // To represent total power drawn by GPU
	GpuUtilizationSamples    SamplingType = 1 // To represent percent of time during which one or more kernels was executing on the GPU
	MemoryUtilizationSamples SamplingType = 2 // To represent percent of time during which global (device) memory was being read or written
	EncUtilizationSamples    SamplingType = 3 // To represent percent of time during which NVENC remains busy
	DecUtilizationSamples    SamplingType = 4 // To represent percent of time during which NVDEC remains busy
	ProcessorClkSamples      SamplingType = 5 // To represent processor clock samples
	MemoryClkSamples         SamplingType = 6 // To represent memory clock samples
	ModulePowerSamples       SamplingType = 7 // To represent module power samples for total module starting Grace Hopper
	JpgUtilizationSamples    SamplingType = 8 // To represent percent of time during which NVJPG remains busy
	OfaUtilizationSamples    SamplingType = 9 // To represent percent of time during which NVOFA remains busy
	SamplingtypeCount        SamplingType = 10
)

func (SamplingType) String

func (e SamplingType) String() string

String returns the constant name, or a numeric representation for unknown values.

type SetMemoryLimitsV1

type SetMemoryLimitsV1 struct {
	NameSpace uintptr
	SoftLimit uint64
	HardLimit uint64
}

SetMemoryLimitsV1 describes the memory limits that can be set for the device.

This structure holds the necessary information that can be used to set the soft and hard memory limits of a device. The softLimit is the amount of memory that is guaranteed before allocations may fail due to memory pressure. The hardLimit is the maximum amount of memory that can be allocated. This should be cross-referenced with Device.MemoryInfoV2 while in that cgroup to see how much memory is actually available to allocate for the device. To clear the limits, set softLimit to 0, and hardLimit to DeviceMemoryLimitMax. Removing the cgroup will also clear any limits.

type SymbolError

type SymbolError struct {
	Symbol string
	Err    error
}

SymbolError reports that a symbol is not callable.

Err distinguishes the two ways that happens. A nil Err means the loaded library does not export the symbol, which is what an installation older than the symbol looks like. A non-nil Err means the library does export it and the binding itself failed; the library is not at fault.

func (*SymbolError) Error

func (e *SymbolError) Error() string

Error reports the uncallable library symbol and, when the symbol was present but could not be bound, why.

func (*SymbolError) Unwrap

func (e *SymbolError) Unwrap() error

Unwrap returns the reason the symbol could not be bound, or nil when the loaded library does not export it.

type SystemConfComputeSettings

type SystemConfComputeSettings struct {
	Version      uint32
	Environment  uint32
	CcFeature    uint32
	DevToolsMode uint32
	MultiGpuMode uint32
}

SystemConfComputeSettings represents confidential Compute System settings.

type SystemConfComputeSettingsV1

type SystemConfComputeSettingsV1 = SystemConfComputeSettings

SystemConfComputeSettingsV1 is an alias for SystemConfComputeSettings.

type SystemConfComputeSettingsV2

type SystemConfComputeSettingsV2 struct {
	Version      uint32
	Environment  uint32
	CcFeature    uint32
	DevToolsMode uint32
	MultiGpuMode uint32
	TdispState   uint32
}

SystemConfComputeSettingsV2 represents confidential Compute System settings, version 2.

Adds tdispState, the TDISP state of the GPUs, reported as a single value so that callers do not have to combine flags.

type SystemDriverBranchInfo

type SystemDriverBranchInfo struct {
	Version uint32
	Branch  [80]byte
}

SystemDriverBranchInfo stores driver branch information.

type SystemDriverBranchInfoV1

type SystemDriverBranchInfoV1 = SystemDriverBranchInfo

SystemDriverBranchInfoV1 is an alias for SystemDriverBranchInfo.

type SystemEventDataV1

type SystemEventDataV1 struct {
	EventType uint64
	GpuId     uint32
}

SystemEventDataV1 represents SystemEventDataV1.

type SystemEventSet

type SystemEventSet uintptr

SystemEventSet is an opaque handle for nvmlSystemEventSet_t.

type SystemEventSetCreateRequest

type SystemEventSetCreateRequest struct {
	Version uint32
	Set     SystemEventSet
}

SystemEventSetCreateRequest represents nvmlSystemEventSetCreateRequest.

type SystemEventSetCreateRequestV1

type SystemEventSetCreateRequestV1 = SystemEventSetCreateRequest

SystemEventSetCreateRequestV1 is an alias for SystemEventSetCreateRequest.

type SystemEventSetFreeRequest

type SystemEventSetFreeRequest struct {
	Version uint32
	Set     SystemEventSet
}

SystemEventSetFreeRequest represents nvmlSystemEventSetFreeRequest.

type SystemEventSetFreeRequestV1

type SystemEventSetFreeRequestV1 = SystemEventSetFreeRequest

SystemEventSetFreeRequestV1 is an alias for SystemEventSetFreeRequest.

type SystemEventSetWaitRequest

type SystemEventSetWaitRequest struct {
	Version   uint32
	Timeoutms uint32
	Set       SystemEventSet
	Data      uintptr
	DataSize  uint32
	NumEvent  uint32
}

SystemEventSetWaitRequest represents SystemEventSetWait.

type SystemEventSetWaitRequestV1

type SystemEventSetWaitRequestV1 = SystemEventSetWaitRequest

SystemEventSetWaitRequestV1 is an alias for SystemEventSetWaitRequest.

type SystemRegisterEventRequest

type SystemRegisterEventRequest struct {
	Version    uint32
	EventTypes uint64
	Set        SystemEventSet
}

SystemRegisterEventRequest represents nvmlSystemRegisterEventRequest.

type SystemRegisterEventRequestV1

type SystemRegisterEventRequestV1 = SystemRegisterEventRequest

SystemRegisterEventRequestV1 is an alias for SystemRegisterEventRequest.

type Temperature

type Temperature struct {
	Version     uint32
	SensorType  TemperatureSensors
	Temperature int32
}

Temperature is a structure used to encapsulate temperature info.

type TemperatureSensors

type TemperatureSensors int32

TemperatureSensors represents temperature sensors.

const (
	TemperatureGpu   TemperatureSensors = 0 // Temperature sensor for the GPU die
	TemperatureCount TemperatureSensors = 2
)

func (TemperatureSensors) String

func (e TemperatureSensors) String() string

String returns the constant name, or a numeric representation for unknown values.

type TemperatureThresholds

type TemperatureThresholds int32

TemperatureThresholds represents temperature thresholds.

const (
	TemperatureThresholdShutdown     TemperatureThresholds = 0 // Temperature at which the GPU will
	TemperatureThresholdSlowdown     TemperatureThresholds = 1 // Temperature at which the GPU will
	TemperatureThresholdMemMax       TemperatureThresholds = 2 // Memory Temperature at which the GPU will
	TemperatureThresholdGpuMax       TemperatureThresholds = 3 // GPU Temperature at which the GPU
	TemperatureThresholdAcousticMin  TemperatureThresholds = 4 // Minimum GPU Temperature that can be
	TemperatureThresholdAcousticCurr TemperatureThresholds = 5 // Current temperature that is set as
	TemperatureThresholdAcousticMax  TemperatureThresholds = 6 // Maximum GPU temperature that can be
	TemperatureThresholdGpsCurr      TemperatureThresholds = 7 // Current temperature that is set as
	TemperatureThresholdCount        TemperatureThresholds = 8
)

func (TemperatureThresholds) String

func (e TemperatureThresholds) String() string

String returns the constant name, or a numeric representation for unknown values.

type TemperatureV1

type TemperatureV1 = Temperature

TemperatureV1 is an alias for Temperature.

type ThermalController

type ThermalController int32

ThermalController represents the thermal sensor controllers.

const (
	ThermalControllerNone           ThermalController = 0
	ThermalControllerGpuInternal    ThermalController = 1
	ThermalControllerAdm1032        ThermalController = 2
	ThermalControllerAdt7461        ThermalController = 3
	ThermalControllerMax6649        ThermalController = 4
	ThermalControllerMax1617        ThermalController = 5
	ThermalControllerLM99           ThermalController = 6
	ThermalControllerLM89           ThermalController = 7
	ThermalControllerLM64           ThermalController = 8
	ThermalControllerG781           ThermalController = 9
	ThermalControllerAdt7473        ThermalController = 10
	ThermalControllerSbmax6649      ThermalController = 11
	ThermalControllerVbiosevt       ThermalController = 12
	ThermalControllerOs             ThermalController = 13
	ThermalControllerNvsysconCanoas ThermalController = 14
	ThermalControllerNvsysconE551   ThermalController = 15
	ThermalControllerMax6649r       ThermalController = 16
	ThermalControllerAdt7473s       ThermalController = 17
	ThermalControllerUnknown        ThermalController = -1
)

func (ThermalController) String

func (e ThermalController) String() string

String returns the constant name, or a numeric representation for unknown values.

type ThermalTarget

type ThermalTarget int32

ThermalTarget represents the thermal sensor targets.

const (
	ThermalTargetNone        ThermalTarget = 0
	ThermalTargetGpu         ThermalTarget = 1  // GPU core temperature requires NvPhysicalGpuHandle
	ThermalTargetMemory      ThermalTarget = 2  // GPU memory temperature requires NvPhysicalGpuHandle
	ThermalTargetPowerSupply ThermalTarget = 4  // GPU power supply temperature requires NvPhysicalGpuHandle
	ThermalTargetBoard       ThermalTarget = 8  // GPU board ambient temperature requires NvPhysicalGpuHandle
	ThermalTargetVcdBoard    ThermalTarget = 9  // Visual Computing Device Board temperature requires NvVisualComputingDeviceHandle
	ThermalTargetVcdInlet    ThermalTarget = 10 // Visual Computing Device Inlet temperature requires NvVisualComputingDeviceHandle
	ThermalTargetVcdOutlet   ThermalTarget = 11 // Visual Computing Device Outlet temperature requires NvVisualComputingDeviceHandle
	ThermalTargetAll         ThermalTarget = 15
	ThermalTargetUnknown     ThermalTarget = -1
)

func (ThermalTarget) String

func (e ThermalTarget) String() string

String returns the constant name, or a numeric representation for unknown values.

type UUID

type UUID struct {
	Version uint32
	Type    uint32
	Value   UUIDValue
}

UUID represents NVML UUID information.

type UUIDType

type UUIDType int32

UUIDType represents different UUID types.

const (
	UuidTypeNone   UUIDType = 0 // Undefined type
	UuidTypeAscii  UUIDType = 1 // ASCII format type
	UuidTypeBinary UUIDType = 2 // Binary format type
)

func (UUIDType) String

func (e UUIDType) String() string

String returns the constant name, or a numeric representation for unknown values.

type UUIDV1

type UUIDV1 = UUID

UUIDV1 is an alias for UUID.

type UUIDValue

type UUIDValue struct {
	// Data stores the raw bytes of the underlying C union.
	Data [41]byte
}

UUIDValue represents different UUID values.

func (*UUIDValue) Bytes

func (u *UUIDValue) Bytes() *[16]uint8

Bytes returns a pointer to the bytes member of nvmlUUIDValue_t, which shares its storage with every other member of the union.

func (*UUIDValue) Str

func (u *UUIDValue) Str() *[41]byte

Str returns a pointer to the str member of nvmlUUIDValue_t, which shares its storage with every other member of the union.

type Unit

type Unit uintptr

Unit is an opaque handle for nvmlUnit_t.

func NewUnitByIndex

func NewUnitByIndex(index uint32) (Unit, error)

NewUnitByIndex acquires the handle for a particular unit, based on its index.

For S-class products. Valid indices are derived from the unitCount returned by UnitGetCount. For example, if unitCount is 2 the valid indices are 0 and 1, corresponding to UNIT 0 and UNIT 1. The order in which NVML enumerates units has no guarantees of consistency between reboots.

  • index: The index of the target unit, >= 0 and < unitCount
  • unit: Reference in which to return the unit handle

A nil error means unit has been set.

Errors:

Wraps nvmlUnitGetHandleByIndex.

func (Unit) Devices

func (u Unit) Devices(buf []Device) ([]Device, error)

Devices retrieves the set of GPU devices that are attached to the specified unit.

For S-class products. The deviceCount argument is expected to be set to the size of the input devices array.

  • deviceCount: Reference in which to provide the devices array size, and to return the number of attached GPU devices
  • devices: Reference in which to return the references to the attached GPU devices

A nil error means deviceCount and devices have been populated.

Errors:

Wraps nvmlUnitGetDevices.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (Unit) FanSpeedInfo

func (u Unit) FanSpeedInfo(fanSpeeds *UnitFanSpeeds) error

FanSpeedInfo retrieves the fan speed readings for the unit.

For S-class products. See UnitFanSpeeds for details on available fan speed info.

  • fanSpeeds: Reference in which to return the fan speed information

A nil error means fanSpeeds has been populated.

Errors:

Wraps nvmlUnitGetFanSpeedInfo.

func (Unit) Info

func (u Unit) Info() (UnitInfo, error)

Info retrieves the static information associated with a unit.

For S-class products. See UnitInfo for details on available unit info.

  • info: Reference in which to return the unit information

A nil error means info has been populated.

Errors:

Wraps nvmlUnitGetUnitInfo.

func (Unit) LedState

func (u Unit) LedState() (LedState, error)

LedState retrieves the LED state associated with this unit.

For S-class products. See LedState for details on allowed states.

See also: Unit.SetLedState

  • state: Reference in which to return the current LED state

A nil error means state has been set.

Errors:

Wraps nvmlUnitGetLedState.

func (Unit) PsuInfo

func (u Unit) PsuInfo(psu *PSUInfo) error

PsuInfo retrieves the PSU stats for the unit.

For S-class products. See PSUInfo for details on available PSU info.

  • psu: Reference in which to return the PSU information

A nil error means psu has been populated.

Errors:

Wraps nvmlUnitGetPsuInfo.

func (Unit) SetLedState

func (u Unit) SetLedState(color LedColor) error

SetLedState sets the LED state for the unit.

The LED can be either green (0) or amber (1). For S-class products. Requires root/admin permissions. This operation takes effect immediately. Current S-Class products don’t provide unique LEDs for each unit. As such, both front and back LEDs will be toggled in unison regardless of which unit is specified with this command. See LedColor for available colors.

See also: Unit.LedState

  • color: The target LED color

A nil error means the LED color has been set.

Errors:

Wraps nvmlUnitSetLedState.

func (Unit) Temperature

func (u Unit) Temperature(type_ uint32) (uint32, error)

Temperature retrieves the temperature readings for the unit, in degrees C.

For S-class products. Depending on the product, readings may be available for intake (type=0), exhaust (type=1) and board (type=2).

  • type_: The type of reading to take
  • temp: Reference in which to return the intake temperature

A nil error means temp has been populated.

Errors:

Wraps nvmlUnitGetTemperature.

type UnitFanInfo

type UnitFanInfo struct {
	Speed uint32
	State FanState
}

UnitFanInfo represents fan speed reading for a single fan in an S-class unit.

type UnitFanSpeeds

type UnitFanSpeeds struct {
	Fans  [24]UnitFanInfo
	Count uint32
}

UnitFanSpeeds represents fan speed readings for an entire S-class unit.

type UnitInfo

type UnitInfo struct {
	Name            [96]byte
	Id              [96]byte
	Serial          [96]byte
	FirmwareVersion [96]byte
}

UnitInfo represents static S-class unit info.

type UnrepairableMemoryStatusV1

type UnrepairableMemoryStatusV1 struct {
	BUnrepairableMemory uint32
}

UnrepairableMemoryStatusV1 represents the NVML unrepairable memory status.

type Utilization

type Utilization struct {
	Gpu    uint32
	Memory uint32
}

Utilization represents utilization information for a device.

Each sample period may be between 1 second and 1/6 second, depending on the product being queried.

type Value

type Value struct {
	// Data stores the raw bytes of the underlying C union.
	Data [1]uint64
}

Value represents different types of Value.

func (*Value) DVal

func (rec *Value) DVal() *float64

DVal returns a pointer to the dVal member of nvmlValue_t, which shares its storage with every other member of the union.

func (Value) Float64

func (v Value) Float64() float64

Float64 reads dVal. Use it for ValueTypeDouble; Value carries no discriminator.

Example
package main

import (
	"fmt"
	"math"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	v := nvml.Value{Data: [1]uint64{math.Float64bits(1.5)}}
	fmt.Println(v.Float64())
}
Output:
1.5

func (Value) Int32

func (v Value) Int32() int32

Int32 reads siVal. Use it for ValueTypeSignedInt.

Example
package main

import (
	"encoding/binary"
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	var data [8]byte
	binary.NativeEndian.PutUint32(data[:], 0xfffffffe)
	v := nvml.Value{Data: [1]uint64{binary.NativeEndian.Uint64(data[:])}}
	fmt.Println(v.Int32())
}
Output:
-2

func (Value) Int64

func (v Value) Int64() int64

Int64 reads sllVal. Use it for ValueTypeSignedLongLong.

Example
package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	v := nvml.Value{Data: [1]uint64{0xfffffffffffffffe}}
	fmt.Println(v.Int64())
}
Output:
-2

func (*Value) SiVal

func (rec *Value) SiVal() *int32

SiVal returns a pointer to the siVal member of nvmlValue_t, which shares its storage with every other member of the union.

func (*Value) SllVal

func (rec *Value) SllVal() *int64

SllVal returns a pointer to the sllVal member of nvmlValue_t, which shares its storage with every other member of the union.

func (*Value) UiVal

func (rec *Value) UiVal() *uint32

UiVal returns a pointer to the uiVal member of nvmlValue_t, which shares its storage with every other member of the union.

func (Value) Uint16

func (v Value) Uint16() uint16

Uint16 reads usVal. Use it for ValueTypeUnsignedShort.

Example
package main

import (
	"encoding/binary"
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	var data [8]byte
	binary.NativeEndian.PutUint16(data[:], 42)
	v := nvml.Value{Data: [1]uint64{binary.NativeEndian.Uint64(data[:])}}
	fmt.Println(v.Uint16())
}
Output:
42

func (Value) Uint32

func (v Value) Uint32() uint32

Uint32 reads uiVal. Use it for ValueTypeUnsignedInt.

Example
package main

import (
	"encoding/binary"
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	var data [8]byte
	binary.NativeEndian.PutUint32(data[:], 42)
	v := nvml.Value{Data: [1]uint64{binary.NativeEndian.Uint64(data[:])}}
	fmt.Println(v.Uint32())
}
Output:
42

func (Value) Uint64

func (v Value) Uint64() uint64

Uint64 reads ullVal. Use it for ValueTypeUnsignedLongLong.

Example
package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	v := nvml.Value{Data: [1]uint64{1 << 40}}
	fmt.Println(v.Uint64())
}
Output:
1099511627776

func (*Value) UlVal

func (rec *Value) UlVal() *uint

UlVal returns a pointer to the ulVal member of nvmlValue_t, which shares its storage with every other member of the union.

func (*Value) UllVal

func (rec *Value) UllVal() *uint64

UllVal returns a pointer to the ullVal member of nvmlValue_t, which shares its storage with every other member of the union.

func (Value) UnsignedLong

func (v Value) UnsignedLong() uint64

UnsignedLong reads ulVal and widens it to uint64. Use it for ValueTypeUnsignedLong. C unsigned long is 32 bits on Windows and on 32-bit targets, and 64 bits on other supported targets.

Example
package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/nvml"
)

func main() {
	// A zero-initialized union is zero for either native unsigned-long width.
	var v nvml.Value
	fmt.Println(v.UnsignedLong())
}
Output:
0

func (*Value) UsVal

func (rec *Value) UsVal() *uint16

UsVal returns a pointer to the usVal member of nvmlValue_t, which shares its storage with every other member of the union.

type ValueType

type ValueType int32

ValueType represents the type for sample value returned.

const (
	ValueTypeDouble           ValueType = 0 // Double-precision floating-point value
	ValueTypeUnsignedInt      ValueType = 1 // Unsigned 32-bit integer value
	ValueTypeUnsignedLong     ValueType = 2 // Unsigned long integer value
	ValueTypeUnsignedLongLong ValueType = 3 // Unsigned 64-bit integer value
	ValueTypeSignedLongLong   ValueType = 4 // Signed 64-bit integer value
	ValueTypeSignedInt        ValueType = 5 // Signed 32-bit integer value
	ValueTypeUnsignedShort    ValueType = 6 // Unsigned 16-bit integer value
	ValueTypeCount            ValueType = 7 // Maximum value above +1
)

func (ValueType) String

func (e ValueType) String() string

String returns the constant name, or a numeric representation for unknown values.

type VgpuCapability

type VgpuCapability int32

VgpuCapability represents vGPU queryable capabilities.

const (
	VgpuCapNvlinkP2P          VgpuCapability = 0 // P2P over NVLink is supported
	VgpuCapGpudirect          VgpuCapability = 1 // GPUDirect capability is supported
	VgpuCapMultiVgpuExclusive VgpuCapability = 2 // vGPU profile cannot be mixed with other vGPU profiles in same VM
	VgpuCapExclusiveType      VgpuCapability = 3 // vGPU profile cannot run on a GPU alongside other profiles of different type
	VgpuCapExclusiveSize      VgpuCapability = 4 // vGPU profile cannot run on a GPU alongside other profiles of different size
	VgpuCapCount              VgpuCapability = 5
)

func (VgpuCapability) String

func (e VgpuCapability) String() string

String returns the constant name, or a numeric representation for unknown values.

type VgpuCreatablePlacementInfo

type VgpuCreatablePlacementInfo struct {
	Version       uint32
	VgpuTypeId    VgpuTypeId
	Count         uint32
	PlacementIds  uintptr
	PlacementSize uint32
}

VgpuCreatablePlacementInfo stores creatable vGPU placement information -- version 1.

type VgpuCreatablePlacementInfoV1

type VgpuCreatablePlacementInfoV1 = VgpuCreatablePlacementInfo

VgpuCreatablePlacementInfoV1 is an alias for VgpuCreatablePlacementInfo.

type VgpuDriverCapability

type VgpuDriverCapability int32

VgpuDriverCapability represents vGPU driver queryable capabilities.

const (
	VgpuDriverCapHeterogeneousMultiVgpu VgpuDriverCapability = 0 // Supports mixing of different vGPU profiles within one guest VM
	VgpuDriverCapWarmUpdate             VgpuDriverCapability = 1 // Supports FSR and warm update of vGPU host driver without terminating the running guest VM
	VgpuDriverCapCount                  VgpuDriverCapability = 2
)

func (VgpuDriverCapability) String

func (e VgpuDriverCapability) String() string

String returns the constant name, or a numeric representation for unknown values.

type VgpuGuestInfoState

type VgpuGuestInfoState int32

VgpuGuestInfoState represents vGPU GUEST info state.

const (
	VgpuInstanceGuestInfoStateUninitialized VgpuGuestInfoState = 0 // Guest-dependent fields uninitialized
	VgpuInstanceGuestInfoStateInitialized   VgpuGuestInfoState = 1 // Guest-dependent fields initialized
)

func (VgpuGuestInfoState) String

func (e VgpuGuestInfoState) String() string

String returns the constant name, or a numeric representation for unknown values.

type VgpuHeterogeneousMode

type VgpuHeterogeneousMode struct {
	Version uint32
	Mode    uint32
}

VgpuHeterogeneousMode stores the vGPU heterogeneous mode of device -- version 1.

type VgpuHeterogeneousModeV1

type VgpuHeterogeneousModeV1 = VgpuHeterogeneousMode

VgpuHeterogeneousModeV1 is an alias for VgpuHeterogeneousMode.

type VgpuInstance

type VgpuInstance uint32

VgpuInstance is a vGPU instance identifier.

func (VgpuInstance) AccountingMode

func (v VgpuInstance) AccountingMode() (EnableState, error)

AccountingMode queries the state of per process accounting mode on vGPU.

For Maxwell or newer fully supported devices.

  • mode: Reference in which to return the current accounting mode

A nil error means the mode has been successfully retrieved.

Errors:

Wraps nvmlVgpuInstanceGetAccountingMode.

func (VgpuInstance) AccountingPids

func (v VgpuInstance) AccountingPids(buf []uint32) ([]uint32, error)

AccountingPids queries list of processes running on vGPU that can be queried for accounting stats.

The list of processes returned can be in running or terminated state. For Maxwell or newer fully supported devices. To just query the maximum number of processes that can be queried, call this function with *count = 0 and pids=NULL. The return code will be ErrInsufficientSize, or Success if list is empty. For more details see VgpuInstance.AccountingStats.

Note: In case of PID collision some processes might not be accessible before the circular buffer is full.

See also: VgpuInstance.AccountingPids

  • count: Reference in which to provide the pids array size, and to return the number of elements ready to be queried
  • pids: Reference in which to return list of process ids

A nil error means pids were successfully retrieved.

Errors:

Wraps nvmlVgpuInstanceGetAccountingPids.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (VgpuInstance) AccountingStats

func (v VgpuInstance) AccountingStats(pid uint32, stats *AccountingStats) error

AccountingStats queries process’s accounting stats.

For Maxwell or newer fully supported devices. Accounting stats capture GPU utilization and other statistics across the lifetime of a process, and can be queried during life time of the process or after its termination. The time field in AccountingStats is reported as 0 during the lifetime of the process and updated to actual running time after its termination. Accounting stats are kept in a circular buffer, newly created processes overwrite information about old processes. See AccountingStats for description of each returned metric. List of processes that can be queried can be retrieved from VgpuInstance.AccountingPids.

Note: Accounting Mode needs to be on. See VgpuInstance.AccountingMode.

Note: Only compute and graphics applications stats can be queried. Monitoring applications stats can’t be queried since they don’t contribute to GPU utilization.

Note: In case of pid collision stats of only the latest process (that terminated last) will be reported

  • pid: Process Id of the target process to query stats for
  • stats: Reference in which to return the process’s accounting stats

A nil error means stats have been successfully retrieved.

Errors:

  • ErrInvalidArgument: if vgpuInstance is 0, or stats is NULL
  • ErrNotFound: if vgpuInstance does not match a valid active vGPU instance on the system or stats is not found
  • ErrNotSupported: if the vGPU doesn’t support this feature or accounting mode is disabled
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlVgpuInstanceGetAccountingStats.

func (VgpuInstance) ClearAccountingPids

func (v VgpuInstance) ClearAccountingPids() error

ClearAccountingPids clears accounting information of the vGPU instance that have already terminated.

For Maxwell or newer fully supported devices. Requires root/admin permissions.

Note: Accounting Mode needs to be on. See VgpuInstance.AccountingMode.

Note: Only compute and graphics applications stats are reported and can be cleared since monitoring applications stats don’t contribute to GPU utilization.

A nil error means accounting information has been cleared.

Errors:

Wraps nvmlVgpuInstanceClearAccountingPids.

func (VgpuInstance) EccMode

func (v VgpuInstance) EccMode(eccMode *EnableState) error

EccMode retrieves the current ECC mode of vGPU instance.

  • eccMode: Reference in which to return the current ECC mode

A nil error means the vgpuInstance’s ECC mode has been successfully retrieved.

Errors:

Wraps nvmlVgpuInstanceGetEccMode.

func (VgpuInstance) EncoderCapacity

func (v VgpuInstance) EncoderCapacity() (uint32, error)

EncoderCapacity retrieves the encoder capacity of a vGPU instance, as a percentage of maximum encoder capacity with valid values in the range 0-100.

For Maxwell or newer fully supported devices.

  • encoderCapacity: Reference to an unsigned int for the encoder capacity

A nil error means encoderCapacity has been retrieved.

Errors:

Wraps nvmlVgpuInstanceGetEncoderCapacity.

func (VgpuInstance) EncoderSessions

func (v VgpuInstance) EncoderSessions(buf []EncoderSessionInfo) ([]EncoderSessionInfo, error)

EncoderSessions retrieves information about all active encoder sessions on a vGPU Instance.

An array of active encoder sessions is returned in the caller-supplied buffer pointed at by sessionInfo. The array element count is passed in sessionCount, and sessionCount is used to return the number of sessions written to the buffer. If the supplied buffer is not large enough to accommodate the active session array, the function returns ErrInsufficientSize, with the element count of EncoderSessionInfo array required in sessionCount. To query the number of active encoder sessions, call this function with *sessionCount = 0. The code will return Success with number of active encoder sessions updated in *sessionCount. For Maxwell or newer fully supported devices.

  • sessionCount: Reference to caller supplied array size, and returns the number of sessions
  • sessionInfo: Reference to caller supplied array in which the list of session information us returned

A nil error means sessionInfo is fetched.

Errors:

Wraps nvmlVgpuInstanceGetEncoderSessions.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (VgpuInstance) EncoderStats

func (v VgpuInstance) EncoderStats(sessionCount *uint32, averageFps *uint32, averageLatency *uint32) error

EncoderStats retrieves the current encoder statistics of a vGPU Instance.

For Maxwell or newer fully supported devices.

  • sessionCount: Reference to an unsigned int for count of active encoder sessions
  • averageFps: Reference to an unsigned int for trailing average FPS of all active sessions
  • averageLatency: Reference to an unsigned int for encode latency in microseconds

A nil error means sessionCount, averageFps and averageLatency is fetched.

Errors:

  • ErrInvalidArgument: if sessionCount , or averageFps or averageLatency is NULL or vgpuInstance is 0.
  • ErrNotFound: if vgpuInstance does not match a valid active vGPU instance on the system
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlVgpuInstanceGetEncoderStats.

func (VgpuInstance) FBCSessions

func (v VgpuInstance) FBCSessions(buf []FBCSessionInfo) ([]FBCSessionInfo, error)

FBCSessions retrieves information about active frame buffer capture sessions on a vGPU Instance.

An array of active FBC sessions is returned in the caller-supplied buffer pointed at by sessionInfo. The array element count is passed in sessionCount, and sessionCount is used to return the number of sessions written to the buffer. If the supplied buffer is not large enough to accommodate the active session array, the function returns ErrInsufficientSize, with the element count of FBCSessionInfo array required in sessionCount. To query the number of active FBC sessions, call this function with *sessionCount = 0. The code will return Success with number of active FBC sessions updated in *sessionCount. For Maxwell or newer fully supported devices.

Note: hResolution, vResolution, averageFPS and averageLatency data for a FBC session returned in sessionInfo may be zero if there are no new frames captured since the session started.

  • sessionCount: Reference to caller supplied array size, and returns the number of sessions
  • sessionInfo: Reference in which to return the session information

A nil error means sessionInfo is fetched.

Errors:

Wraps nvmlVgpuInstanceGetFBCSessions.

The returned slice reuses buf's storage when it has sufficient capacity; pass nil to let the call allocate.

func (VgpuInstance) FBCStats

func (v VgpuInstance) FBCStats(fbcStats *FBCStats) error

FBCStats retrieves the active frame buffer capture sessions statistics of a vGPU Instance.

For Maxwell or newer fully supported devices.

  • fbcStats: Reference to FBCStats structure containing NvFBC stats

A nil error means fbcStats is fetched.

Errors:

Wraps nvmlVgpuInstanceGetFBCStats.

func (VgpuInstance) FbUsage

func (v VgpuInstance) FbUsage() (uint64, error)

FbUsage retrieves the framebuffer usage in bytes.

Framebuffer usage is the amont of vGPU framebuffer memory that is currently in use by the VM. For Kepler or newer fully supported devices.

  • fbUsage: Pointer to framebuffer usage in bytes

Errors:

Wraps nvmlVgpuInstanceGetFbUsage.

func (VgpuInstance) FrameRateLimit

func (v VgpuInstance) FrameRateLimit() (uint32, error)

FrameRateLimit retrieves the frame rate limit set for the vGPU instance.

Returns the value of the frame rate limit set for the vGPU instance For Kepler or newer fully supported devices.

  • frameRateLimit: Reference to return the frame rate limit

A nil error means frameRateLimit has been set.

Errors:

Wraps nvmlVgpuInstanceGetFrameRateLimit.

func (VgpuInstance) GpuInstanceId

func (v VgpuInstance) GpuInstanceId() (uint32, error)

GpuInstanceId retrieves the GPU Instance ID for the given vGPU Instance.

The API will return a valid GPU Instance ID for MIG backed vGPU Instance, else INVALID_GPU_INSTANCE_ID is returned. For Kepler or newer fully supported devices.

  • gpuInstanceId: GPU Instance ID

Errors:

Wraps nvmlVgpuInstanceGetGpuInstanceId.

func (VgpuInstance) GpuPciId

func (v VgpuInstance) GpuPciId(vgpuPciId *byte, length *uint32) error

GpuPciId retrieves the PCI Id of the given vGPU Instance i.e.

the PCI Id of the GPU as seen inside the VM. The vGPU PCI id is returned as “00000000:00:00.0” if NVIDIA driver is not installed on the vGPU instance.

  • vgpuPciId: Caller-supplied buffer to return vGPU PCI Id string
  • length: Size of the vgpuPciId buffer

A nil error means vGPU PCI Id is sucessfully retrieved.

Errors:

Wraps nvmlVgpuInstanceGetGpuPciId.

func (VgpuInstance) LicenseInfo

func (v VgpuInstance) LicenseInfo(licenseInfo *VgpuLicenseInfo) error

LicenseInfo queries the license information of the vGPU instance.

For Maxwell or newer fully supported devices.

  • licenseInfo: Pointer to vGPU license information structure

A nil error means information is successfully retrieved.

Errors:

  • ErrDriverNotLoaded: if NVIDIA driver is not running on the vGPU instance
  • ErrInvalidArgument: if vgpuInstance is 0, or licenseInfo is NULL
  • ErrNotFound: if vgpuInstance does not match a valid active vGPU instance on the system
  • ErrUnknown: on any unexpected error previousvGPU Migration nextPages

Wraps nvmlVgpuInstanceGetLicenseInfo, bound as nvmlVgpuInstanceGetLicenseInfo_v2.

func (VgpuInstance) LicenseStatus deprecated

func (v VgpuInstance) LicenseStatus(licensed *uint32) error

LicenseStatus retrieves the current licensing state of the vGPU instance.

If the vGPU is currently licensed, licensed is set to 1, otherwise it is set to 0. For Kepler or newer fully supported devices.

  • licensed: Reference to return the licensing status

A nil error means licensed has been set.

Errors:

Wraps nvmlVgpuInstanceGetLicenseStatus.

Deprecated: Deprecated in CUDA 13.0. Use VgpuInstance.LicenseInfo instead.

func (VgpuInstance) MdevUUID

func (v VgpuInstance) MdevUUID() (string, error)

MdevUUID retrieves the MDEV UUID of a vGPU instance.

The MDEV UUID is a globally unique identifier of the mdev device assigned to the VM, and is returned as a 5-part hexadecimal string, not exceeding 80 characters in length (including the NULL terminator). MDEV UUID is displayed only on KVM platform. See DeviceUuidBufferSize. For Maxwell or newer fully supported devices.

  • mdevUuid: Pointer to caller-supplied buffer to hold MDEV UUID
  • size: Size of buffer in bytes

Errors:

Wraps nvmlVgpuInstanceGetMdevUUID.

func (VgpuInstance) Metadata

func (v VgpuInstance) Metadata(vgpuMetadata *VgpuMetadata, bufferSize *uint32) error

Metadata returns vGPU metadata structure for a running vGPU.

The structure contains information about the vGPU and its associated VM such as the currently installed NVIDIA guest driver version, together with host driver version and an opaque data section containing internal state. VgpuInstance.Metadata may be called at any time for a vGPU instance. Some fields in the returned structure are dependent on information obtained from the guest VM, which may not yet have reached a state where that information is available. The current state of these dependent fields is reflected in the info structure’s VgpuGuestInfoState field. The VMM may choose to read and save the vGPU’s VM info as persistent metadata associated with the VM, and provide it to Virtual GPU Manager when creating a vGPU for subsequent instances of the VM. The caller passes in a buffer via vgpuMetadata, with the size of the buffer in bufferSize. If the vGPU Metadata structure is too large to fit in the supplied buffer, the function returns ErrInsufficientSize with the size needed in bufferSize.

  • vgpuMetadata: Pointer to caller-supplied buffer into which vGPU metadata is written
  • bufferSize: Size of vgpuMetadata buffer

A nil error means vGPU metadata structure was successfully returned.

Errors:

  • ErrInsufficientSize: vgpuMetadata buffer is too small, required size is returned in bufferSize
  • ErrInvalidArgument: if bufferSize is NULL or vgpuInstance is 0; if vgpuMetadata is NULL and the value of bufferSize is not 0.
  • ErrNotFound: if vgpuInstance does not match a valid active vGPU instance on the system
  • ErrUnknown: on any unexpected error previousvGPU Management nextvGPU Utilization and Accounting

Wraps nvmlVgpuInstanceGetMetadata.

func (VgpuInstance) PlacementId

func (v VgpuInstance) PlacementId(pPlacement *VgpuPlacementId) error

PlacementId queries the placement ID of active vGPU instance.

When in vGPU heterogeneous mode, this function returns a valid placement ID as pPlacement->placementId else InvalidVgpuPlacementId is returned. pPlacement->version is the version number of the structure VgpuPlacementId, the caller should set the correct version number to get placement id of the vGPU instance vgpuInstance.

Requires CUDA 12.4 (driver r550) or later; see HasVgpuInstanceGetPlacementId.

A nil error means information is successfully retrieved.

Errors:

Wraps nvmlVgpuInstanceGetPlacementId.

func (VgpuInstance) RuntimeStateSize

func (v VgpuInstance) RuntimeStateSize() (VgpuRuntimeState, error)

RuntimeStateSize retrieves the currently used runtime state size of the vGPU instance.

This size represents the maximum in-memory data size utilized by a vGPU instance during standard operation. This measurement is exclusive of frame buffer (FB) data size assigned to the vGPU instance. For Maxwell or newer fully supported devices.

Requires CUDA 12.8 (driver r570) or later; see HasVgpuInstanceGetRuntimeStateSize.

A nil error means information is successfully retrieved.

Errors:

Wraps nvmlVgpuInstanceGetRuntimeStateSize.

func (VgpuInstance) SetEncoderCapacity

func (v VgpuInstance) SetEncoderCapacity(encoderCapacity uint32) error

SetEncoderCapacity sets the encoder capacity of a vGPU instance, as a percentage of maximum encoder capacity with valid values in the range 0-100.

For Maxwell or newer fully supported devices.

  • encoderCapacity: Unsigned int for the encoder capacity value

A nil error means encoderCapacity has been set.

Errors:

  • ErrInvalidArgument: if vgpuInstance is 0, or encoderCapacity is out of range of 0-100.
  • ErrNotFound: if vgpuInstance does not match a valid active vGPU instance on the system
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlVgpuInstanceSetEncoderCapacity.

func (VgpuInstance) Type

func (v VgpuInstance) Type() (VgpuTypeId, error)

Type retrieves the vGPU type of a vGPU instance.

Returns the vGPU type ID of vgpu assigned to the vGPU instance. For Kepler or newer fully supported devices.

  • vgpuTypeId: Reference to return the vgpuTypeId

A nil error means vgpuTypeId has been set.

Errors:

Wraps nvmlVgpuInstanceGetType.

func (VgpuInstance) UUID

func (v VgpuInstance) UUID() (string, error)

UUID retrieves the UUID of a vGPU instance.

The UUID is a globally unique identifier associated with the vGPU, and is returned as a 5-part hexadecimal string, not exceeding 80 characters in length (including the NULL terminator). See DeviceUuidBufferSize. For Kepler or newer fully supported devices.

  • uuid: Pointer to caller-supplied buffer to hold vGPU UUID
  • size: Size of buffer in bytes

Errors:

Wraps nvmlVgpuInstanceGetUUID.

func (VgpuInstance) VmDriverVersion

func (v VgpuInstance) VmDriverVersion() (string, error)

VmDriverVersion retrieves the NVIDIA driver version installed in the VM associated with a vGPU.

The version is returned as an alphanumeric string in the caller-supplied buffer version. The length of the version string will not exceed 80 characters in length (including the NUL terminator). See SystemDriverVersionBufferSize. VgpuInstance.VmDriverVersion may be called at any time for a vGPU instance. The guest VM driver version is returned as “Not Available” if no NVIDIA driver is installed in the VM, or the VM has not yet booted to the point where the NVIDIA driver is loaded and initialized. For Kepler or newer fully supported devices.

  • version: Caller-supplied buffer to return driver version string
  • length: Size of version buffer

A nil error means version has been set.

Errors:

Wraps nvmlVgpuInstanceGetVmDriverVersion.

func (VgpuInstance) VmID

func (v VgpuInstance) VmID(vmId *byte, size uint32, vmIdType *VgpuVmIdType) error

VmID retrieves the VM ID associated with a vGPU instance.

The VM ID is returned as a string, not exceeding 80 characters in length (including the NUL terminator). See DeviceUuidBufferSize. The format of the VM ID varies by platform, and is indicated by the type identifier returned in vmIdType. For Kepler or newer fully supported devices.

  • vmId: Pointer to caller-supplied buffer to hold VM ID
  • size: Size of buffer in bytes
  • vmIdType: Pointer to hold VM ID type

Errors:

Wraps nvmlVgpuInstanceGetVmID.

type VgpuInstanceUtilizationInfoV1

type VgpuInstanceUtilizationInfoV1 struct {
	TimeStamp    uint64
	VgpuInstance VgpuInstance
	SmUtil       Value
	MemUtil      Value
	EncUtil      Value
	DecUtil      Value
	JpgUtil      Value
	OfaUtil      Value
}

VgpuInstanceUtilizationInfoV1 stores utilization Value and vgpuInstance Info -- Version 1.

type VgpuInstanceUtilizationSample

type VgpuInstanceUtilizationSample struct {
	VgpuInstance VgpuInstance
	TimeStamp    uint64
	SmUtil       Value
	MemUtil      Value
	EncUtil      Value
	DecUtil      Value
}

VgpuInstanceUtilizationSample stores utilization Value and vgpuInstance.

type VgpuInstancesUtilizationInfo

type VgpuInstancesUtilizationInfo struct {
	Version           uint32
	SampleValType     ValueType
	VgpuInstanceCount uint32
	LastSeenTimeStamp uint64
	VgpuUtilArray     uintptr
}

VgpuInstancesUtilizationInfo stores recent utilization for vGPU instances running on a device -- version 1.

type VgpuInstancesUtilizationInfoV1

type VgpuInstancesUtilizationInfoV1 = VgpuInstancesUtilizationInfo

VgpuInstancesUtilizationInfoV1 is an alias for VgpuInstancesUtilizationInfo.

type VgpuLicenseExpiry

type VgpuLicenseExpiry struct {
	Year   uint32
	Month  uint16
	Day    uint16
	Hour   uint16
	Min    uint16
	Sec    uint16
	Status uint8
}

VgpuLicenseExpiry stores the vGPU license expiry details.

type VgpuLicenseInfo

type VgpuLicenseInfo struct {
	IsLicensed    uint8
	LicenseExpiry VgpuLicenseExpiry
	CurrentState  uint32
}

VgpuLicenseInfo represents nvmlVgpuLicenseInfo_t.

type VgpuMetadata

type VgpuMetadata struct {
	Version                uint32
	Revision               uint32
	GuestInfoState         VgpuGuestInfoState
	GuestDriverVersion     [80]byte
	HostDriverVersion      [80]byte
	Reserved               [6]uint32
	VgpuVirtualizationCaps uint32
	GuestVgpuVersion       uint32
	OpaqueDataSize         uint32
	OpaqueData             [4]byte
}

VgpuMetadata represents vGPU metadata structure.

type VgpuPgpuCompatibility

type VgpuPgpuCompatibility struct {
	VgpuVmCompatibility    VgpuVmCompatibility
	CompatibilityLimitCode VgpuPgpuCompatibilityLimitCode
}

VgpuPgpuCompatibility represents vGPU-pGPU compatibility structure.

type VgpuPgpuCompatibilityLimitCode

type VgpuPgpuCompatibilityLimitCode uint32

VgpuPgpuCompatibilityLimitCode represents vGPU-pGPU compatibility limit codes.

const (
	VgpuCompatibilityLimitNone        VgpuPgpuCompatibilityLimitCode = 0x0        // Compatibility is not limited.
	VgpuCompatibilityLimitHostDriver  VgpuPgpuCompatibilityLimitCode = 0x1        // ompatibility is limited by host driver version.
	VgpuCompatibilityLimitGuestDriver VgpuPgpuCompatibilityLimitCode = 0x2        // Compatibility is limited by guest driver version.
	VgpuCompatibilityLimitGpu         VgpuPgpuCompatibilityLimitCode = 0x4        // Compatibility is limited by GPU hardware.
	VgpuCompatibilityLimitOther       VgpuPgpuCompatibilityLimitCode = 0x80000000 // Compatibility is limited by an undefined factor.
)

func (VgpuPgpuCompatibilityLimitCode) String

String returns the constant name, or a numeric representation for unknown values.

type VgpuPgpuMetadata

type VgpuPgpuMetadata struct {
	Version                uint32
	Revision               uint32
	HostDriverVersion      [80]byte
	PgpuVirtualizationCaps uint32
	Reserved               [5]uint32
	HostSupportedVgpuRange VgpuVersion
	OpaqueDataSize         uint32
	OpaqueData             [4]byte
}

VgpuPgpuMetadata represents physical GPU metadata structure.

type VgpuPlacementId

type VgpuPlacementId struct {
	Version     uint32
	PlacementId uint32
}

VgpuPlacementId stores the placement ID of vGPU instance -- version 1.

type VgpuPlacementIdV1

type VgpuPlacementIdV1 = VgpuPlacementId

VgpuPlacementIdV1 is an alias for VgpuPlacementId.

type VgpuPlacementList

type VgpuPlacementList struct {
	Version       uint32
	PlacementSize uint32
	Count         uint32
	PlacementIds  uintptr
	Mode          uint32
}

VgpuPlacementList stores the list of vGPU placements -- version 2.

type VgpuPlacementListV1

type VgpuPlacementListV1 struct {
	Version       uint32
	PlacementSize uint32
	Count         uint32
	PlacementIds  uintptr
}

VgpuPlacementListV1 stores the list of vGPU placements -- version 1.

type VgpuPlacementListV2

type VgpuPlacementListV2 = VgpuPlacementList

VgpuPlacementListV2 is an alias for VgpuPlacementList.

type VgpuProcessUtilizationInfoV1

type VgpuProcessUtilizationInfoV1 struct {
	ProcessName  [64]byte
	TimeStamp    uint64
	VgpuInstance VgpuInstance
	Pid          uint32
	SmUtil       uint32
	MemUtil      uint32
	EncUtil      uint32
	DecUtil      uint32
	JpgUtil      uint32
	OfaUtil      uint32
}

VgpuProcessUtilizationInfoV1 stores utilization Value, vgpuInstance and subprocess information for process running on vGPU instance -- version 1.

type VgpuProcessUtilizationSample

type VgpuProcessUtilizationSample struct {
	VgpuInstance VgpuInstance
	Pid          uint32
	ProcessName  [64]byte
	TimeStamp    uint64
	SmUtil       uint32
	MemUtil      uint32
	EncUtil      uint32
	DecUtil      uint32
}

VgpuProcessUtilizationSample stores utilization Value, vgpuInstance and subprocess information.

type VgpuProcessesUtilizationInfo

type VgpuProcessesUtilizationInfo struct {
	Version           uint32
	VgpuProcessCount  uint32
	LastSeenTimeStamp uint64
	VgpuProcUtilArray uintptr
}

VgpuProcessesUtilizationInfo stores recent utilization, vgpuInstance and subprocess information for processes running on vGPU instances active on a device -- version 1.

type VgpuProcessesUtilizationInfoV1

type VgpuProcessesUtilizationInfoV1 = VgpuProcessesUtilizationInfo

VgpuProcessesUtilizationInfoV1 is an alias for VgpuProcessesUtilizationInfo.

type VgpuRuntimeState

type VgpuRuntimeState struct {
	Version uint32
	Size    uint64
}

VgpuRuntimeState stores the information of vGPU runtime state -- version 1.

type VgpuRuntimeStateV1

type VgpuRuntimeStateV1 = VgpuRuntimeState

VgpuRuntimeStateV1 is an alias for VgpuRuntimeState.

type VgpuSchedulerCapabilities

type VgpuSchedulerCapabilities struct {
	SupportedSchedulers [3]uint32
	MaxTimeslice        uint32
	MinTimeslice        uint32
	IsArrModeSupported  uint32
	MaxFrequencyForARR  uint32
	MinFrequencyForARR  uint32
	MaxAvgFactorForARR  uint32
	MinAvgFactorForARR  uint32
}

VgpuSchedulerCapabilities stores the vGPU scheduler capabilities.

type VgpuSchedulerGetState

type VgpuSchedulerGetState struct {
	SchedulerPolicy uint32
	ArrMode         uint32
	SchedulerParams VgpuSchedulerParams
}

VgpuSchedulerGetState stores the vGPU scheduler state.

type VgpuSchedulerLog

type VgpuSchedulerLog struct {
	EngineId        uint32
	SchedulerPolicy uint32
	ArrMode         uint32
	SchedulerParams VgpuSchedulerParams
	EntriesCount    uint32
	LogEntries      [200]VgpuSchedulerLogEntry
}

VgpuSchedulerLog stores a vGPU software scheduler log.

type VgpuSchedulerLogEntry

type VgpuSchedulerLogEntry struct {
	Timestamp                uint64
	TimeRunTotal             uint64
	TimeRun                  uint64
	SwRunlistId              uint32
	TargetTimeSlice          uint64
	CumulativePreemptionTime uint64
}

VgpuSchedulerLogEntry stores the state and logs of a software runlist.

type VgpuSchedulerLogEntryV2

type VgpuSchedulerLogEntryV2 struct {
	Timestamp                uint64
	TimeRunTotal             uint64
	TimeRun                  uint64
	SwRunlistId              uint32
	TargetTimeSlice          uint64
	CumulativePreemptionTime uint64
	Weight                   uint32
}

VgpuSchedulerLogEntryV2 stores the state and logs of a software runlist.

type VgpuSchedulerLogInfo

type VgpuSchedulerLogInfo struct {
	Version         uint32
	EngineId        uint32
	SchedulerPolicy uint32
	ArrMode         uint32
	SchedulerParams VgpuSchedulerParams
	EntriesCount    uint32
	LogEntries      [200]VgpuSchedulerLogEntry
}

VgpuSchedulerLogInfo stores vGPU scheduler log information -- Version 1.

type VgpuSchedulerLogInfoV1

type VgpuSchedulerLogInfoV1 = VgpuSchedulerLogInfo

VgpuSchedulerLogInfoV1 is an alias for VgpuSchedulerLogInfo.

type VgpuSchedulerLogInfoV2

type VgpuSchedulerLogInfoV2 struct {
	EngineId        uint32
	SchedulerPolicy uint32
	AvgFactor       uint32
	Timeslice       uint32
	EntriesCount    uint32
	LogEntries      [200]VgpuSchedulerLogEntryV2
}

VgpuSchedulerLogInfoV2 stores vGPU scheduler log information.

type VgpuSchedulerParams

type VgpuSchedulerParams struct {
	// Data stores the raw bytes of the underlying C union.
	Data [2]uint32
}

VgpuSchedulerParams represents the vGPU Scheduler Parameters.

func (*VgpuSchedulerParams) VgpuSchedData

VgpuSchedData returns a pointer to the vgpuSchedData member of nvmlVgpuSchedulerParams_t, which shares its storage with every other member of the union.

func (*VgpuSchedulerParams) VgpuSchedDataWithARR

func (rec *VgpuSchedulerParams) VgpuSchedDataWithARR() *VgpuSchedulerParamsVgpuSchedDataWithARR

VgpuSchedDataWithARR returns a pointer to the vgpuSchedDataWithARR member of nvmlVgpuSchedulerParams_t, which shares its storage with every other member of the union.

type VgpuSchedulerParamsVgpuSchedData

type VgpuSchedulerParamsVgpuSchedData struct {
	Timeslice uint32
}

VgpuSchedulerParamsVgpuSchedData is the type of the vgpuSchedData member of VgpuSchedulerParams.

type VgpuSchedulerParamsVgpuSchedDataWithARR

type VgpuSchedulerParamsVgpuSchedDataWithARR struct {
	AvgFactor uint32
	Timeslice uint32
}

VgpuSchedulerParamsVgpuSchedDataWithARR is the type of the vgpuSchedDataWithARR member of VgpuSchedulerParams.

type VgpuSchedulerSetParams

type VgpuSchedulerSetParams struct {
	// Data stores the raw bytes of the underlying C union.
	Data [2]uint32
}

VgpuSchedulerSetParams represents the vGPU Scheduler set Parameters.

func (*VgpuSchedulerSetParams) VgpuSchedData

VgpuSchedData returns a pointer to the vgpuSchedData member of nvmlVgpuSchedulerSetParams_t, which shares its storage with every other member of the union.

func (*VgpuSchedulerSetParams) VgpuSchedDataWithARR

VgpuSchedDataWithARR returns a pointer to the vgpuSchedDataWithARR member of nvmlVgpuSchedulerSetParams_t, which shares its storage with every other member of the union.

type VgpuSchedulerSetParamsVgpuSchedData

type VgpuSchedulerSetParamsVgpuSchedData struct {
	Timeslice uint32
}

VgpuSchedulerSetParamsVgpuSchedData is the type of the vgpuSchedData member of VgpuSchedulerSetParams.

type VgpuSchedulerSetParamsVgpuSchedDataWithARR

type VgpuSchedulerSetParamsVgpuSchedDataWithARR struct {
	AvgFactor uint32
	Frequency uint32
}

VgpuSchedulerSetParamsVgpuSchedDataWithARR is the type of the vgpuSchedDataWithARR member of VgpuSchedulerSetParams.

type VgpuSchedulerSetState

type VgpuSchedulerSetState struct {
	SchedulerPolicy uint32
	EnableARRMode   uint32
	SchedulerParams VgpuSchedulerSetParams
}

VgpuSchedulerSetState sets the vGPU scheduler state.

type VgpuSchedulerState

type VgpuSchedulerState struct {
	Version         uint32
	EngineId        uint32
	SchedulerPolicy uint32
	EnableARRMode   uint32
	SchedulerParams VgpuSchedulerSetParams
}

VgpuSchedulerState sets vGPU scheduler state information -- version 1.

type VgpuSchedulerStateInfo

type VgpuSchedulerStateInfo struct {
	Version         uint32
	EngineId        uint32
	SchedulerPolicy uint32
	ArrMode         uint32
	SchedulerParams VgpuSchedulerParams
}

VgpuSchedulerStateInfo stores vGPU scheduler state information -- Version 1.

type VgpuSchedulerStateInfoV1

type VgpuSchedulerStateInfoV1 = VgpuSchedulerStateInfo

VgpuSchedulerStateInfoV1 is an alias for VgpuSchedulerStateInfo.

type VgpuSchedulerStateInfoV2

type VgpuSchedulerStateInfoV2 struct {
	EngineId        uint32
	SchedulerPolicy uint32
	AvgFactor       uint32
	Timeslice       uint32
}

VgpuSchedulerStateInfoV2 stores vGPU scheduler state information.

type VgpuSchedulerStateV1

type VgpuSchedulerStateV1 = VgpuSchedulerState

VgpuSchedulerStateV1 is an alias for VgpuSchedulerState.

type VgpuSchedulerStateV2

type VgpuSchedulerStateV2 struct {
	EngineId        uint32
	SchedulerPolicy uint32
	AvgFactor       uint32
	Frequency       uint32
}

VgpuSchedulerStateV2 sets vGPU scheduler state information.

type VgpuTypeBar1Info

type VgpuTypeBar1Info struct {
	Version  uint32
	Bar1Size uint64
}

VgpuTypeBar1Info stores BAR1 size information of vGPU type -- Version 1.

type VgpuTypeBar1InfoV1

type VgpuTypeBar1InfoV1 = VgpuTypeBar1Info

VgpuTypeBar1InfoV1 is an alias for VgpuTypeBar1Info.

type VgpuTypeId

type VgpuTypeId uint32

VgpuTypeId is a vGPU type identifier.

func (VgpuTypeId) BAR1Info

func (v VgpuTypeId) BAR1Info(bar1Info *VgpuTypeBar1Info) error

BAR1Info retrieves the BAR1 info for given vGPU type.

For Maxwell or newer fully supported devices.

Requires CUDA 12.6 (driver r560) or later; see HasVgpuTypeGetBAR1Info.

  • bar1Info: Pointer to the vGPU type BAR1 information structure VgpuTypeBar1Info

Errors:

Wraps nvmlVgpuTypeGetBAR1Info.

func (VgpuTypeId) Capabilities

func (v VgpuTypeId) Capabilities(capability VgpuCapability) (uint32, error)

Capabilities retrieves the requested capability for a given vGPU type.

Refer to the VgpuCapability structure for the specific capabilities that can be queried. The return value should be treated as a boolean, with a non-zero value indicating that the capability is supported. For Maxwell or newer fully supported devices.

  • capability: Specifies the VgpuCapability to be queried
  • capResult: A boolean for the queried capability indicating that feature is supported

Errors:

Wraps nvmlVgpuTypeGetCapabilities.

func (VgpuTypeId) Class

func (v VgpuTypeId) Class(vgpuTypeClass *byte, size *uint32) error

Class retrieves the class of a vGPU type.

It will not exceed 64 characters in length (including the NUL terminator). See DeviceNameBufferSize. For Kepler or newer fully supported devices.

  • vgpuTypeClass: Pointer to string array to return class in
  • size: Size of string

Errors:

Wraps nvmlVgpuTypeGetClass.

func (VgpuTypeId) DeviceID

func (v VgpuTypeId) DeviceID(deviceID *uint64, subsystemID *uint64) error

DeviceID retrieves the device ID of a vGPU type.

For Kepler or newer fully supported devices.

  • deviceID: Device ID and vendor ID of the device contained in single 32 bit value
  • subsystemID: Subsystem ID and subsystem vendor ID of the device contained in single 32 bit value

Errors:

Wraps nvmlVgpuTypeGetDeviceID.

func (VgpuTypeId) FbReservation

func (v VgpuTypeId) FbReservation() (uint64, error)

FbReservation retrieves the static framebuffer reservation of the vGPU type in bytes.

Requires CUDA 12.4 (driver r550) or later; see HasVgpuTypeGetFbReservation.

  • fbReservation: Reference to return the framebuffer reservation

Errors:

Wraps nvmlVgpuTypeGetFbReservation.

func (VgpuTypeId) FrameRateLimit

func (v VgpuTypeId) FrameRateLimit() (uint32, error)

FrameRateLimit retrieves the static frame rate limit value of the vGPU type.

For Kepler or newer fully supported devices.

  • frameRateLimit: Reference to return the frame rate limit value

Errors:

Wraps nvmlVgpuTypeGetFrameRateLimit.

func (VgpuTypeId) FramebufferSize

func (v VgpuTypeId) FramebufferSize() (uint64, error)

FramebufferSize retrieves the vGPU framebuffer size in bytes.

For Kepler or newer fully supported devices.

  • fbSize: Pointer to framebuffer size in bytes

Errors:

Wraps nvmlVgpuTypeGetFramebufferSize.

func (VgpuTypeId) GpuInstanceProfileId

func (v VgpuTypeId) GpuInstanceProfileId() (uint32, error)

GpuInstanceProfileId retrieves the GPU Instance Profile ID for the given vGPU type ID.

The API will return a valid GPU Instance Profile ID for the MIG capable vGPU types, else INVALID_GPU_INSTANCE_PROFILE_ID is returned. For Kepler or newer fully supported devices.

  • gpuInstanceProfileId: GPU Instance Profile ID

Errors:

Wraps nvmlVgpuTypeGetGpuInstanceProfileId.

func (VgpuTypeId) GspHeapSize

func (v VgpuTypeId) GspHeapSize() (uint64, error)

GspHeapSize retrieves the static GSP heap size of the vGPU type in bytes.

Requires CUDA 12.4 (driver r550) or later; see HasVgpuTypeGetGspHeapSize.

  • gspHeapSize: Reference to return the GSP heap size value

Errors:

  • ErrInvalidArgument: If vgpuTypeId is invalid, or gspHeapSize is NULL
  • ErrUninitialized: If the library has not been successfully initialized
  • ErrUnknown: On any unexpected error previousUnit Structs nextvGPU Enums, Constants, Structs

Wraps nvmlVgpuTypeGetGspHeapSize.

func (VgpuTypeId) License

func (v VgpuTypeId) License() (string, error)

License retrieves license requirements for a vGPU type.

The license type and version required to run the specified vGPU type is returned as an alphanumeric string, in the form “,”, for example “GRID-Virtual-PC,2.0”. If a vGPU is runnable with* more than one type of license, the licenses are delimited by a semicolon, for example “GRID-Virtual-PC,2.0;GRID-Virtual-WS,2.0;GRID-Virtual-WS-Ext,2.0”. The total length of the returned string will not exceed 128 characters, including the NUL terminator. See GridLicenseBufferSize. For Kepler or newer fully supported devices.

  • vgpuTypeLicenseString: Pointer to buffer to return license info
  • size: Size of vgpuTypeLicenseString buffer

Errors:

Wraps nvmlVgpuTypeGetLicense.

func (VgpuTypeId) MaxInstances

func (v VgpuTypeId) MaxInstances(device Device) (uint32, error)

MaxInstances retrieves the maximum number of vGPU instances creatable on a device for given vGPU type.

For Kepler or newer fully supported devices.

  • device: The identifier of the target device
  • vgpuInstanceCount: Pointer to get the max number of vGPU instances that can be created on a deicve for given vgpuTypeId

Errors:

  • ErrInvalidArgument: if vgpuTypeId is invalid or is not supported on target device, or vgpuInstanceCount is NULL
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error

Wraps nvmlVgpuTypeGetMaxInstances.

func (VgpuTypeId) MaxInstancesPerVm

func (v VgpuTypeId) MaxInstancesPerVm() (uint32, error)

MaxInstancesPerVm retrieves the maximum number of vGPU instances supported per VM for given vGPU type.

For Kepler or newer fully supported devices.

  • vgpuInstanceCountPerVm: Pointer to get the max number of vGPU instances supported per VM for given vgpuTypeId

Errors:

Wraps nvmlVgpuTypeGetMaxInstancesPerVm.

func (VgpuTypeId) Name

func (v VgpuTypeId) Name(vgpuTypeName *byte, size *uint32) error

Name retrieves the vGPU type name.

The name is an alphanumeric string that denotes a particular vGPU, e.g. GRID M60-2Q. It will not exceed 64 characters in length (including the NUL terminator). See DeviceNameBufferSize. For Kepler or newer fully supported devices.

  • vgpuTypeName: Pointer to buffer to return name
  • size: Size of buffer

Errors:

Wraps nvmlVgpuTypeGetName.

func (VgpuTypeId) NumDisplayHeads

func (v VgpuTypeId) NumDisplayHeads() (uint32, error)

NumDisplayHeads retrieves count of vGPU’s supported display heads.

For Kepler or newer fully supported devices.

  • numDisplayHeads: Pointer to number of display heads

Errors:

Wraps nvmlVgpuTypeGetNumDisplayHeads.

func (VgpuTypeId) Resolution

func (v VgpuTypeId) Resolution(displayIndex uint32, xdim *uint32, ydim *uint32) error

Resolution retrieves vGPU display head’s maximum supported resolution.

For Kepler or newer fully supported devices.

  • displayIndex: Zero-based index of display head
  • xdim: Pointer to maximum number of pixels in X dimension
  • ydim: Pointer to maximum number of pixels in Y dimension

Errors:

  • ErrInvalidArgument: if vgpuTypeId is invalid, or xdim or ydim are NULL, or displayIndex is out of range.
  • ErrUninitialized: if the library has not been successfully initialized
  • ErrUnknown: on any unexpected error previousvGPU Structs nextvGPU Migration

Wraps nvmlVgpuTypeGetResolution.

type VgpuTypeIdInfo

type VgpuTypeIdInfo struct {
	Version     uint32
	VgpuCount   uint32
	VgpuTypeIds uintptr
}

VgpuTypeIdInfo stores the vGPU type IDs -- version 1.

type VgpuTypeIdInfoV1

type VgpuTypeIdInfoV1 = VgpuTypeIdInfo

VgpuTypeIdInfoV1 is an alias for VgpuTypeIdInfo.

type VgpuTypeMaxInstance

type VgpuTypeMaxInstance struct {
	Version          uint32
	VgpuTypeId       VgpuTypeId
	MaxInstancePerGI uint32
}

VgpuTypeMaxInstance stores the maximum number of possible vGPU type IDs -- version 1.

type VgpuTypeMaxInstanceV1

type VgpuTypeMaxInstanceV1 = VgpuTypeMaxInstance

VgpuTypeMaxInstanceV1 is an alias for VgpuTypeMaxInstance.

type VgpuVersion

type VgpuVersion struct {
	MinVersion uint32
	MaxVersion uint32
}

VgpuVersion represents range of vGPU versions.

type VgpuVmCompatibility

type VgpuVmCompatibility int32

VgpuVmCompatibility represents vGPU VM compatibility codes.

const (
	VgpuVmCompatibilityNone      VgpuVmCompatibility = 0x0 // vGPU is not runnable
	VgpuVmCompatibilityCold      VgpuVmCompatibility = 0x1 // vGPU is runnable from a cold / powered-off state (ACPI S5)
	VgpuVmCompatibilityHibernate VgpuVmCompatibility = 0x2 // vGPU is runnable from a hibernated state (ACPI S4)
	VgpuVmCompatibilitySleep     VgpuVmCompatibility = 0x4 // vGPU is runnable from a sleeped state (ACPI S3)
	VgpuVmCompatibilityLive      VgpuVmCompatibility = 0x8 // vGPU is runnable from a live/paused (ACPI S0)
)

func (VgpuVmCompatibility) String

func (e VgpuVmCompatibility) String() string

String returns the constant name, or a numeric representation for unknown values.

type VgpuVmIdType

type VgpuVmIdType int32

VgpuVmIdType represents nvmlVgpuVmIdType_t.

const (
	VgpuVmIdDomainId VgpuVmIdType = 0 // VM ID represents DOMAIN ID
	VgpuVmIdUuid     VgpuVmIdType = 1 // VM ID represents UUID
)

func (VgpuVmIdType) String

func (e VgpuVmIdType) String() string

String returns the constant name, or a numeric representation for unknown values.

type ViolationTime

type ViolationTime struct {
	ReferenceTime uint64
	ViolationTime uint64
}

ViolationTime holds perf policy violation status data.

type WorkloadPowerProfileCurrentProfiles

type WorkloadPowerProfileCurrentProfiles struct {
	Version               uint32
	PerfProfilesMask      Mask255
	RequestedProfilesMask Mask255
	EnforcedProfilesMask  Mask255
}

WorkloadPowerProfileCurrentProfiles represents current Profiles.

type WorkloadPowerProfileCurrentProfilesV1

type WorkloadPowerProfileCurrentProfilesV1 = WorkloadPowerProfileCurrentProfiles

WorkloadPowerProfileCurrentProfilesV1 is an alias for WorkloadPowerProfileCurrentProfiles.

type WorkloadPowerProfileInfo

type WorkloadPowerProfileInfo struct {
	Version         uint32
	ProfileId       uint32
	Priority        uint32
	ConflictingMask Mask255
}

WorkloadPowerProfileInfo represents profile Metadata.

type WorkloadPowerProfileInfoV1

type WorkloadPowerProfileInfoV1 = WorkloadPowerProfileInfo

WorkloadPowerProfileInfoV1 is an alias for WorkloadPowerProfileInfo.

type WorkloadPowerProfileProfilesInfo

type WorkloadPowerProfileProfilesInfo struct {
	Version          uint32
	PerfProfilesMask Mask255
	PerfProfile      [255]WorkloadPowerProfileInfo
}

WorkloadPowerProfileProfilesInfo represents profiles Info.

type WorkloadPowerProfileProfilesInfoV1

type WorkloadPowerProfileProfilesInfoV1 = WorkloadPowerProfileProfilesInfo

WorkloadPowerProfileProfilesInfoV1 is an alias for WorkloadPowerProfileProfilesInfo.

type WorkloadPowerProfileRequestedProfiles

type WorkloadPowerProfileRequestedProfiles struct {
	Version               uint32
	RequestedProfilesMask Mask255
}

WorkloadPowerProfileRequestedProfiles represents requested Profiles.

type WorkloadPowerProfileRequestedProfilesV1

type WorkloadPowerProfileRequestedProfilesV1 = WorkloadPowerProfileRequestedProfiles

WorkloadPowerProfileRequestedProfilesV1 is an alias for WorkloadPowerProfileRequestedProfiles.

type WorkloadPowerProfileUpdateProfilesV1

type WorkloadPowerProfileUpdateProfilesV1 struct {
	Operation          PowerProfileOperation
	UpdateProfilesMask Mask255
}

WorkloadPowerProfileUpdateProfilesV1 represents update Profiles.

Directories

Path Synopsis
Package nvmltest scripts and records the small NVML query interface used by telemetry consumers.
Package nvmltest scripts and records the small NVML query interface used by telemetry consumers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL