Versions in this module Expand all Collapse all v1 v1.0.1 May 6, 2021 Changes in this version + const AggregateECC + const BrandGeforce + const BrandGrid + const BrandNVS + const BrandQuadro + const BrandTesla + const BrandUnknown + const ClockGraphics + const ClockIDAppClockDefault + const ClockIDAppClockTarget + const ClockIDCurrent + const ClockIDCustomerBoostMax + const ClockMem + const ClockSM + const ClockVideo + const ClocksThrottleReasonApplicationsClocksSetting + const ClocksThrottleReasonGPUIdle + const ClocksThrottleReasonHWSlowdown + const ClocksThrottleReasonHwPowerBrakeSlowdown + const ClocksThrottleReasonHwThermalSlowdown + const ClocksThrottleReasonNone + const ClocksThrottleReasonSWPowerCap + const ClocksThrottleReasonSWThermalSlowdown + const ClocksThrottleReasonSyncBoost + const ClocksThrottleReasonUserDefinedClocks + const ComputeModeDefault + const ComputeModeExclusiveProcess + const ComputeModeExclusiveThread + const ComputeModeProhibited + const DriverModelWDDM + const DriverModelWDM + const EncoderTypeQueryH264 + const EncoderTypeQueryHEVC + const GPUOperationModeAllOn + const GPUOperationModeCompute + const GPUOperationModeLowDoublePrecision + const InfoROMObjectECC + const InfoROMObjectOEM + const InfoROMObjectPower + const MemoryErrorTypeCorrected + const MemoryErrorTypeUncorrected + const MemoryLocationCBU + const MemoryLocationDeviceMemory + const MemoryLocationL1Cache + const MemoryLocationL2Cache + const MemoryLocationRegisterFile + const MemoryLocationTextureMemory + const MemoryLocationTextureSHM + const PCIeUtilRXBytes + const PCIeUtilTXBytes + const PState0 + const PState1 + const PState10 + const PState11 + const PState12 + const PState13 + const PState14 + const PState15 + const PState2 + const PState3 + const PState4 + const PState5 + const PState6 + const PState7 + const PState8 + const PState9 + const PStateUnknown + const PageRetirementCauseDoubleBitECCError + const PageRetirementCauseMultipleSingleBitECCErrors + const PerfPolicyBoardLimit + const PerfPolicyLowUtilization + const PerfPolicyPower + const PerfPolicyReliability + const PerfPolicySyncBoost + const PerfPolicyThermal + const PerfPolicyTotalAppClocks + const PerfPolicyTotalBaseClocks + const RestrictedAPISetApplicationClocks + const RestrictedAPISetAutoBoostedClocks + const TemperatureGPU + const TemperatureThresholdGPUMax + const TemperatureThresholdMemMax + const TemperatureThresholdShutdown + const TemperatureThresholdSlowdown + const TopologyHostbridge + const TopologyInternal + const TopologyMultiple + const TopologyNode + const TopologySingle + const TopologySystem + const VolatileECC + var ErrAlreadyInititlized = errors.New("Multiple initializations are now allowed through ref counting") + var ErrCorruptedInfoROM = errors.New("infoROM is corrupted") + var ErrDriverNotLoaded = errors.New("NVIDIA driver is not loaded") + var ErrFunctionNotFound = errors.New("Local version of NVML doesn't implement this function") + var ErrGPULost = errors.New("The GPU has fallen off the bus or has otherwise become inaccessible") + var ErrIRQIssue = errors.New("NVIDIA Kernel detected an interrupt issue with a GPU") + var ErrInUse = errors.New("An operation cannot be performed because the GPU is currently in use") + var ErrInsufficientPower = errors.New("A device's external power cables are not properly attached") + var ErrInsufficientSize = errors.New("An input argument is not large enough") + var ErrInvalidArgument = errors.New("A supplied argument is invalid") + var ErrLibRMVersionMismatch = errors.New("RM detects a driver/library version mismatch") + var ErrLibraryNotFound = errors.New("NVML Shared Library couldn't be found or loaded") + var ErrMemory = errors.New("Insufficient memory") + var ErrNoData = errors.New("No data") + var ErrNoPermission = errors.New("The current user does not have permission for operation") + var ErrNotFound = errors.New("A query to find an object was unsuccessful") + var ErrNotImplemented = errors.New("Not implemented") + var ErrNotSupported = errors.New("The requested operation is not available on target device") + var ErrOperatingSystem = errors.New("The GPU control device has been blocked by the operating system/cgroups") + var ErrResetRequired = errors.New("The GPU requires a reset before it can be used again") + var ErrTimeout = errors.New("User provided timeout passed") + var ErrUninitialized = errors.New("NVML was not first initialized with Init") + var ErrUnknown = errors.New("An internal driver error occurred") + var ErrVGPUECCNotSupported = errors.New(...) + type API struct + func New(path string) (*API, error) + func (a API) DeviceClearCpuAffinity(device Device) (err error) + func (a API) DeviceClearECCErrorCounts(device Device, counterType ECCCounterType) error + func (a API) DeviceGetAPIRestriction(device Device, apiType RestrictedAPI) (bool, error) + func (a API) DeviceGetApplicationsClock(device Device, clockType ClockType) (clockMHz uint32, err error) + func (a API) DeviceGetAutoBoostedClocksEnabled(device Device) (isEnabled, defaultIsEnabled bool, err error) + func (a API) DeviceGetBAR1MemoryInfo(device Device) (mem BAR1Memory, err error) + func (a API) DeviceGetBoardID(device Device) (boardID uint32, err error) + func (a API) DeviceGetBoardPartNumber(device Device) (string, error) + func (a API) DeviceGetBrand(device Device) (brand BrandType, err error) + func (a API) DeviceGetBridgeChipInfo() + func (a API) DeviceGetCPUAffinity(device Device, cpuSetSize uint32) (cpuSet uint32, err error) + func (a API) DeviceGetClock(device Device, clockType ClockType, clockID ClockID) (clockMHz uint32, err error) + func (a API) DeviceGetClockInfo(device Device, clockType ClockType) (clock uint32, err error) + func (a API) DeviceGetComputeMode(device Device) (mode ComputeMode, err error) + func (a API) DeviceGetComputeRunningProcesses(device Device) ([]ProcessInfo, error) + func (a API) DeviceGetCount() (count uint32, err error) + func (a API) DeviceGetCudaComputeCapability(device Device) (major, minor int32, err error) + func (a API) DeviceGetCurrPcieLinkGeneration(device Device) (currLinkGen uint32, err error) + func (a API) DeviceGetCurrPcieLinkWidth(device Device) (currLinkWidth uint32, err error) + func (a API) DeviceGetCurrentClocksThrottleReasons(device Device) (clocksThrottleReasons ClocksThrottleReason, err error) + func (a API) DeviceGetDecoderUtilization(device Device) (utilization, samplingPeriodUs uint32, err error) + func (a API) DeviceGetDefaultApplicationsClock(device Device, clockType ClockType) (clockMHz uint32, err error) + func (a API) DeviceGetDetailedECCErrors(device Device, errorType MemoryErrorType, counterType ECCCounterType) (*ECCErrorCounts, error) + func (a API) DeviceGetDisplayActive(device Device) (bool, error) + func (a API) DeviceGetDisplayMode(device Device) (bool, error) + func (a API) DeviceGetDriverModel(device Device) (current, pending DriverModel, err error) + func (a API) DeviceGetECCMode(device Device) (current, pending bool, err error) + func (a API) DeviceGetEncoderCapacity(device Device, encoderQueryType EncoderType) (encoderCapacity uint32, err error) + func (a API) DeviceGetEncoderSessions() error + func (a API) DeviceGetEncoderStats(device Device) (sessionCount, averageFPS, averageLatency uint32, err error) + func (a API) DeviceGetEncoderUtilization(device Device) (utilization, samplingPeriodUs uint32, err error) + func (a API) DeviceGetEnforcedPowerLimit(device Device) (limit uint32, err error) + func (a API) DeviceGetFanSpeed(device Device) (speed uint32, err error) + func (a API) DeviceGetGPUOperationMode(device Device) (current, pending GPUOperationMode, err error) + func (a API) DeviceGetGraphicsRunningProcesses(device Device) ([]ProcessInfo, error) + func (a API) DeviceGetHandleByIndex(index uint32) (device Device, err error) + func (a API) DeviceGetHandleByPCIBusID(pciBusID string) (device Device, err error) + func (a API) DeviceGetHandleBySerial(serial string) (device Device, err error) + func (a API) DeviceGetHandleByUUID(uuid string) (device Device, err error) + func (a API) DeviceGetIndex(device Device) (index uint32, err error) + func (a API) DeviceGetInfoROMImageVersion(device Device) (string, error) + func (a API) DeviceGetInfoROMVersion(device Device, object InfoROMObject) (string, error) + func (a API) DeviceGetInforomConfigurationChecksum(device Device) (checksum uint32, err error) + func (a API) DeviceGetMaxClockInfo(device Device, clockType ClockType) (clock uint32, err error) + func (a API) DeviceGetMaxCustomerBoostClock(device Device, clockType ClockType) (clockMHz uint32, err error) + func (a API) DeviceGetMaxPcieLinkGeneration(device Device) (maxLinkGen uint32, err error) + func (a API) DeviceGetMaxPcieLinkWidth(device Device) (maxLinkWidth uint32, err error) + func (a API) DeviceGetMemoryErrorCounter(device Device, errorType MemoryErrorType, counterType ECCCounterType, ...) (count uint64, err error) + func (a API) DeviceGetMemoryInfo(device Device) (mem Memory, err error) + func (a API) DeviceGetMinorNumber(device Device) (minorNumber uint32, err error) + func (a API) DeviceGetMultiGpuBoard(device Device) (multiGpu bool, err error) + func (a API) DeviceGetName(device Device) (string, error) + func (a API) DeviceGetP2PStatus() error + func (a API) DeviceGetPCIInfo(device Device) (*PCIInfo, error) + func (a API) DeviceGetPCIeThroughput(device Device, counter PCIeUtilCounter) (value uint32, err error) + func (a API) DeviceGetPcieReplayCounter(device Device) (value uint32, err error) + func (a API) DeviceGetPerformanceState(device Device) (state PState, err error) + func (a API) DeviceGetPersistenceMode(device Device) (enabled bool, err error) + func (a API) DeviceGetPowerManagementDefaultLimit(device Device) (defaultLimit uint32, err error) + func (a API) DeviceGetPowerManagementLimit(device Device) (limit uint32, err error) + func (a API) DeviceGetPowerManagementLimitConstraints(device Device) (minLimit, maxLimit uint32, err error) + func (a API) DeviceGetPowerManagementMode(device Device) (bool, error) + func (a API) DeviceGetPowerState(device Device) (state PState, err error) + func (a API) DeviceGetPowerUsage(device Device) (power uint32, err error) + func (a API) DeviceGetRetiredPages(device Device, cause PageRetirementCause) ([]uint64, error) + func (a API) DeviceGetRetiredPagesPendingStatus(device Device) (isPending bool, err error) + func (a API) DeviceGetSamples() error + func (a API) DeviceGetSerial(device Device) (serial string, err error) + func (a API) DeviceGetSupportedClocksThrottleReasons(device Device) (supportedClocksThrottleReasons ClocksThrottleReason, err error) + func (a API) DeviceGetSupportedGraphicsClocks(device Device, memoryClockMHz uint32) ([]uint32, error) + func (a API) DeviceGetSupportedMemoryClocks(device Device) ([]uint32, error) + func (a API) DeviceGetTemperature(device Device, sensorType TemperatureSensor) (temp uint32, err error) + func (a API) DeviceGetTemperatureThreshold(device Device, thresholdType TemperatureThreshold) (temp uint32, err error) + func (a API) DeviceGetTopologyCommonAncestor(device1 Device, device2 Device) (pathInfo GPUTopologyLevel, err error) + func (a API) DeviceGetTopologyNearestGpus() error + func (a API) DeviceGetTotalECCErrors(device Device, errorType MemoryErrorType, counterType ECCCounterType) (eccCount uint64, err error) + func (a API) DeviceGetTotalEnergyConsumption(device Device) (energy uint64, err error) + func (a API) DeviceGetUUID(device Device) (string, error) + func (a API) DeviceGetUtilizationRates(device Device) (u Utilization, err error) + func (a API) DeviceGetVbiosVersion(device Device) (string, error) + func (a API) DeviceGetViolationStatus(device Device, policyType PerfPolicyType) (violTime ViolationTime, err error) + func (a API) DeviceOnSameBoard(device1 Device, device2 Device) (bool, error) + func (a API) DeviceResetApplicationsClocks(device Device) error + func (a API) DeviceSetAPIRestriction(device Device, apiType RestrictedAPI, isRestricted bool) error + func (a API) DeviceSetApplicationsClocks(device Device, memClockMHz, graphicsClockMHz uint32) error + func (a API) DeviceSetAutoBoostedClocksEnabled(device Device, enabled bool) error + func (a API) DeviceSetComputeMode(device Device, mode ComputeMode) error + func (a API) DeviceSetCpuAffinity(device Device) error + func (a API) DeviceSetDefaultAutoBoostedClocksEnabled(device Device, enabled bool) error + func (a API) DeviceSetDriverModel(device Device, model DriverModel, flags uint32) error + func (a API) DeviceSetECCMode(device Device, ecc bool) error + func (a API) DeviceSetGPUOperationMode(device Device, mode GPUOperationMode) error + func (a API) DeviceSetPersistenceMode(device Device, mode bool) error + func (a API) DeviceSetPowerManagementLimit(device Device, limit uint32) error + func (a API) DeviceValidateInforom(device Device) (err error) + func (a API) ErrorString(result uintptr) string + func (a API) Init() error + func (a API) ReleaseDLL() error + func (a API) Shutdown() error + func (a API) SystemGetCudaDriverVersion() (cudaDriverVersion int32, err error) + func (a API) SystemGetDriverVersion() (string, error) + func (a API) SystemGetNVMLVersion() (string, error) + func (a API) SystemGetProcessName(pid uint) (string, error) + type BAR1Memory struct + Free uint64 + Total uint64 + Used uint64 + type BrandType int32 + func (b BrandType) String() string + type ClockID int32 + type ClockType int32 + type ClocksThrottleReason uint64 + type ComputeMode int32 + type Device uintptr + type DriverModel int32 + type ECCCounterType int32 + type ECCErrorCounts struct + DeviceMemory uint64 + L1Cache uint64 + L2Cache uint64 + RegisterFile uint64 + type EncoderType int32 + type GPUOperationMode int32 + type GPUTopologyLevel int32 + type InfoROMObject int32 + type Memory struct + Free uint64 + Total uint64 + Used uint64 + type MemoryErrorType int32 + type MemoryLocation int32 + type PCIInfo struct + Bus uint32 + BusID string + BusIDLegacy string + Device uint32 + Domain uint32 + PCIDeviceID uint32 + PCISubsystemID uint32 + type PCIeUtilCounter int32 + type PState int32 + type PageRetirementCause int32 + type PerfPolicyType int32 + type ProcessInfo struct + PID uint32 + UsedGPUMemory uint64 + func (i ProcessInfo) MemoryInfoAvailable() bool + type RestrictedAPI int32 + type TemperatureSensor int32 + type TemperatureThreshold int32 + type Utilization struct + GPU uint32 + Memory uint32 + type ViolationTime struct + ReferenceTime uint64 + ViolationTime uint64