diff --git a/go.mod b/go.mod index 1f8f9db..dab7e2c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/NVIDIA/go-nvlib go 1.26.0 require ( - github.com/NVIDIA/go-nvml v0.13.4-1 + github.com/NVIDIA/go-nvml v0.13.5-0 github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.12.1 golang.org/x/sys v0.50.0 diff --git a/go.sum b/go.sum index 7361f74..5e80a0e 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/NVIDIA/go-nvml v0.13.4-1 h1:2E7RdOLBxHGSXq8sUw+c5Y0aWmFT7Cj+ZdjYulgUH18= -github.com/NVIDIA/go-nvml v0.13.4-1/go.mod h1:id63qwpoDWpFXwnwM6psDCSqW4BmNu6mWpr4YeQtPGo= +github.com/NVIDIA/go-nvml v0.13.5-0 h1:2AJgjNJ2TrvKON05NlqPRLvwcP/nW+VuCVdMt2zJP9A= +github.com/NVIDIA/go-nvml v0.13.5-0/go.mod h1:fEymWBlTqky9Flgv5Aj3EFVdRqzxZjKl/TngyRcZAoI= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go index c77aa7a..e8e152d 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go @@ -898,8 +898,12 @@ const ( FI_DEV_BANK_REMAPPER_HISTOGRAM_NONE = 306 // FI_DEV_PENDING_BANK_REMAPPING as defined in nvml/nvml.h FI_DEV_PENDING_BANK_REMAPPING = 307 + // FI_DEV_GPU_TEMP as defined in nvml/nvml.h + FI_DEV_GPU_TEMP = 308 + // FI_PWR_SMOOTHING_LIMITED_TIME as defined in nvml/nvml.h + FI_PWR_SMOOTHING_LIMITED_TIME = 309 // FI_MAX as defined in nvml/nvml.h - FI_MAX = 308 + FI_MAX = 310 // MCLK_SWITCH_TYPE_NOT_SUPPORTED as defined in nvml/nvml.h MCLK_SWITCH_TYPE_NOT_SUPPORTED = 0 // MCLK_SWITCH_TYPE_DEFERRED as defined in nvml/nvml.h @@ -1052,10 +1056,18 @@ const ( CC_SYSTEM_CPU_CAPS_AMD_SEV_SNP = 3 // CC_SYSTEM_CPU_CAPS_AMD_SNP_VTOM as defined in nvml/nvml.h CC_SYSTEM_CPU_CAPS_AMD_SNP_VTOM = 4 + // CC_SYSTEM_CPU_CAPS_ARM_CCA as defined in nvml/nvml.h + CC_SYSTEM_CPU_CAPS_ARM_CCA = 5 + // CC_SYSTEM_CPU_CAPS_INTEL_TDX_CONNECT as defined in nvml/nvml.h + CC_SYSTEM_CPU_CAPS_INTEL_TDX_CONNECT = 6 + // CC_SYSTEM_CPU_CAPS_AMD_SEV_TIO as defined in nvml/nvml.h + CC_SYSTEM_CPU_CAPS_AMD_SEV_TIO = 7 // CC_SYSTEM_GPUS_CC_NOT_CAPABLE as defined in nvml/nvml.h CC_SYSTEM_GPUS_CC_NOT_CAPABLE = 0 // CC_SYSTEM_GPUS_CC_CAPABLE as defined in nvml/nvml.h CC_SYSTEM_GPUS_CC_CAPABLE = 1 + // CC_SYSTEM_GPUS_CC_BMSAI_CAPABLE as defined in nvml/nvml.h + CC_SYSTEM_GPUS_CC_BMSAI_CAPABLE = 2 // CC_SYSTEM_DEVTOOLS_MODE_OFF as defined in nvml/nvml.h CC_SYSTEM_DEVTOOLS_MODE_OFF = 0 // CC_SYSTEM_DEVTOOLS_MODE_ON as defined in nvml/nvml.h @@ -1070,12 +1082,20 @@ const ( CC_SYSTEM_FEATURE_DISABLED = 0 // CC_SYSTEM_FEATURE_ENABLED as defined in nvml/nvml.h CC_SYSTEM_FEATURE_ENABLED = 1 + // CC_SYSTEM_FEATURE_BMSAI_ENABLED as defined in nvml/nvml.h + CC_SYSTEM_FEATURE_BMSAI_ENABLED = 2 // CC_SYSTEM_MULTIGPU_NONE as defined in nvml/nvml.h CC_SYSTEM_MULTIGPU_NONE = 0 // CC_SYSTEM_MULTIGPU_PROTECTED_PCIE as defined in nvml/nvml.h CC_SYSTEM_MULTIGPU_PROTECTED_PCIE = 1 // CC_SYSTEM_MULTIGPU_NVLE as defined in nvml/nvml.h CC_SYSTEM_MULTIGPU_NVLE = 2 + // CC_SYSTEM_TDISP_STATE_DISABLED as defined in nvml/nvml.h + CC_SYSTEM_TDISP_STATE_DISABLED = 0 + // CC_SYSTEM_TDISP_STATE_NOT_READY as defined in nvml/nvml.h + CC_SYSTEM_TDISP_STATE_NOT_READY = 1 + // CC_SYSTEM_TDISP_STATE_READY as defined in nvml/nvml.h + CC_SYSTEM_TDISP_STATE_READY = 2 // CC_ACCEPTING_CLIENT_REQUESTS_FALSE as defined in nvml/nvml.h CC_ACCEPTING_CLIENT_REQUESTS_FALSE = 0 // CC_ACCEPTING_CLIENT_REQUESTS_TRUE as defined in nvml/nvml.h @@ -1270,6 +1290,14 @@ const ( NVLINK_FIRMWARE_UCODE_TYPE_NETIR_DLN = 5 // NVLINK_FIRMWARE_VERSION_LENGTH as defined in nvml/nvml.h NVLINK_FIRMWARE_VERSION_LENGTH = 100 + // NVLINK_MAX_REMAP_TABLE_ENTRIES_V2 as defined in nvml/nvml.h + NVLINK_MAX_REMAP_TABLE_ENTRIES_V2 = 4096 + // NVLINK_REMAP_TABLE_ENTRIES_CHUNK as defined in nvml/nvml.h + NVLINK_REMAP_TABLE_ENTRIES_CHUNK = 128 + // NVLINK_NVLE_PRIVATE_INFO_SIZE as defined in nvml/nvml.h + NVLINK_NVLE_PRIVATE_INFO_SIZE = 256 + // NVLINK_NVLE_AES_256_GCM_KEY_SIZE_BYTES as defined in nvml/nvml.h + NVLINK_NVLE_AES_256_GCM_KEY_SIZE_BYTES = 32 // PRM_DATA_MAX_SIZE as defined in nvml/nvml.h PRM_DATA_MAX_SIZE = 496 // DEVICE_MIG_DISABLE as defined in nvml/nvml.h @@ -1622,8 +1650,8 @@ const ( BRAND_GEFORCE_RTX BrandType = 15 BRAND_TITAN_RTX BrandType = 16 BRAND_NVIDIA_DLA BrandType = 17 - BRAND_NVIDIA_VGAMEDEV BrandType = 18 BRAND_NVIDIA_NPU BrandType = 19 + BRAND_NVIDIA_VGAMEDEV BrandType = 18 BRAND_COUNT BrandType = 20 ) @@ -1931,7 +1959,8 @@ const ( DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS DeviceVgpuCapability = 9 DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED DeviceVgpuCapability = 10 DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED DeviceVgpuCapability = 11 - DEVICE_VGPU_CAP_COUNT DeviceVgpuCapability = 12 + DEVICE_VGPU_CAP_UVM_STUN DeviceVgpuCapability = 12 + DEVICE_VGPU_CAP_COUNT DeviceVgpuCapability = 13 ) // DeviceGpuRecoveryAction as declared in nvml/nvml.h diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go index 3f358b0..2013731 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go @@ -558,25 +558,43 @@ func (device nvmlDevice) GetMaxCustomerBoostClock(clockType ClockType) (uint32, } // nvml.DeviceGetSupportedMemoryClocks() -func (l *library) DeviceGetSupportedMemoryClocks(device Device) (int, uint32, Return) { +func (l *library) DeviceGetSupportedMemoryClocks(device Device) ([]uint32, Return) { return device.GetSupportedMemoryClocks() } -func (device nvmlDevice) GetSupportedMemoryClocks() (int, uint32, Return) { - var count, clocksMHz uint32 - ret := nvmlDeviceGetSupportedMemoryClocks(device, &count, &clocksMHz) - return int(count), clocksMHz, ret +func (device nvmlDevice) GetSupportedMemoryClocks() ([]uint32, Return) { + var count uint32 = 1 // Will be reduced upon returning + for { + clocksMHz := make([]uint32, count) + ret := nvmlDeviceGetSupportedMemoryClocks(device, &count, &clocksMHz[0]) + if ret == SUCCESS { + return clocksMHz[:count], ret + } + if ret != ERROR_INSUFFICIENT_SIZE { + return nil, ret + } + count *= 2 + } } // nvml.DeviceGetSupportedGraphicsClocks() -func (l *library) DeviceGetSupportedGraphicsClocks(device Device, memoryClockMHz int) (int, uint32, Return) { +func (l *library) DeviceGetSupportedGraphicsClocks(device Device, memoryClockMHz int) ([]uint32, Return) { return device.GetSupportedGraphicsClocks(memoryClockMHz) } -func (device nvmlDevice) GetSupportedGraphicsClocks(memoryClockMHz int) (int, uint32, Return) { - var count, clocksMHz uint32 - ret := nvmlDeviceGetSupportedGraphicsClocks(device, uint32(memoryClockMHz), &count, &clocksMHz) - return int(count), clocksMHz, ret +func (device nvmlDevice) GetSupportedGraphicsClocks(memoryClockMHz int) ([]uint32, Return) { + var count uint32 = 1 // Will be reduced upon returning + for { + clocksMHz := make([]uint32, count) + ret := nvmlDeviceGetSupportedGraphicsClocks(device, uint32(memoryClockMHz), &count, &clocksMHz[0]) + if ret == SUCCESS { + return clocksMHz[:count], ret + } + if ret != ERROR_INSUFFICIENT_SIZE { + return nil, ret + } + count *= 2 + } } // nvml.DeviceGetAutoBoostedClocksEnabled() @@ -1954,9 +1972,18 @@ func (device nvmlDevice) GetFieldValues(values []FieldValue) Return { if valuesCount == 0 { return ERROR_INVALID_ARGUMENT } - return nvmlDeviceGetFieldValues(device, int32(valuesCount), &values[0]) + // Drivers including 595.91.07 and 580.178.04 may access one extra entry during NVLink queries. + buffer := make([]FieldValue, valuesCount+1) + copy(buffer, values) + buffer[valuesCount].NvmlReturn = uint32(ERROR_INVALID_ARGUMENT) + ret := nvmlDeviceGetFieldValuesFn(device, int32(valuesCount), &buffer[0]) + copy(values, buffer[:valuesCount]) + return ret } +// `nvmlDeviceGetFieldValuesFn` allows us to override this for testing. +var nvmlDeviceGetFieldValuesFn = nvmlDeviceGetFieldValues + // nvml.DeviceGetVirtualizationMode() func (l *library) DeviceGetVirtualizationMode(device Device) (GpuVirtualizationMode, Return) { return device.GetVirtualizationMode() @@ -3257,6 +3284,17 @@ func (device nvmlDevice) GetBBXTimeData_v1() (BBXTimeData_v1, Return) { return timeData, ret } +// nvml.DeviceGetGpuUptime_v1() +func (l *library) DeviceGetGpuUptime_v1(device Device) (GpuUptime_v1, Return) { + return device.GetGpuUptime_v1() +} + +func (device nvmlDevice) GetGpuUptime_v1() (GpuUptime_v1, Return) { + var uptime GpuUptime_v1 + ret := nvmlDeviceGetGpuUptime_v1(device, &uptime) + return uptime, ret +} + // nvml.DeviceGetNumaNodeId() func (l *library) DeviceGetNumaNodeId(device Device) (int, Return) { return device.GetNumaNodeId() @@ -3362,6 +3400,16 @@ func (device nvmlDevice) GetProcessesUtilizationInfo() (ProcessesUtilizationInfo var processesUtilInfo ProcessesUtilizationInfo processesUtilInfo.Version = STRUCT_VERSION(processesUtilInfo, 1) ret := nvmlDeviceGetProcessesUtilizationInfo(device, &processesUtilInfo) + if ret != ERROR_INSUFFICIENT_SIZE || processesUtilInfo.ProcessSamplesCount == 0 { + return processesUtilInfo, ret + } + + var pinner runtime.Pinner + procUtilArray := make([]ProcessUtilizationInfo_v1, processesUtilInfo.ProcessSamplesCount) + processesUtilInfo.ProcUtilArray = &procUtilArray[0] + pinner.Pin(&procUtilArray[0]) + defer pinner.Unpin() + ret = nvmlDeviceGetProcessesUtilizationInfo(device, &processesUtilInfo) return processesUtilInfo, ret } @@ -3398,10 +3446,7 @@ func (device nvmlDevice) GetVgpuTypeSupportedPlacements(vgpuTypeId VgpuTypeId) ( } func (vgpuTypeId nvmlVgpuTypeId) GetSupportedPlacements(device Device) (VgpuPlacementList, Return) { - var placementList VgpuPlacementList - placementList.Version = STRUCT_VERSION(placementList, 1) - ret := nvmlDeviceGetVgpuTypeSupportedPlacements(nvmlDeviceHandle(device), vgpuTypeId, &placementList) - return placementList, ret + return vgpuTypeId.getPlacements(device, nvmlDeviceGetVgpuTypeSupportedPlacements) } // nvml.DeviceGetVgpuTypeCreatablePlacements() @@ -3414,10 +3459,47 @@ func (device nvmlDevice) GetVgpuTypeCreatablePlacements(vgpuTypeId VgpuTypeId) ( } func (vgpuTypeId nvmlVgpuTypeId) GetCreatablePlacements(device Device) (VgpuPlacementList, Return) { - var placementList VgpuPlacementList - placementList.Version = STRUCT_VERSION(placementList, 1) - ret := nvmlDeviceGetVgpuTypeCreatablePlacements(nvmlDeviceHandle(device), vgpuTypeId, &placementList) - return placementList, ret + return vgpuTypeId.getPlacements(device, nvmlDeviceGetVgpuTypeCreatablePlacements) +} + +// getPlacements calls the given placement query with a caller-allocated buffer for the placement IDs, as NVML requires. +// On success, PlacementIds in the returned list points to Go-allocated memory holding Count entries. +// NOTE: This method does not support taking in "mode" as an input parameter. This is a tradeoff we are making to not +// introduce a breaking change in the public API. "mode" defaults to NVML_VGPU_PGPU_HETEROGENEOUS_MODE when unspecified. +func (vgpuTypeId nvmlVgpuTypeId) getPlacements(device Device, nvmlFunc func(nvmlDevice, nvmlVgpuTypeId, *VgpuPlacementList) Return) (VgpuPlacementList, Return) { + // NVML sizes the buffer by the maximum number of instances of the vGPU type. If that is unavailable, start with + // a single entry, since NVML only documents undersized buffers and not a NULL one. + count := uint32(1) + if maxInstances, ret := vgpuTypeId.GetMaxInstances(device); ret == SUCCESS && maxInstances > 0 { + count = uint32(maxInstances) + } + + // On ERROR_INSUFFICIENT_SIZE, NVML reports the required size in Count, so retry with a buffer of that size. + // The number of attempts is bounded in case the required size keeps changing between calls. + for attempt := 0; attempt < 3; attempt++ { + var placementList VgpuPlacementList + // VgpuPlacementList mirrors nvmlVgpuPlacementList_v2_t, which is what + // nvmlVgpuPlacementList_t resolves to, so the stamp has to be 2. + placementList.Version = STRUCT_VERSION(placementList, 2) + placementList.Count = count + placementIds := make([]uint32, count) + placementList.PlacementIds = &placementIds[0] + + var pinner runtime.Pinner + pinner.Pin(&placementIds[0]) + ret := nvmlFunc(nvmlDeviceHandle(device), vgpuTypeId, &placementList) + pinner.Unpin() + + if ret == ERROR_INSUFFICIENT_SIZE && placementList.Count > count { + count = placementList.Count + continue + } + if ret != SUCCESS { + return VgpuPlacementList{}, ret + } + return placementList, ret + } + return VgpuPlacementList{}, ERROR_INSUFFICIENT_SIZE } // nvml.DeviceSetVgpuCapabilities() @@ -3694,6 +3776,17 @@ func (handler NvLinkInfoHandler) V2() (NvLinkInfo_v2, Return) { return info, ret } +// nvml.DeviceGetNvLinkInfo_v3() +func (l *library) DeviceGetNvLinkInfo_v3(device Device) (NvLinkInfo_v3, Return) { + return device.GetNvLinkInfo_v3() +} + +func (device nvmlDevice) GetNvLinkInfo_v3() (NvLinkInfo_v3, Return) { + var info NvLinkInfo_v3 + ret := nvmlDeviceGetNvLinkInfo_v3(device, &info) + return info, ret +} + // nvml.DeviceGetNvLinkTelemetrySamples_v1() func (l *library) DeviceGetNvLinkTelemetrySamples_v1(device Device, samples NvlinkTelemetrySamples_v1) (NvlinkTelemetrySamples_v1, Return) { return device.GetNvLinkTelemetrySamples_v1(samples) @@ -3716,6 +3809,55 @@ func (device nvmlDevice) GetNvLinkTelemetrySamples_v1(samples NvlinkTelemetrySam return samples, ret } +// nvml.DeviceGetNvlinkRemapTableInfo_v1() +func (l *library) DeviceGetNvlinkRemapTableInfo_v1(device Device) (NvlinkGetRemapTableInfo_v1, Return) { + return device.GetNvlinkRemapTableInfo_v1() +} + +func (device nvmlDevice) GetNvlinkRemapTableInfo_v1() (NvlinkGetRemapTableInfo_v1, Return) { + var info NvlinkGetRemapTableInfo_v1 + ret := nvmlDeviceGetNvlinkRemapTableInfo_v1(device, &info) + return info, ret +} + +// nvml.DeviceSetNvlinkNvleReady_v1() +func (l *library) DeviceSetNvlinkNvleReady_v1(device Device, nvleReady *NvlinkSetNvleReady_v1) Return { + return device.SetNvlinkNvleReady_v1(nvleReady) +} + +func (device nvmlDevice) SetNvlinkNvleReady_v1(nvleReady *NvlinkSetNvleReady_v1) Return { + return nvmlDeviceSetNvlinkNvleReady_v1(device, nvleReady) +} + +// nvml.DeviceLockNvlinkRemapTable_v1() +func (l *library) DeviceLockNvlinkRemapTable_v1(device Device, info *NvlinkLockRemapTable_v1) Return { + return device.LockNvlinkRemapTable_v1(info) +} + +func (device nvmlDevice) LockNvlinkRemapTable_v1(info *NvlinkLockRemapTable_v1) Return { + return nvmlDeviceLockNvlinkRemapTable_v1(device, info) +} + +// nvml.DeviceSetupNvlinkNvleEncryptionKey_v1() +func (l *library) DeviceSetupNvlinkNvleEncryptionKey_v1(device Device, encryptionKey *NvlinkSetupNvleEncryptionKey_v1) Return { + return device.SetupNvlinkNvleEncryptionKey_v1(encryptionKey) +} + +func (device nvmlDevice) SetupNvlinkNvleEncryptionKey_v1(encryptionKey *NvlinkSetupNvleEncryptionKey_v1) Return { + return nvmlDeviceSetupNvlinkNvleEncryptionKey_v1(device, encryptionKey) +} + +// nvml.DeviceGetNvlinkNvlePrivateInfo_v1() +func (l *library) DeviceGetNvlinkNvlePrivateInfo_v1(device Device) (NvlinkNvlePrivateInfo_v1, Return) { + return device.GetNvlinkNvlePrivateInfo_v1() +} + +func (device nvmlDevice) GetNvlinkNvlePrivateInfo_v1() (NvlinkNvlePrivateInfo_v1, Return) { + var info NvlinkNvlePrivateInfo_v1 + ret := nvmlDeviceGetNvlinkNvlePrivateInfo_v1(device, &info) + return info, ret +} + // nvml.DeviceWorkloadPowerProfileGetProfilesInfo() func (l *library) DeviceWorkloadPowerProfileGetProfilesInfo(device Device) (WorkloadPowerProfileProfilesInfo, Return) { return device.WorkloadPowerProfileGetProfilesInfo() diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go index 8aa5bdc..aeeacbc 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go @@ -291,6 +291,9 @@ var _ nvml.Device = &Device{} // GetGpuOperationModeFunc: func() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { // panic("mock out the GetGpuOperationMode method") // }, +// GetGpuUptime_v1Func: func() (nvml.GpuUptime_v1, nvml.Return) { +// panic("mock out the GetGpuUptime_v1 method") +// }, // GetGraphicsRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { // panic("mock out the GetGraphicsRunningProcesses method") // }, @@ -417,6 +420,9 @@ var _ nvml.Device = &Device{} // GetNvLinkInfoFunc: func() nvml.NvLinkInfoHandler { // panic("mock out the GetNvLinkInfo method") // }, +// GetNvLinkInfo_v3Func: func() (nvml.NvLinkInfo_v3, nvml.Return) { +// panic("mock out the GetNvLinkInfo_v3 method") +// }, // GetNvLinkRemoteDeviceTypeFunc: func(n int) (nvml.IntNvLinkDeviceType, nvml.Return) { // panic("mock out the GetNvLinkRemoteDeviceType method") // }, @@ -441,6 +447,12 @@ var _ nvml.Device = &Device{} // GetNvlinkBwModeFunc: func() (nvml.NvlinkGetBwMode, nvml.Return) { // panic("mock out the GetNvlinkBwMode method") // }, +// GetNvlinkNvlePrivateInfo_v1Func: func() (nvml.NvlinkNvlePrivateInfo_v1, nvml.Return) { +// panic("mock out the GetNvlinkNvlePrivateInfo_v1 method") +// }, +// GetNvlinkRemapTableInfo_v1Func: func() (nvml.NvlinkGetRemapTableInfo_v1, nvml.Return) { +// panic("mock out the GetNvlinkRemapTableInfo_v1 method") +// }, // GetNvlinkSupportedBwModesFunc: func() (nvml.NvlinkSupportedBwModes, nvml.Return) { // panic("mock out the GetNvlinkSupportedBwModes method") // }, @@ -561,10 +573,10 @@ var _ nvml.Device = &Device{} // GetSupportedEventTypesFunc: func() (uint64, nvml.Return) { // panic("mock out the GetSupportedEventTypes method") // }, -// GetSupportedGraphicsClocksFunc: func(n int) (int, uint32, nvml.Return) { +// GetSupportedGraphicsClocksFunc: func(n int) ([]uint32, nvml.Return) { // panic("mock out the GetSupportedGraphicsClocks method") // }, -// GetSupportedMemoryClocksFunc: func() (int, uint32, nvml.Return) { +// GetSupportedMemoryClocksFunc: func() ([]uint32, nvml.Return) { // panic("mock out the GetSupportedMemoryClocks method") // }, // GetSupportedPerformanceStatesFunc: func() ([]nvml.Pstates, nvml.Return) { @@ -681,6 +693,9 @@ var _ nvml.Device = &Device{} // IsMigDeviceHandleFunc: func() (bool, nvml.Return) { // panic("mock out the IsMigDeviceHandle method") // }, +// LockNvlinkRemapTable_v1Func: func(nvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1) nvml.Return { +// panic("mock out the LockNvlinkRemapTable_v1 method") +// }, // OnSameBoardFunc: func(device nvml.Device) (int, nvml.Return) { // panic("mock out the OnSameBoard method") // }, @@ -804,6 +819,9 @@ var _ nvml.Device = &Device{} // SetNvlinkBwModeAsync_v1Func: func(nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return { // panic("mock out the SetNvlinkBwModeAsync_v1 method") // }, +// SetNvlinkNvleReady_v1Func: func(nvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1) nvml.Return { +// panic("mock out the SetNvlinkNvleReady_v1 method") +// }, // SetPersistenceModeFunc: func(enableState nvml.EnableState) nvml.Return { // panic("mock out the SetPersistenceMode method") // }, @@ -834,6 +852,9 @@ var _ nvml.Device = &Device{} // SetVirtualizationModeFunc: func(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { // panic("mock out the SetVirtualizationMode method") // }, +// SetupNvlinkNvleEncryptionKey_v1Func: func(nvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1) nvml.Return { +// panic("mock out the SetupNvlinkNvleEncryptionKey_v1 method") +// }, // ValidateInforomFunc: func() nvml.Return { // panic("mock out the ValidateInforom method") // }, @@ -1138,6 +1159,9 @@ type Device struct { // GetGpuOperationModeFunc mocks the GetGpuOperationMode method. GetGpuOperationModeFunc func() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) + // GetGpuUptime_v1Func mocks the GetGpuUptime_v1 method. + GetGpuUptime_v1Func func() (nvml.GpuUptime_v1, nvml.Return) + // GetGraphicsRunningProcessesFunc mocks the GetGraphicsRunningProcesses method. GetGraphicsRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) @@ -1264,6 +1288,9 @@ type Device struct { // GetNvLinkInfoFunc mocks the GetNvLinkInfo method. GetNvLinkInfoFunc func() nvml.NvLinkInfoHandler + // GetNvLinkInfo_v3Func mocks the GetNvLinkInfo_v3 method. + GetNvLinkInfo_v3Func func() (nvml.NvLinkInfo_v3, nvml.Return) + // GetNvLinkRemoteDeviceTypeFunc mocks the GetNvLinkRemoteDeviceType method. GetNvLinkRemoteDeviceTypeFunc func(n int) (nvml.IntNvLinkDeviceType, nvml.Return) @@ -1288,6 +1315,12 @@ type Device struct { // GetNvlinkBwModeFunc mocks the GetNvlinkBwMode method. GetNvlinkBwModeFunc func() (nvml.NvlinkGetBwMode, nvml.Return) + // GetNvlinkNvlePrivateInfo_v1Func mocks the GetNvlinkNvlePrivateInfo_v1 method. + GetNvlinkNvlePrivateInfo_v1Func func() (nvml.NvlinkNvlePrivateInfo_v1, nvml.Return) + + // GetNvlinkRemapTableInfo_v1Func mocks the GetNvlinkRemapTableInfo_v1 method. + GetNvlinkRemapTableInfo_v1Func func() (nvml.NvlinkGetRemapTableInfo_v1, nvml.Return) + // GetNvlinkSupportedBwModesFunc mocks the GetNvlinkSupportedBwModes method. GetNvlinkSupportedBwModesFunc func() (nvml.NvlinkSupportedBwModes, nvml.Return) @@ -1409,10 +1442,10 @@ type Device struct { GetSupportedEventTypesFunc func() (uint64, nvml.Return) // GetSupportedGraphicsClocksFunc mocks the GetSupportedGraphicsClocks method. - GetSupportedGraphicsClocksFunc func(n int) (int, uint32, nvml.Return) + GetSupportedGraphicsClocksFunc func(n int) ([]uint32, nvml.Return) // GetSupportedMemoryClocksFunc mocks the GetSupportedMemoryClocks method. - GetSupportedMemoryClocksFunc func() (int, uint32, nvml.Return) + GetSupportedMemoryClocksFunc func() ([]uint32, nvml.Return) // GetSupportedPerformanceStatesFunc mocks the GetSupportedPerformanceStates method. GetSupportedPerformanceStatesFunc func() ([]nvml.Pstates, nvml.Return) @@ -1528,6 +1561,9 @@ type Device struct { // IsMigDeviceHandleFunc mocks the IsMigDeviceHandle method. IsMigDeviceHandleFunc func() (bool, nvml.Return) + // LockNvlinkRemapTable_v1Func mocks the LockNvlinkRemapTable_v1 method. + LockNvlinkRemapTable_v1Func func(nvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1) nvml.Return + // OnSameBoardFunc mocks the OnSameBoard method. OnSameBoardFunc func(device nvml.Device) (int, nvml.Return) @@ -1651,6 +1687,9 @@ type Device struct { // SetNvlinkBwModeAsync_v1Func mocks the SetNvlinkBwModeAsync_v1 method. SetNvlinkBwModeAsync_v1Func func(nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return + // SetNvlinkNvleReady_v1Func mocks the SetNvlinkNvleReady_v1 method. + SetNvlinkNvleReady_v1Func func(nvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1) nvml.Return + // SetPersistenceModeFunc mocks the SetPersistenceMode method. SetPersistenceModeFunc func(enableState nvml.EnableState) nvml.Return @@ -1681,6 +1720,9 @@ type Device struct { // SetVirtualizationModeFunc mocks the SetVirtualizationMode method. SetVirtualizationModeFunc func(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return + // SetupNvlinkNvleEncryptionKey_v1Func mocks the SetupNvlinkNvleEncryptionKey_v1 method. + SetupNvlinkNvleEncryptionKey_v1Func func(nvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1) nvml.Return + // ValidateInforomFunc mocks the ValidateInforom method. ValidateInforomFunc func() nvml.Return @@ -2046,6 +2088,9 @@ type Device struct { // GetGpuOperationMode holds details about calls to the GetGpuOperationMode method. GetGpuOperationMode []struct { } + // GetGpuUptime_v1 holds details about calls to the GetGpuUptime_v1 method. + GetGpuUptime_v1 []struct { + } // GetGraphicsRunningProcesses holds details about calls to the GetGraphicsRunningProcesses method. GetGraphicsRunningProcesses []struct { } @@ -2204,6 +2249,9 @@ type Device struct { // GetNvLinkInfo holds details about calls to the GetNvLinkInfo method. GetNvLinkInfo []struct { } + // GetNvLinkInfo_v3 holds details about calls to the GetNvLinkInfo_v3 method. + GetNvLinkInfo_v3 []struct { + } // GetNvLinkRemoteDeviceType holds details about calls to the GetNvLinkRemoteDeviceType method. GetNvLinkRemoteDeviceType []struct { // N is the n argument value. @@ -2246,6 +2294,12 @@ type Device struct { // GetNvlinkBwMode holds details about calls to the GetNvlinkBwMode method. GetNvlinkBwMode []struct { } + // GetNvlinkNvlePrivateInfo_v1 holds details about calls to the GetNvlinkNvlePrivateInfo_v1 method. + GetNvlinkNvlePrivateInfo_v1 []struct { + } + // GetNvlinkRemapTableInfo_v1 holds details about calls to the GetNvlinkRemapTableInfo_v1 method. + GetNvlinkRemapTableInfo_v1 []struct { + } // GetNvlinkSupportedBwModes holds details about calls to the GetNvlinkSupportedBwModes method. GetNvlinkSupportedBwModes []struct { } @@ -2546,6 +2600,11 @@ type Device struct { // IsMigDeviceHandle holds details about calls to the IsMigDeviceHandle method. IsMigDeviceHandle []struct { } + // LockNvlinkRemapTable_v1 holds details about calls to the LockNvlinkRemapTable_v1 method. + LockNvlinkRemapTable_v1 []struct { + // NvlinkLockRemapTable_v1 is the nvlinkLockRemapTable_v1 argument value. + NvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1 + } // OnSameBoard holds details about calls to the OnSameBoard method. OnSameBoard []struct { // Device is the device argument value. @@ -2773,6 +2832,11 @@ type Device struct { // NvlinkSetBwModeAsync_v1 is the nvlinkSetBwModeAsync_v1 argument value. NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 } + // SetNvlinkNvleReady_v1 holds details about calls to the SetNvlinkNvleReady_v1 method. + SetNvlinkNvleReady_v1 []struct { + // NvlinkSetNvleReady_v1 is the nvlinkSetNvleReady_v1 argument value. + NvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1 + } // SetPersistenceMode holds details about calls to the SetPersistenceMode method. SetPersistenceMode []struct { // EnableState is the enableState argument value. @@ -2827,6 +2891,11 @@ type Device struct { // GpuVirtualizationMode is the gpuVirtualizationMode argument value. GpuVirtualizationMode nvml.GpuVirtualizationMode } + // SetupNvlinkNvleEncryptionKey_v1 holds details about calls to the SetupNvlinkNvleEncryptionKey_v1 method. + SetupNvlinkNvleEncryptionKey_v1 []struct { + // NvlinkSetupNvleEncryptionKey_v1 is the nvlinkSetupNvleEncryptionKey_v1 argument value. + NvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1 + } // ValidateInforom holds details about calls to the ValidateInforom method. ValidateInforom []struct { } @@ -2953,6 +3022,7 @@ type Device struct { lockGetGpuInstances sync.RWMutex lockGetGpuMaxPcieLinkGeneration sync.RWMutex lockGetGpuOperationMode sync.RWMutex + lockGetGpuUptime_v1 sync.RWMutex lockGetGraphicsRunningProcesses sync.RWMutex lockGetGridLicensableFeatures sync.RWMutex lockGetGspFirmwareMode sync.RWMutex @@ -2995,6 +3065,7 @@ type Device struct { lockGetNvLinkCapability sync.RWMutex lockGetNvLinkErrorCounter sync.RWMutex lockGetNvLinkInfo sync.RWMutex + lockGetNvLinkInfo_v3 sync.RWMutex lockGetNvLinkRemoteDeviceType sync.RWMutex lockGetNvLinkRemotePciInfo sync.RWMutex lockGetNvLinkState sync.RWMutex @@ -3003,6 +3074,8 @@ type Device struct { lockGetNvLinkUtilizationCounter sync.RWMutex lockGetNvLinkVersion sync.RWMutex lockGetNvlinkBwMode sync.RWMutex + lockGetNvlinkNvlePrivateInfo_v1 sync.RWMutex + lockGetNvlinkRemapTableInfo_v1 sync.RWMutex lockGetNvlinkSupportedBwModes sync.RWMutex lockGetOfaUtilization sync.RWMutex lockGetP2PStatus sync.RWMutex @@ -3083,6 +3156,7 @@ type Device struct { lockGpmSampleGet sync.RWMutex lockGpmSetStreamingEnabled sync.RWMutex lockIsMigDeviceHandle sync.RWMutex + lockLockNvlinkRemapTable_v1 sync.RWMutex lockOnSameBoard sync.RWMutex lockPerfMetricsGetSamples_v1 sync.RWMutex lockPowerSmoothingActivatePresetProfile sync.RWMutex @@ -3124,6 +3198,7 @@ type Device struct { lockSetNvLinkUtilizationControl sync.RWMutex lockSetNvlinkBwMode sync.RWMutex lockSetNvlinkBwModeAsync_v1 sync.RWMutex + lockSetNvlinkNvleReady_v1 sync.RWMutex lockSetPersistenceMode sync.RWMutex lockSetPowerManagementLimit sync.RWMutex lockSetPowerManagementLimit_v2 sync.RWMutex @@ -3134,6 +3209,7 @@ type Device struct { lockSetVgpuSchedulerState sync.RWMutex lockSetVgpuSchedulerState_v2 sync.RWMutex lockSetVirtualizationMode sync.RWMutex + lockSetupNvlinkNvleEncryptionKey_v1 sync.RWMutex lockValidateInforom sync.RWMutex lockVgpuForceGspUnload sync.RWMutex lockVgpuTypeGetMaxInstances sync.RWMutex @@ -5760,6 +5836,33 @@ func (mock *Device) GetGpuOperationModeCalls() []struct { return calls } +// GetGpuUptime_v1 calls GetGpuUptime_v1Func. +func (mock *Device) GetGpuUptime_v1() (nvml.GpuUptime_v1, nvml.Return) { + if mock.GetGpuUptime_v1Func == nil { + panic("Device.GetGpuUptime_v1Func: method is nil but Device.GetGpuUptime_v1 was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuUptime_v1.Lock() + mock.calls.GetGpuUptime_v1 = append(mock.calls.GetGpuUptime_v1, callInfo) + mock.lockGetGpuUptime_v1.Unlock() + return mock.GetGpuUptime_v1Func() +} + +// GetGpuUptime_v1Calls gets all the calls that were made to GetGpuUptime_v1. +// Check the length with: +// +// len(mockedDevice.GetGpuUptime_v1Calls()) +func (mock *Device) GetGpuUptime_v1Calls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuUptime_v1.RLock() + calls = mock.calls.GetGpuUptime_v1 + mock.lockGetGpuUptime_v1.RUnlock() + return calls +} + // GetGraphicsRunningProcesses calls GetGraphicsRunningProcessesFunc. func (mock *Device) GetGraphicsRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { if mock.GetGraphicsRunningProcessesFunc == nil { @@ -6968,6 +7071,33 @@ func (mock *Device) GetNvLinkInfoCalls() []struct { return calls } +// GetNvLinkInfo_v3 calls GetNvLinkInfo_v3Func. +func (mock *Device) GetNvLinkInfo_v3() (nvml.NvLinkInfo_v3, nvml.Return) { + if mock.GetNvLinkInfo_v3Func == nil { + panic("Device.GetNvLinkInfo_v3Func: method is nil but Device.GetNvLinkInfo_v3 was just called") + } + callInfo := struct { + }{} + mock.lockGetNvLinkInfo_v3.Lock() + mock.calls.GetNvLinkInfo_v3 = append(mock.calls.GetNvLinkInfo_v3, callInfo) + mock.lockGetNvLinkInfo_v3.Unlock() + return mock.GetNvLinkInfo_v3Func() +} + +// GetNvLinkInfo_v3Calls gets all the calls that were made to GetNvLinkInfo_v3. +// Check the length with: +// +// len(mockedDevice.GetNvLinkInfo_v3Calls()) +func (mock *Device) GetNvLinkInfo_v3Calls() []struct { +} { + var calls []struct { + } + mock.lockGetNvLinkInfo_v3.RLock() + calls = mock.calls.GetNvLinkInfo_v3 + mock.lockGetNvLinkInfo_v3.RUnlock() + return calls +} + // GetNvLinkRemoteDeviceType calls GetNvLinkRemoteDeviceTypeFunc. func (mock *Device) GetNvLinkRemoteDeviceType(n int) (nvml.IntNvLinkDeviceType, nvml.Return) { if mock.GetNvLinkRemoteDeviceTypeFunc == nil { @@ -7227,6 +7357,60 @@ func (mock *Device) GetNvlinkBwModeCalls() []struct { return calls } +// GetNvlinkNvlePrivateInfo_v1 calls GetNvlinkNvlePrivateInfo_v1Func. +func (mock *Device) GetNvlinkNvlePrivateInfo_v1() (nvml.NvlinkNvlePrivateInfo_v1, nvml.Return) { + if mock.GetNvlinkNvlePrivateInfo_v1Func == nil { + panic("Device.GetNvlinkNvlePrivateInfo_v1Func: method is nil but Device.GetNvlinkNvlePrivateInfo_v1 was just called") + } + callInfo := struct { + }{} + mock.lockGetNvlinkNvlePrivateInfo_v1.Lock() + mock.calls.GetNvlinkNvlePrivateInfo_v1 = append(mock.calls.GetNvlinkNvlePrivateInfo_v1, callInfo) + mock.lockGetNvlinkNvlePrivateInfo_v1.Unlock() + return mock.GetNvlinkNvlePrivateInfo_v1Func() +} + +// GetNvlinkNvlePrivateInfo_v1Calls gets all the calls that were made to GetNvlinkNvlePrivateInfo_v1. +// Check the length with: +// +// len(mockedDevice.GetNvlinkNvlePrivateInfo_v1Calls()) +func (mock *Device) GetNvlinkNvlePrivateInfo_v1Calls() []struct { +} { + var calls []struct { + } + mock.lockGetNvlinkNvlePrivateInfo_v1.RLock() + calls = mock.calls.GetNvlinkNvlePrivateInfo_v1 + mock.lockGetNvlinkNvlePrivateInfo_v1.RUnlock() + return calls +} + +// GetNvlinkRemapTableInfo_v1 calls GetNvlinkRemapTableInfo_v1Func. +func (mock *Device) GetNvlinkRemapTableInfo_v1() (nvml.NvlinkGetRemapTableInfo_v1, nvml.Return) { + if mock.GetNvlinkRemapTableInfo_v1Func == nil { + panic("Device.GetNvlinkRemapTableInfo_v1Func: method is nil but Device.GetNvlinkRemapTableInfo_v1 was just called") + } + callInfo := struct { + }{} + mock.lockGetNvlinkRemapTableInfo_v1.Lock() + mock.calls.GetNvlinkRemapTableInfo_v1 = append(mock.calls.GetNvlinkRemapTableInfo_v1, callInfo) + mock.lockGetNvlinkRemapTableInfo_v1.Unlock() + return mock.GetNvlinkRemapTableInfo_v1Func() +} + +// GetNvlinkRemapTableInfo_v1Calls gets all the calls that were made to GetNvlinkRemapTableInfo_v1. +// Check the length with: +// +// len(mockedDevice.GetNvlinkRemapTableInfo_v1Calls()) +func (mock *Device) GetNvlinkRemapTableInfo_v1Calls() []struct { +} { + var calls []struct { + } + mock.lockGetNvlinkRemapTableInfo_v1.RLock() + calls = mock.calls.GetNvlinkRemapTableInfo_v1 + mock.lockGetNvlinkRemapTableInfo_v1.RUnlock() + return calls +} + // GetNvlinkSupportedBwModes calls GetNvlinkSupportedBwModesFunc. func (mock *Device) GetNvlinkSupportedBwModes() (nvml.NvlinkSupportedBwModes, nvml.Return) { if mock.GetNvlinkSupportedBwModesFunc == nil { @@ -8351,7 +8535,7 @@ func (mock *Device) GetSupportedEventTypesCalls() []struct { } // GetSupportedGraphicsClocks calls GetSupportedGraphicsClocksFunc. -func (mock *Device) GetSupportedGraphicsClocks(n int) (int, uint32, nvml.Return) { +func (mock *Device) GetSupportedGraphicsClocks(n int) ([]uint32, nvml.Return) { if mock.GetSupportedGraphicsClocksFunc == nil { panic("Device.GetSupportedGraphicsClocksFunc: method is nil but Device.GetSupportedGraphicsClocks was just called") } @@ -8383,7 +8567,7 @@ func (mock *Device) GetSupportedGraphicsClocksCalls() []struct { } // GetSupportedMemoryClocks calls GetSupportedMemoryClocksFunc. -func (mock *Device) GetSupportedMemoryClocks() (int, uint32, nvml.Return) { +func (mock *Device) GetSupportedMemoryClocks() ([]uint32, nvml.Return) { if mock.GetSupportedMemoryClocksFunc == nil { panic("Device.GetSupportedMemoryClocksFunc: method is nil but Device.GetSupportedMemoryClocks was just called") } @@ -9533,6 +9717,38 @@ func (mock *Device) IsMigDeviceHandleCalls() []struct { return calls } +// LockNvlinkRemapTable_v1 calls LockNvlinkRemapTable_v1Func. +func (mock *Device) LockNvlinkRemapTable_v1(nvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1) nvml.Return { + if mock.LockNvlinkRemapTable_v1Func == nil { + panic("Device.LockNvlinkRemapTable_v1Func: method is nil but Device.LockNvlinkRemapTable_v1 was just called") + } + callInfo := struct { + NvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1 + }{ + NvlinkLockRemapTable_v1: nvlinkLockRemapTable_v1, + } + mock.lockLockNvlinkRemapTable_v1.Lock() + mock.calls.LockNvlinkRemapTable_v1 = append(mock.calls.LockNvlinkRemapTable_v1, callInfo) + mock.lockLockNvlinkRemapTable_v1.Unlock() + return mock.LockNvlinkRemapTable_v1Func(nvlinkLockRemapTable_v1) +} + +// LockNvlinkRemapTable_v1Calls gets all the calls that were made to LockNvlinkRemapTable_v1. +// Check the length with: +// +// len(mockedDevice.LockNvlinkRemapTable_v1Calls()) +func (mock *Device) LockNvlinkRemapTable_v1Calls() []struct { + NvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1 +} { + var calls []struct { + NvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1 + } + mock.lockLockNvlinkRemapTable_v1.RLock() + calls = mock.calls.LockNvlinkRemapTable_v1 + mock.lockLockNvlinkRemapTable_v1.RUnlock() + return calls +} + // OnSameBoard calls OnSameBoardFunc. func (mock *Device) OnSameBoard(device nvml.Device) (int, nvml.Return) { if mock.OnSameBoardFunc == nil { @@ -10884,6 +11100,38 @@ func (mock *Device) SetNvlinkBwModeAsync_v1Calls() []struct { return calls } +// SetNvlinkNvleReady_v1 calls SetNvlinkNvleReady_v1Func. +func (mock *Device) SetNvlinkNvleReady_v1(nvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1) nvml.Return { + if mock.SetNvlinkNvleReady_v1Func == nil { + panic("Device.SetNvlinkNvleReady_v1Func: method is nil but Device.SetNvlinkNvleReady_v1 was just called") + } + callInfo := struct { + NvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1 + }{ + NvlinkSetNvleReady_v1: nvlinkSetNvleReady_v1, + } + mock.lockSetNvlinkNvleReady_v1.Lock() + mock.calls.SetNvlinkNvleReady_v1 = append(mock.calls.SetNvlinkNvleReady_v1, callInfo) + mock.lockSetNvlinkNvleReady_v1.Unlock() + return mock.SetNvlinkNvleReady_v1Func(nvlinkSetNvleReady_v1) +} + +// SetNvlinkNvleReady_v1Calls gets all the calls that were made to SetNvlinkNvleReady_v1. +// Check the length with: +// +// len(mockedDevice.SetNvlinkNvleReady_v1Calls()) +func (mock *Device) SetNvlinkNvleReady_v1Calls() []struct { + NvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1 +} { + var calls []struct { + NvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1 + } + mock.lockSetNvlinkNvleReady_v1.RLock() + calls = mock.calls.SetNvlinkNvleReady_v1 + mock.lockSetNvlinkNvleReady_v1.RUnlock() + return calls +} + // SetPersistenceMode calls SetPersistenceModeFunc. func (mock *Device) SetPersistenceMode(enableState nvml.EnableState) nvml.Return { if mock.SetPersistenceModeFunc == nil { @@ -11212,6 +11460,38 @@ func (mock *Device) SetVirtualizationModeCalls() []struct { return calls } +// SetupNvlinkNvleEncryptionKey_v1 calls SetupNvlinkNvleEncryptionKey_v1Func. +func (mock *Device) SetupNvlinkNvleEncryptionKey_v1(nvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1) nvml.Return { + if mock.SetupNvlinkNvleEncryptionKey_v1Func == nil { + panic("Device.SetupNvlinkNvleEncryptionKey_v1Func: method is nil but Device.SetupNvlinkNvleEncryptionKey_v1 was just called") + } + callInfo := struct { + NvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1 + }{ + NvlinkSetupNvleEncryptionKey_v1: nvlinkSetupNvleEncryptionKey_v1, + } + mock.lockSetupNvlinkNvleEncryptionKey_v1.Lock() + mock.calls.SetupNvlinkNvleEncryptionKey_v1 = append(mock.calls.SetupNvlinkNvleEncryptionKey_v1, callInfo) + mock.lockSetupNvlinkNvleEncryptionKey_v1.Unlock() + return mock.SetupNvlinkNvleEncryptionKey_v1Func(nvlinkSetupNvleEncryptionKey_v1) +} + +// SetupNvlinkNvleEncryptionKey_v1Calls gets all the calls that were made to SetupNvlinkNvleEncryptionKey_v1. +// Check the length with: +// +// len(mockedDevice.SetupNvlinkNvleEncryptionKey_v1Calls()) +func (mock *Device) SetupNvlinkNvleEncryptionKey_v1Calls() []struct { + NvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1 +} { + var calls []struct { + NvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1 + } + mock.lockSetupNvlinkNvleEncryptionKey_v1.RLock() + calls = mock.calls.SetupNvlinkNvleEncryptionKey_v1 + mock.lockSetupNvlinkNvleEncryptionKey_v1.RUnlock() + return calls +} + // ValidateInforom calls ValidateInforomFunc. func (mock *Device) ValidateInforom() nvml.Return { if mock.ValidateInforomFunc == nil { diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go index 508e974..e33be88 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go @@ -303,6 +303,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetGpuOperationModeFunc: func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { // panic("mock out the DeviceGetGpuOperationMode method") // }, +// DeviceGetGpuUptime_v1Func: func(device nvml.Device) (nvml.GpuUptime_v1, nvml.Return) { +// panic("mock out the DeviceGetGpuUptime_v1 method") +// }, // DeviceGetGraphicsRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { // panic("mock out the DeviceGetGraphicsRunningProcesses method") // }, @@ -444,6 +447,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetNvLinkInfoFunc: func(device nvml.Device) nvml.NvLinkInfoHandler { // panic("mock out the DeviceGetNvLinkInfo method") // }, +// DeviceGetNvLinkInfo_v3Func: func(device nvml.Device) (nvml.NvLinkInfo_v3, nvml.Return) { +// panic("mock out the DeviceGetNvLinkInfo_v3 method") +// }, // DeviceGetNvLinkRemoteDeviceTypeFunc: func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) { // panic("mock out the DeviceGetNvLinkRemoteDeviceType method") // }, @@ -468,6 +474,12 @@ var _ nvml.Interface = &Interface{} // DeviceGetNvlinkBwModeFunc: func(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) { // panic("mock out the DeviceGetNvlinkBwMode method") // }, +// DeviceGetNvlinkNvlePrivateInfo_v1Func: func(device nvml.Device) (nvml.NvlinkNvlePrivateInfo_v1, nvml.Return) { +// panic("mock out the DeviceGetNvlinkNvlePrivateInfo_v1 method") +// }, +// DeviceGetNvlinkRemapTableInfo_v1Func: func(device nvml.Device) (nvml.NvlinkGetRemapTableInfo_v1, nvml.Return) { +// panic("mock out the DeviceGetNvlinkRemapTableInfo_v1 method") +// }, // DeviceGetNvlinkSupportedBwModesFunc: func(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) { // panic("mock out the DeviceGetNvlinkSupportedBwModes method") // }, @@ -588,10 +600,10 @@ var _ nvml.Interface = &Interface{} // DeviceGetSupportedEventTypesFunc: func(device nvml.Device) (uint64, nvml.Return) { // panic("mock out the DeviceGetSupportedEventTypes method") // }, -// DeviceGetSupportedGraphicsClocksFunc: func(device nvml.Device, n int) (int, uint32, nvml.Return) { +// DeviceGetSupportedGraphicsClocksFunc: func(device nvml.Device, n int) ([]uint32, nvml.Return) { // panic("mock out the DeviceGetSupportedGraphicsClocks method") // }, -// DeviceGetSupportedMemoryClocksFunc: func(device nvml.Device) (int, uint32, nvml.Return) { +// DeviceGetSupportedMemoryClocksFunc: func(device nvml.Device) ([]uint32, nvml.Return) { // panic("mock out the DeviceGetSupportedMemoryClocks method") // }, // DeviceGetSupportedPerformanceStatesFunc: func(device nvml.Device) ([]nvml.Pstates, nvml.Return) { @@ -690,6 +702,9 @@ var _ nvml.Interface = &Interface{} // DeviceIsMigDeviceHandleFunc: func(device nvml.Device) (bool, nvml.Return) { // panic("mock out the DeviceIsMigDeviceHandle method") // }, +// DeviceLockNvlinkRemapTable_v1Func: func(device nvml.Device, nvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1) nvml.Return { +// panic("mock out the DeviceLockNvlinkRemapTable_v1 method") +// }, // DeviceModifyDrainStateFunc: func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return { // panic("mock out the DeviceModifyDrainState method") // }, @@ -825,6 +840,9 @@ var _ nvml.Interface = &Interface{} // DeviceSetNvlinkBwModeAsync_v1Func: func(device nvml.Device, nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return { // panic("mock out the DeviceSetNvlinkBwModeAsync_v1 method") // }, +// DeviceSetNvlinkNvleReady_v1Func: func(device nvml.Device, nvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1) nvml.Return { +// panic("mock out the DeviceSetNvlinkNvleReady_v1 method") +// }, // DeviceSetPersistenceModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { // panic("mock out the DeviceSetPersistenceMode method") // }, @@ -855,6 +873,9 @@ var _ nvml.Interface = &Interface{} // DeviceSetVirtualizationModeFunc: func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { // panic("mock out the DeviceSetVirtualizationMode method") // }, +// DeviceSetupNvlinkNvleEncryptionKey_v1Func: func(device nvml.Device, nvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1) nvml.Return { +// panic("mock out the DeviceSetupNvlinkNvleEncryptionKey_v1 method") +// }, // DeviceValidateInforomFunc: func(device nvml.Device) nvml.Return { // panic("mock out the DeviceValidateInforom method") // }, @@ -1053,6 +1074,9 @@ var _ nvml.Interface = &Interface{} // SystemGetConfComputeSettingsFunc: func() (nvml.SystemConfComputeSettings, nvml.Return) { // panic("mock out the SystemGetConfComputeSettings method") // }, +// SystemGetConfComputeSettings_v2Func: func() (nvml.SystemConfComputeSettings_v2, nvml.Return) { +// panic("mock out the SystemGetConfComputeSettings_v2 method") +// }, // SystemGetConfComputeStateFunc: func() (nvml.ConfComputeSystemState, nvml.Return) { // panic("mock out the SystemGetConfComputeState method") // }, @@ -1531,6 +1555,9 @@ type Interface struct { // DeviceGetGpuOperationModeFunc mocks the DeviceGetGpuOperationMode method. DeviceGetGpuOperationModeFunc func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) + // DeviceGetGpuUptime_v1Func mocks the DeviceGetGpuUptime_v1 method. + DeviceGetGpuUptime_v1Func func(device nvml.Device) (nvml.GpuUptime_v1, nvml.Return) + // DeviceGetGraphicsRunningProcessesFunc mocks the DeviceGetGraphicsRunningProcesses method. DeviceGetGraphicsRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) @@ -1672,6 +1699,9 @@ type Interface struct { // DeviceGetNvLinkInfoFunc mocks the DeviceGetNvLinkInfo method. DeviceGetNvLinkInfoFunc func(device nvml.Device) nvml.NvLinkInfoHandler + // DeviceGetNvLinkInfo_v3Func mocks the DeviceGetNvLinkInfo_v3 method. + DeviceGetNvLinkInfo_v3Func func(device nvml.Device) (nvml.NvLinkInfo_v3, nvml.Return) + // DeviceGetNvLinkRemoteDeviceTypeFunc mocks the DeviceGetNvLinkRemoteDeviceType method. DeviceGetNvLinkRemoteDeviceTypeFunc func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) @@ -1696,6 +1726,12 @@ type Interface struct { // DeviceGetNvlinkBwModeFunc mocks the DeviceGetNvlinkBwMode method. DeviceGetNvlinkBwModeFunc func(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) + // DeviceGetNvlinkNvlePrivateInfo_v1Func mocks the DeviceGetNvlinkNvlePrivateInfo_v1 method. + DeviceGetNvlinkNvlePrivateInfo_v1Func func(device nvml.Device) (nvml.NvlinkNvlePrivateInfo_v1, nvml.Return) + + // DeviceGetNvlinkRemapTableInfo_v1Func mocks the DeviceGetNvlinkRemapTableInfo_v1 method. + DeviceGetNvlinkRemapTableInfo_v1Func func(device nvml.Device) (nvml.NvlinkGetRemapTableInfo_v1, nvml.Return) + // DeviceGetNvlinkSupportedBwModesFunc mocks the DeviceGetNvlinkSupportedBwModes method. DeviceGetNvlinkSupportedBwModesFunc func(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) @@ -1817,10 +1853,10 @@ type Interface struct { DeviceGetSupportedEventTypesFunc func(device nvml.Device) (uint64, nvml.Return) // DeviceGetSupportedGraphicsClocksFunc mocks the DeviceGetSupportedGraphicsClocks method. - DeviceGetSupportedGraphicsClocksFunc func(device nvml.Device, n int) (int, uint32, nvml.Return) + DeviceGetSupportedGraphicsClocksFunc func(device nvml.Device, n int) ([]uint32, nvml.Return) // DeviceGetSupportedMemoryClocksFunc mocks the DeviceGetSupportedMemoryClocks method. - DeviceGetSupportedMemoryClocksFunc func(device nvml.Device) (int, uint32, nvml.Return) + DeviceGetSupportedMemoryClocksFunc func(device nvml.Device) ([]uint32, nvml.Return) // DeviceGetSupportedPerformanceStatesFunc mocks the DeviceGetSupportedPerformanceStates method. DeviceGetSupportedPerformanceStatesFunc func(device nvml.Device) ([]nvml.Pstates, nvml.Return) @@ -1918,6 +1954,9 @@ type Interface struct { // DeviceIsMigDeviceHandleFunc mocks the DeviceIsMigDeviceHandle method. DeviceIsMigDeviceHandleFunc func(device nvml.Device) (bool, nvml.Return) + // DeviceLockNvlinkRemapTable_v1Func mocks the DeviceLockNvlinkRemapTable_v1 method. + DeviceLockNvlinkRemapTable_v1Func func(device nvml.Device, nvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1) nvml.Return + // DeviceModifyDrainStateFunc mocks the DeviceModifyDrainState method. DeviceModifyDrainStateFunc func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return @@ -2053,6 +2092,9 @@ type Interface struct { // DeviceSetNvlinkBwModeAsync_v1Func mocks the DeviceSetNvlinkBwModeAsync_v1 method. DeviceSetNvlinkBwModeAsync_v1Func func(device nvml.Device, nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return + // DeviceSetNvlinkNvleReady_v1Func mocks the DeviceSetNvlinkNvleReady_v1 method. + DeviceSetNvlinkNvleReady_v1Func func(device nvml.Device, nvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1) nvml.Return + // DeviceSetPersistenceModeFunc mocks the DeviceSetPersistenceMode method. DeviceSetPersistenceModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return @@ -2083,6 +2125,9 @@ type Interface struct { // DeviceSetVirtualizationModeFunc mocks the DeviceSetVirtualizationMode method. DeviceSetVirtualizationModeFunc func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return + // DeviceSetupNvlinkNvleEncryptionKey_v1Func mocks the DeviceSetupNvlinkNvleEncryptionKey_v1 method. + DeviceSetupNvlinkNvleEncryptionKey_v1Func func(device nvml.Device, nvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1) nvml.Return + // DeviceValidateInforomFunc mocks the DeviceValidateInforom method. DeviceValidateInforomFunc func(device nvml.Device) nvml.Return @@ -2281,6 +2326,9 @@ type Interface struct { // SystemGetConfComputeSettingsFunc mocks the SystemGetConfComputeSettings method. SystemGetConfComputeSettingsFunc func() (nvml.SystemConfComputeSettings, nvml.Return) + // SystemGetConfComputeSettings_v2Func mocks the SystemGetConfComputeSettings_v2 method. + SystemGetConfComputeSettings_v2Func func() (nvml.SystemConfComputeSettings_v2, nvml.Return) + // SystemGetConfComputeStateFunc mocks the SystemGetConfComputeState method. SystemGetConfComputeStateFunc func() (nvml.ConfComputeSystemState, nvml.Return) @@ -3006,6 +3054,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetGpuUptime_v1 holds details about calls to the DeviceGetGpuUptime_v1 method. + DeviceGetGpuUptime_v1 []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetGraphicsRunningProcesses holds details about calls to the DeviceGetGraphicsRunningProcesses method. DeviceGetGraphicsRunningProcesses []struct { // Device is the device argument value. @@ -3273,6 +3326,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetNvLinkInfo_v3 holds details about calls to the DeviceGetNvLinkInfo_v3 method. + DeviceGetNvLinkInfo_v3 []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetNvLinkRemoteDeviceType holds details about calls to the DeviceGetNvLinkRemoteDeviceType method. DeviceGetNvLinkRemoteDeviceType []struct { // Device is the device argument value. @@ -3331,6 +3389,16 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetNvlinkNvlePrivateInfo_v1 holds details about calls to the DeviceGetNvlinkNvlePrivateInfo_v1 method. + DeviceGetNvlinkNvlePrivateInfo_v1 []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetNvlinkRemapTableInfo_v1 holds details about calls to the DeviceGetNvlinkRemapTableInfo_v1 method. + DeviceGetNvlinkRemapTableInfo_v1 []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetNvlinkSupportedBwModes holds details about calls to the DeviceGetNvlinkSupportedBwModes method. DeviceGetNvlinkSupportedBwModes []struct { // Device is the device argument value. @@ -3753,6 +3821,13 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceLockNvlinkRemapTable_v1 holds details about calls to the DeviceLockNvlinkRemapTable_v1 method. + DeviceLockNvlinkRemapTable_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // NvlinkLockRemapTable_v1 is the nvlinkLockRemapTable_v1 argument value. + NvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1 + } // DeviceModifyDrainState holds details about calls to the DeviceModifyDrainState method. DeviceModifyDrainState []struct { // PciInfo is the pciInfo argument value. @@ -4088,6 +4163,13 @@ type Interface struct { // NvlinkSetBwModeAsync_v1 is the nvlinkSetBwModeAsync_v1 argument value. NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 } + // DeviceSetNvlinkNvleReady_v1 holds details about calls to the DeviceSetNvlinkNvleReady_v1 method. + DeviceSetNvlinkNvleReady_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // NvlinkSetNvleReady_v1 is the nvlinkSetNvleReady_v1 argument value. + NvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1 + } // DeviceSetPersistenceMode holds details about calls to the DeviceSetPersistenceMode method. DeviceSetPersistenceMode []struct { // Device is the device argument value. @@ -4162,6 +4244,13 @@ type Interface struct { // GpuVirtualizationMode is the gpuVirtualizationMode argument value. GpuVirtualizationMode nvml.GpuVirtualizationMode } + // DeviceSetupNvlinkNvleEncryptionKey_v1 holds details about calls to the DeviceSetupNvlinkNvleEncryptionKey_v1 method. + DeviceSetupNvlinkNvleEncryptionKey_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // NvlinkSetupNvleEncryptionKey_v1 is the nvlinkSetupNvleEncryptionKey_v1 argument value. + NvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1 + } // DeviceValidateInforom holds details about calls to the DeviceValidateInforom method. DeviceValidateInforom []struct { // Device is the device argument value. @@ -4532,6 +4621,9 @@ type Interface struct { // SystemGetConfComputeSettings holds details about calls to the SystemGetConfComputeSettings method. SystemGetConfComputeSettings []struct { } + // SystemGetConfComputeSettings_v2 holds details about calls to the SystemGetConfComputeSettings_v2 method. + SystemGetConfComputeSettings_v2 []struct { + } // SystemGetConfComputeState holds details about calls to the SystemGetConfComputeState method. SystemGetConfComputeState []struct { } @@ -4934,6 +5026,7 @@ type Interface struct { lockDeviceGetGpuInstances sync.RWMutex lockDeviceGetGpuMaxPcieLinkGeneration sync.RWMutex lockDeviceGetGpuOperationMode sync.RWMutex + lockDeviceGetGpuUptime_v1 sync.RWMutex lockDeviceGetGraphicsRunningProcesses sync.RWMutex lockDeviceGetGridLicensableFeatures sync.RWMutex lockDeviceGetGspFirmwareMode sync.RWMutex @@ -4981,6 +5074,7 @@ type Interface struct { lockDeviceGetNvLinkCapability sync.RWMutex lockDeviceGetNvLinkErrorCounter sync.RWMutex lockDeviceGetNvLinkInfo sync.RWMutex + lockDeviceGetNvLinkInfo_v3 sync.RWMutex lockDeviceGetNvLinkRemoteDeviceType sync.RWMutex lockDeviceGetNvLinkRemotePciInfo sync.RWMutex lockDeviceGetNvLinkState sync.RWMutex @@ -4989,6 +5083,8 @@ type Interface struct { lockDeviceGetNvLinkUtilizationCounter sync.RWMutex lockDeviceGetNvLinkVersion sync.RWMutex lockDeviceGetNvlinkBwMode sync.RWMutex + lockDeviceGetNvlinkNvlePrivateInfo_v1 sync.RWMutex + lockDeviceGetNvlinkRemapTableInfo_v1 sync.RWMutex lockDeviceGetNvlinkSupportedBwModes sync.RWMutex lockDeviceGetOfaUtilization sync.RWMutex lockDeviceGetP2PStatus sync.RWMutex @@ -5063,6 +5159,7 @@ type Interface struct { lockDeviceGetViolationStatus sync.RWMutex lockDeviceGetVirtualizationMode sync.RWMutex lockDeviceIsMigDeviceHandle sync.RWMutex + lockDeviceLockNvlinkRemapTable_v1 sync.RWMutex lockDeviceModifyDrainState sync.RWMutex lockDeviceOnSameBoard sync.RWMutex lockDevicePerfMetricsGetSamples_v1 sync.RWMutex @@ -5108,6 +5205,7 @@ type Interface struct { lockDeviceSetNvLinkUtilizationControl sync.RWMutex lockDeviceSetNvlinkBwMode sync.RWMutex lockDeviceSetNvlinkBwModeAsync_v1 sync.RWMutex + lockDeviceSetNvlinkNvleReady_v1 sync.RWMutex lockDeviceSetPersistenceMode sync.RWMutex lockDeviceSetPowerManagementLimit sync.RWMutex lockDeviceSetPowerManagementLimit_v2 sync.RWMutex @@ -5118,6 +5216,7 @@ type Interface struct { lockDeviceSetVgpuSchedulerState sync.RWMutex lockDeviceSetVgpuSchedulerState_v2 sync.RWMutex lockDeviceSetVirtualizationMode sync.RWMutex + lockDeviceSetupNvlinkNvleEncryptionKey_v1 sync.RWMutex lockDeviceValidateInforom sync.RWMutex lockDeviceVgpuForceGspUnload sync.RWMutex lockDeviceWorkloadPowerProfileClearRequestedProfiles sync.RWMutex @@ -5184,6 +5283,7 @@ type Interface struct { lockSystemGetConfComputeGpusReadyState sync.RWMutex lockSystemGetConfComputeKeyRotationThresholdInfo sync.RWMutex lockSystemGetConfComputeSettings sync.RWMutex + lockSystemGetConfComputeSettings_v2 sync.RWMutex lockSystemGetConfComputeState sync.RWMutex lockSystemGetCudaDriverVersion sync.RWMutex lockSystemGetCudaDriverVersion_v2 sync.RWMutex @@ -8410,6 +8510,38 @@ func (mock *Interface) DeviceGetGpuOperationModeCalls() []struct { return calls } +// DeviceGetGpuUptime_v1 calls DeviceGetGpuUptime_v1Func. +func (mock *Interface) DeviceGetGpuUptime_v1(device nvml.Device) (nvml.GpuUptime_v1, nvml.Return) { + if mock.DeviceGetGpuUptime_v1Func == nil { + panic("Interface.DeviceGetGpuUptime_v1Func: method is nil but Interface.DeviceGetGpuUptime_v1 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGpuUptime_v1.Lock() + mock.calls.DeviceGetGpuUptime_v1 = append(mock.calls.DeviceGetGpuUptime_v1, callInfo) + mock.lockDeviceGetGpuUptime_v1.Unlock() + return mock.DeviceGetGpuUptime_v1Func(device) +} + +// DeviceGetGpuUptime_v1Calls gets all the calls that were made to DeviceGetGpuUptime_v1. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuUptime_v1Calls()) +func (mock *Interface) DeviceGetGpuUptime_v1Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGpuUptime_v1.RLock() + calls = mock.calls.DeviceGetGpuUptime_v1 + mock.lockDeviceGetGpuUptime_v1.RUnlock() + return calls +} + // DeviceGetGraphicsRunningProcesses calls DeviceGetGraphicsRunningProcessesFunc. func (mock *Interface) DeviceGetGraphicsRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { if mock.DeviceGetGraphicsRunningProcessesFunc == nil { @@ -9978,6 +10110,38 @@ func (mock *Interface) DeviceGetNvLinkInfoCalls() []struct { return calls } +// DeviceGetNvLinkInfo_v3 calls DeviceGetNvLinkInfo_v3Func. +func (mock *Interface) DeviceGetNvLinkInfo_v3(device nvml.Device) (nvml.NvLinkInfo_v3, nvml.Return) { + if mock.DeviceGetNvLinkInfo_v3Func == nil { + panic("Interface.DeviceGetNvLinkInfo_v3Func: method is nil but Interface.DeviceGetNvLinkInfo_v3 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNvLinkInfo_v3.Lock() + mock.calls.DeviceGetNvLinkInfo_v3 = append(mock.calls.DeviceGetNvLinkInfo_v3, callInfo) + mock.lockDeviceGetNvLinkInfo_v3.Unlock() + return mock.DeviceGetNvLinkInfo_v3Func(device) +} + +// DeviceGetNvLinkInfo_v3Calls gets all the calls that were made to DeviceGetNvLinkInfo_v3. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkInfo_v3Calls()) +func (mock *Interface) DeviceGetNvLinkInfo_v3Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNvLinkInfo_v3.RLock() + calls = mock.calls.DeviceGetNvLinkInfo_v3 + mock.lockDeviceGetNvLinkInfo_v3.RUnlock() + return calls +} + // DeviceGetNvLinkRemoteDeviceType calls DeviceGetNvLinkRemoteDeviceTypeFunc. func (mock *Interface) DeviceGetNvLinkRemoteDeviceType(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) { if mock.DeviceGetNvLinkRemoteDeviceTypeFunc == nil { @@ -10270,6 +10434,70 @@ func (mock *Interface) DeviceGetNvlinkBwModeCalls() []struct { return calls } +// DeviceGetNvlinkNvlePrivateInfo_v1 calls DeviceGetNvlinkNvlePrivateInfo_v1Func. +func (mock *Interface) DeviceGetNvlinkNvlePrivateInfo_v1(device nvml.Device) (nvml.NvlinkNvlePrivateInfo_v1, nvml.Return) { + if mock.DeviceGetNvlinkNvlePrivateInfo_v1Func == nil { + panic("Interface.DeviceGetNvlinkNvlePrivateInfo_v1Func: method is nil but Interface.DeviceGetNvlinkNvlePrivateInfo_v1 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNvlinkNvlePrivateInfo_v1.Lock() + mock.calls.DeviceGetNvlinkNvlePrivateInfo_v1 = append(mock.calls.DeviceGetNvlinkNvlePrivateInfo_v1, callInfo) + mock.lockDeviceGetNvlinkNvlePrivateInfo_v1.Unlock() + return mock.DeviceGetNvlinkNvlePrivateInfo_v1Func(device) +} + +// DeviceGetNvlinkNvlePrivateInfo_v1Calls gets all the calls that were made to DeviceGetNvlinkNvlePrivateInfo_v1. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvlinkNvlePrivateInfo_v1Calls()) +func (mock *Interface) DeviceGetNvlinkNvlePrivateInfo_v1Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNvlinkNvlePrivateInfo_v1.RLock() + calls = mock.calls.DeviceGetNvlinkNvlePrivateInfo_v1 + mock.lockDeviceGetNvlinkNvlePrivateInfo_v1.RUnlock() + return calls +} + +// DeviceGetNvlinkRemapTableInfo_v1 calls DeviceGetNvlinkRemapTableInfo_v1Func. +func (mock *Interface) DeviceGetNvlinkRemapTableInfo_v1(device nvml.Device) (nvml.NvlinkGetRemapTableInfo_v1, nvml.Return) { + if mock.DeviceGetNvlinkRemapTableInfo_v1Func == nil { + panic("Interface.DeviceGetNvlinkRemapTableInfo_v1Func: method is nil but Interface.DeviceGetNvlinkRemapTableInfo_v1 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNvlinkRemapTableInfo_v1.Lock() + mock.calls.DeviceGetNvlinkRemapTableInfo_v1 = append(mock.calls.DeviceGetNvlinkRemapTableInfo_v1, callInfo) + mock.lockDeviceGetNvlinkRemapTableInfo_v1.Unlock() + return mock.DeviceGetNvlinkRemapTableInfo_v1Func(device) +} + +// DeviceGetNvlinkRemapTableInfo_v1Calls gets all the calls that were made to DeviceGetNvlinkRemapTableInfo_v1. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvlinkRemapTableInfo_v1Calls()) +func (mock *Interface) DeviceGetNvlinkRemapTableInfo_v1Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNvlinkRemapTableInfo_v1.RLock() + calls = mock.calls.DeviceGetNvlinkRemapTableInfo_v1 + mock.lockDeviceGetNvlinkRemapTableInfo_v1.RUnlock() + return calls +} + // DeviceGetNvlinkSupportedBwModes calls DeviceGetNvlinkSupportedBwModesFunc. func (mock *Interface) DeviceGetNvlinkSupportedBwModes(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) { if mock.DeviceGetNvlinkSupportedBwModesFunc == nil { @@ -11587,7 +11815,7 @@ func (mock *Interface) DeviceGetSupportedEventTypesCalls() []struct { } // DeviceGetSupportedGraphicsClocks calls DeviceGetSupportedGraphicsClocksFunc. -func (mock *Interface) DeviceGetSupportedGraphicsClocks(device nvml.Device, n int) (int, uint32, nvml.Return) { +func (mock *Interface) DeviceGetSupportedGraphicsClocks(device nvml.Device, n int) ([]uint32, nvml.Return) { if mock.DeviceGetSupportedGraphicsClocksFunc == nil { panic("Interface.DeviceGetSupportedGraphicsClocksFunc: method is nil but Interface.DeviceGetSupportedGraphicsClocks was just called") } @@ -11623,7 +11851,7 @@ func (mock *Interface) DeviceGetSupportedGraphicsClocksCalls() []struct { } // DeviceGetSupportedMemoryClocks calls DeviceGetSupportedMemoryClocksFunc. -func (mock *Interface) DeviceGetSupportedMemoryClocks(device nvml.Device) (int, uint32, nvml.Return) { +func (mock *Interface) DeviceGetSupportedMemoryClocks(device nvml.Device) ([]uint32, nvml.Return) { if mock.DeviceGetSupportedMemoryClocksFunc == nil { panic("Interface.DeviceGetSupportedMemoryClocksFunc: method is nil but Interface.DeviceGetSupportedMemoryClocks was just called") } @@ -12742,6 +12970,42 @@ func (mock *Interface) DeviceIsMigDeviceHandleCalls() []struct { return calls } +// DeviceLockNvlinkRemapTable_v1 calls DeviceLockNvlinkRemapTable_v1Func. +func (mock *Interface) DeviceLockNvlinkRemapTable_v1(device nvml.Device, nvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1) nvml.Return { + if mock.DeviceLockNvlinkRemapTable_v1Func == nil { + panic("Interface.DeviceLockNvlinkRemapTable_v1Func: method is nil but Interface.DeviceLockNvlinkRemapTable_v1 was just called") + } + callInfo := struct { + Device nvml.Device + NvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1 + }{ + Device: device, + NvlinkLockRemapTable_v1: nvlinkLockRemapTable_v1, + } + mock.lockDeviceLockNvlinkRemapTable_v1.Lock() + mock.calls.DeviceLockNvlinkRemapTable_v1 = append(mock.calls.DeviceLockNvlinkRemapTable_v1, callInfo) + mock.lockDeviceLockNvlinkRemapTable_v1.Unlock() + return mock.DeviceLockNvlinkRemapTable_v1Func(device, nvlinkLockRemapTable_v1) +} + +// DeviceLockNvlinkRemapTable_v1Calls gets all the calls that were made to DeviceLockNvlinkRemapTable_v1. +// Check the length with: +// +// len(mockedInterface.DeviceLockNvlinkRemapTable_v1Calls()) +func (mock *Interface) DeviceLockNvlinkRemapTable_v1Calls() []struct { + Device nvml.Device + NvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1 +} { + var calls []struct { + Device nvml.Device + NvlinkLockRemapTable_v1 *nvml.NvlinkLockRemapTable_v1 + } + mock.lockDeviceLockNvlinkRemapTable_v1.RLock() + calls = mock.calls.DeviceLockNvlinkRemapTable_v1 + mock.lockDeviceLockNvlinkRemapTable_v1.RUnlock() + return calls +} + // DeviceModifyDrainState calls DeviceModifyDrainStateFunc. func (mock *Interface) DeviceModifyDrainState(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return { if mock.DeviceModifyDrainStateFunc == nil { @@ -14402,6 +14666,42 @@ func (mock *Interface) DeviceSetNvlinkBwModeAsync_v1Calls() []struct { return calls } +// DeviceSetNvlinkNvleReady_v1 calls DeviceSetNvlinkNvleReady_v1Func. +func (mock *Interface) DeviceSetNvlinkNvleReady_v1(device nvml.Device, nvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1) nvml.Return { + if mock.DeviceSetNvlinkNvleReady_v1Func == nil { + panic("Interface.DeviceSetNvlinkNvleReady_v1Func: method is nil but Interface.DeviceSetNvlinkNvleReady_v1 was just called") + } + callInfo := struct { + Device nvml.Device + NvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1 + }{ + Device: device, + NvlinkSetNvleReady_v1: nvlinkSetNvleReady_v1, + } + mock.lockDeviceSetNvlinkNvleReady_v1.Lock() + mock.calls.DeviceSetNvlinkNvleReady_v1 = append(mock.calls.DeviceSetNvlinkNvleReady_v1, callInfo) + mock.lockDeviceSetNvlinkNvleReady_v1.Unlock() + return mock.DeviceSetNvlinkNvleReady_v1Func(device, nvlinkSetNvleReady_v1) +} + +// DeviceSetNvlinkNvleReady_v1Calls gets all the calls that were made to DeviceSetNvlinkNvleReady_v1. +// Check the length with: +// +// len(mockedInterface.DeviceSetNvlinkNvleReady_v1Calls()) +func (mock *Interface) DeviceSetNvlinkNvleReady_v1Calls() []struct { + Device nvml.Device + NvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1 +} { + var calls []struct { + Device nvml.Device + NvlinkSetNvleReady_v1 *nvml.NvlinkSetNvleReady_v1 + } + mock.lockDeviceSetNvlinkNvleReady_v1.RLock() + calls = mock.calls.DeviceSetNvlinkNvleReady_v1 + mock.lockDeviceSetNvlinkNvleReady_v1.RUnlock() + return calls +} + // DeviceSetPersistenceMode calls DeviceSetPersistenceModeFunc. func (mock *Interface) DeviceSetPersistenceMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { if mock.DeviceSetPersistenceModeFunc == nil { @@ -14770,6 +15070,42 @@ func (mock *Interface) DeviceSetVirtualizationModeCalls() []struct { return calls } +// DeviceSetupNvlinkNvleEncryptionKey_v1 calls DeviceSetupNvlinkNvleEncryptionKey_v1Func. +func (mock *Interface) DeviceSetupNvlinkNvleEncryptionKey_v1(device nvml.Device, nvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1) nvml.Return { + if mock.DeviceSetupNvlinkNvleEncryptionKey_v1Func == nil { + panic("Interface.DeviceSetupNvlinkNvleEncryptionKey_v1Func: method is nil but Interface.DeviceSetupNvlinkNvleEncryptionKey_v1 was just called") + } + callInfo := struct { + Device nvml.Device + NvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1 + }{ + Device: device, + NvlinkSetupNvleEncryptionKey_v1: nvlinkSetupNvleEncryptionKey_v1, + } + mock.lockDeviceSetupNvlinkNvleEncryptionKey_v1.Lock() + mock.calls.DeviceSetupNvlinkNvleEncryptionKey_v1 = append(mock.calls.DeviceSetupNvlinkNvleEncryptionKey_v1, callInfo) + mock.lockDeviceSetupNvlinkNvleEncryptionKey_v1.Unlock() + return mock.DeviceSetupNvlinkNvleEncryptionKey_v1Func(device, nvlinkSetupNvleEncryptionKey_v1) +} + +// DeviceSetupNvlinkNvleEncryptionKey_v1Calls gets all the calls that were made to DeviceSetupNvlinkNvleEncryptionKey_v1. +// Check the length with: +// +// len(mockedInterface.DeviceSetupNvlinkNvleEncryptionKey_v1Calls()) +func (mock *Interface) DeviceSetupNvlinkNvleEncryptionKey_v1Calls() []struct { + Device nvml.Device + NvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1 +} { + var calls []struct { + Device nvml.Device + NvlinkSetupNvleEncryptionKey_v1 *nvml.NvlinkSetupNvleEncryptionKey_v1 + } + mock.lockDeviceSetupNvlinkNvleEncryptionKey_v1.RLock() + calls = mock.calls.DeviceSetupNvlinkNvleEncryptionKey_v1 + mock.lockDeviceSetupNvlinkNvleEncryptionKey_v1.RUnlock() + return calls +} + // DeviceValidateInforom calls DeviceValidateInforomFunc. func (mock *Interface) DeviceValidateInforom(device nvml.Device) nvml.Return { if mock.DeviceValidateInforomFunc == nil { @@ -16951,6 +17287,33 @@ func (mock *Interface) SystemGetConfComputeSettingsCalls() []struct { return calls } +// SystemGetConfComputeSettings_v2 calls SystemGetConfComputeSettings_v2Func. +func (mock *Interface) SystemGetConfComputeSettings_v2() (nvml.SystemConfComputeSettings_v2, nvml.Return) { + if mock.SystemGetConfComputeSettings_v2Func == nil { + panic("Interface.SystemGetConfComputeSettings_v2Func: method is nil but Interface.SystemGetConfComputeSettings_v2 was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetConfComputeSettings_v2.Lock() + mock.calls.SystemGetConfComputeSettings_v2 = append(mock.calls.SystemGetConfComputeSettings_v2, callInfo) + mock.lockSystemGetConfComputeSettings_v2.Unlock() + return mock.SystemGetConfComputeSettings_v2Func() +} + +// SystemGetConfComputeSettings_v2Calls gets all the calls that were made to SystemGetConfComputeSettings_v2. +// Check the length with: +// +// len(mockedInterface.SystemGetConfComputeSettings_v2Calls()) +func (mock *Interface) SystemGetConfComputeSettings_v2Calls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetConfComputeSettings_v2.RLock() + calls = mock.calls.SystemGetConfComputeSettings_v2 + mock.lockSystemGetConfComputeSettings_v2.RUnlock() + return calls +} + // SystemGetConfComputeState calls SystemGetConfComputeStateFunc. func (mock *Interface) SystemGetConfComputeState() (nvml.ConfComputeSystemState, nvml.Return) { if mock.SystemGetConfComputeStateFunc == nil { diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go index df0a700..9d4d5b8 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go @@ -531,6 +531,15 @@ func nvmlDeviceGetBBXTimeData_v1(nvmlDevice nvmlDevice, TimeData *BBXTimeData_v1 return __v } +// nvmlDeviceGetGpuUptime_v1 function as declared in nvml/nvml.h +func nvmlDeviceGetGpuUptime_v1(nvmlDevice nvmlDevice, Uptime *GpuUptime_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cUptime, _ := (*C.nvmlGpuUptime_v1_t)(unsafe.Pointer(Uptime)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetGpuUptime_v1(cnvmlDevice, cUptime) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetDisplayMode function as declared in nvml/nvml.h func nvmlDeviceGetDisplayMode(nvmlDevice nvmlDevice, Display *EnableState) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -1689,6 +1698,14 @@ func nvmlSystemGetConfComputeSettings(Settings *SystemConfComputeSettings) Retur return __v } +// nvmlSystemGetConfComputeSettings_v2 function as declared in nvml/nvml.h +func nvmlSystemGetConfComputeSettings_v2(Settings *SystemConfComputeSettings_v2) Return { + cSettings, _ := (*C.nvmlSystemConfComputeSettings_v2_t)(unsafe.Pointer(Settings)), cgoAllocsUnknown + __ret := C.nvmlSystemGetConfComputeSettings_v2(cSettings) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetGspFirmwareVersion function as declared in nvml/nvml.h func nvmlDeviceGetGspFirmwareVersion(nvmlDevice nvmlDevice, Version *byte) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -2336,6 +2353,15 @@ func nvmlDeviceGetNvLinkInfo(nvmlDevice nvmlDevice, Info *NvLinkInfo) Return { return __v } +// nvmlDeviceGetNvLinkInfo_v3 function as declared in nvml/nvml.h +func nvmlDeviceGetNvLinkInfo_v3(nvmlDevice nvmlDevice, Info *NvLinkInfo_v3) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cInfo, _ := (*C.nvmlNvLinkInfo_v3_t)(unsafe.Pointer(Info)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetNvLinkInfo_v3(cnvmlDevice, cInfo) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetNvLinkTelemetrySamples_v1 function as declared in nvml/nvml.h func nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice nvmlDevice, Samples *NvlinkTelemetrySamples_v1) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -2345,6 +2371,51 @@ func nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice nvmlDevice, Samples *Nvli return __v } +// nvmlDeviceGetNvlinkRemapTableInfo_v1 function as declared in nvml/nvml.h +func nvmlDeviceGetNvlinkRemapTableInfo_v1(nvmlDevice nvmlDevice, RemapTableInfo *NvlinkGetRemapTableInfo_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cRemapTableInfo, _ := (*C.nvmlNvlinkGetRemapTableInfo_v1_t)(unsafe.Pointer(RemapTableInfo)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetNvlinkRemapTableInfo_v1(cnvmlDevice, cRemapTableInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceSetNvlinkNvleReady_v1 function as declared in nvml/nvml.h +func nvmlDeviceSetNvlinkNvleReady_v1(nvmlDevice nvmlDevice, SetNvleReady *NvlinkSetNvleReady_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cSetNvleReady, _ := (*C.nvmlNvlinkSetNvleReady_v1_t)(unsafe.Pointer(SetNvleReady)), cgoAllocsUnknown + __ret := C.nvmlDeviceSetNvlinkNvleReady_v1(cnvmlDevice, cSetNvleReady) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceLockNvlinkRemapTable_v1 function as declared in nvml/nvml.h +func nvmlDeviceLockNvlinkRemapTable_v1(nvmlDevice nvmlDevice, RemapTableLockInfo *NvlinkLockRemapTable_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cRemapTableLockInfo, _ := (*C.nvmlNvlinkLockRemapTable_v1_t)(unsafe.Pointer(RemapTableLockInfo)), cgoAllocsUnknown + __ret := C.nvmlDeviceLockNvlinkRemapTable_v1(cnvmlDevice, cRemapTableLockInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceSetupNvlinkNvleEncryptionKey_v1 function as declared in nvml/nvml.h +func nvmlDeviceSetupNvlinkNvleEncryptionKey_v1(nvmlDevice nvmlDevice, EncryptionKey *NvlinkSetupNvleEncryptionKey_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cEncryptionKey, _ := (*C.nvmlNvlinkSetupNvleEncryptionKey_v1_t)(unsafe.Pointer(EncryptionKey)), cgoAllocsUnknown + __ret := C.nvmlDeviceSetupNvlinkNvleEncryptionKey_v1(cnvmlDevice, cEncryptionKey) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceGetNvlinkNvlePrivateInfo_v1 function as declared in nvml/nvml.h +func nvmlDeviceGetNvlinkNvlePrivateInfo_v1(nvmlDevice nvmlDevice, PrivateInfo *NvlinkNvlePrivateInfo_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cPrivateInfo, _ := (*C.nvmlNvlinkNvlePrivateInfo_v1_t)(unsafe.Pointer(PrivateInfo)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetNvlinkNvlePrivateInfo_v1(cnvmlDevice, cPrivateInfo) + __v := (Return)(__ret) + return __v +} + // nvmlEventSetCreate function as declared in nvml/nvml.h func nvmlEventSetCreate(Set *nvmlEventSet) Return { cSet, _ := (*C.nvmlEventSet_t)(unsafe.Pointer(Set)), cgoAllocsUnknown diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h index d02cd64..6993e1e 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h @@ -1,5 +1,5 @@ -/*** NVML VERSION: 13.4.92 ***/ -/*** From https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvml_dev/linux-x86_64/cuda_nvml_dev-linux-x86_64-13.4.92-archive.tar.xz ***/ +/*** NVML VERSION: 13.5.37 ***/ +/*** From https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvml_dev/linux-x86_64/cuda_nvml_dev-linux-x86_64-13.5.37-archive.tar.xz ***/ /* * Copyright 1993-2026 NVIDIA Corporation. All rights reserved. * @@ -1089,6 +1089,13 @@ typedef struct unsigned int timeRun; //!< [out] Cumulative number of seconds the GPU has had the driver loaded } nvmlBBXTimeData_v1_t; +/** + * GPU Uptime + */ +typedef struct { + unsigned int uptime; //!< [out] Number of seconds the GPU has been up since it was initialized by the driver +} nvmlGpuUptime_v1_t; + /** @} */ /***************************************************************************************************/ @@ -1147,8 +1154,8 @@ typedef enum nvmlBrandType_enum NVML_BRAND_GEFORCE_RTX = 15, // Unused NVML_BRAND_TITAN_RTX = 16, // Unused NVML_BRAND_NVIDIA_DLA = 17, // Deprecated NVIDIA Deep Learning Accelerator - NVML_BRAND_NVIDIA_VGAMEDEV = 18, // NVIDIA RTX Virtual Game Dev NVML_BRAND_NVIDIA_NPU = 19, // NVIDIA NPU + NVML_BRAND_NVIDIA_VGAMEDEV = 18, // NVIDIA RTX Virtual Game Dev // Keep this last NVML_BRAND_COUNT = 20, } nvmlBrandType_t; @@ -1232,7 +1239,9 @@ typedef enum nvmlComputeMode_enum */ typedef struct nvmlClkMonFaultInfo_struct { /** - * The Domain which faulted + * The clock domain that faulted, encoded as a legacy 1-hot bitmask with + * one bit set. The bit is set as per the clock domain identifier. For example, + * a value of 0x4 (bit index 2) corresponds to clock domain identifier 2. */ unsigned int clkApiDomain; @@ -1536,7 +1545,7 @@ typedef enum nvmlReturn_enum NVML_ERROR_CORRUPTED_INFOROM = 14, //!< infoROM is corrupted NVML_ERROR_GPU_IS_LOST = 15, //!< The GPU has fallen off the bus or has otherwise become inaccessible NVML_ERROR_RESET_REQUIRED = 16, //!< The GPU requires a reset before it can be used again - NVML_ERROR_OPERATING_SYSTEM = 17, //!< The GPU control device has been blocked by the operating system/cgroups + NVML_ERROR_OPERATING_SYSTEM = 17, //!< A generic operating system error occurred NVML_ERROR_LIB_RM_VERSION_MISMATCH = 18, //!< RM detects a driver/library version mismatch NVML_ERROR_IN_USE = 19, //!< An operation cannot be performed because the GPU is currently in use NVML_ERROR_MEMORY = 20, //!< Insufficient memory @@ -2025,6 +2034,7 @@ typedef enum nvmlDeviceVgpuCapability_enum NVML_DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS = 9, //!< Query whether the GPU supports reporting of placements of timesliced vGPU profiles with identical framebuffer sizes NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED = 10, //!< Query whether the GPU supports timesliced vGPU on MIG NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = 11, //!< Set/Get MIG timesliced mode reporting, without impacting the underlying functionality + NVML_DEVICE_VGPU_CAP_UVM_STUN = 12, //!< Query whether the GPU supports UVM stun // Keep this last NVML_DEVICE_VGPU_CAP_COUNT } nvmlDeviceVgpuCapability_t; @@ -3214,7 +3224,11 @@ typedef struct #define NVML_FI_DEV_BANK_REMAPPER_HISTOGRAM_MAX 305 //!< Number of groups with full bank remap availability. #define NVML_FI_DEV_BANK_REMAPPER_HISTOGRAM_NONE 306 //!< Number of groups with no spare bankremap availability. #define NVML_FI_DEV_PENDING_BANK_REMAPPING 307 //!< If any banks are pending remapping. 1=yes 0=no -#define NVML_FI_MAX 308 //!< One greater than the largest field ID defined above + +#define NVML_FI_DEV_GPU_TEMP 308 //!< Current GPU temperature in degrees C with sub-degree precision +#define NVML_FI_PWR_SMOOTHING_LIMITED_TIME 309 //!< Running total of time the GPU has been limited by power smoothing in ns + +#define NVML_FI_MAX 310 //!< One greater than the largest field ID defined above /** * NVML_FI_DEV_MCLK_SWITCH_TYPE enumerations @@ -4052,17 +4066,21 @@ typedef enum nvmlPcieLinkState_enum /** * Confidential Compute CPU Capabilities values */ -#define NVML_CC_SYSTEM_CPU_CAPS_NONE 0 //!< No confidential compute CPU capability. -#define NVML_CC_SYSTEM_CPU_CAPS_AMD_SEV 1 //!< AMD SEV CPU capability. -#define NVML_CC_SYSTEM_CPU_CAPS_INTEL_TDX 2 //!< Intel TDX CPU capability. -#define NVML_CC_SYSTEM_CPU_CAPS_AMD_SEV_SNP 3 //!< AMD SEV-SNP CPU capability. -#define NVML_CC_SYSTEM_CPU_CAPS_AMD_SNP_VTOM 4 //!< AMD SNP-VTOM CPU capability. +#define NVML_CC_SYSTEM_CPU_CAPS_NONE 0 //!< No confidential compute CPU capability. +#define NVML_CC_SYSTEM_CPU_CAPS_AMD_SEV 1 //!< AMD SEV CPU capability. +#define NVML_CC_SYSTEM_CPU_CAPS_INTEL_TDX 2 //!< Intel TDX CPU capability. +#define NVML_CC_SYSTEM_CPU_CAPS_AMD_SEV_SNP 3 //!< AMD SEV-SNP CPU capability. +#define NVML_CC_SYSTEM_CPU_CAPS_AMD_SNP_VTOM 4 //!< AMD SNP-VTOM CPU capability. +#define NVML_CC_SYSTEM_CPU_CAPS_ARM_CCA 5 //!< ARM CCA CPU capability. +#define NVML_CC_SYSTEM_CPU_CAPS_INTEL_TDX_CONNECT 6 //!< Intel TDX Connect CPU capability. +#define NVML_CC_SYSTEM_CPU_CAPS_AMD_SEV_TIO 7 //!< AMD SEV-TIO CPU capability. /** * Confidenial Compute GPU Capabilities values */ #define NVML_CC_SYSTEM_GPUS_CC_NOT_CAPABLE 0 //!< GPUs are not confidential compute capable. #define NVML_CC_SYSTEM_GPUS_CC_CAPABLE 1 //!< GPUs are confidential compute capable. +#define NVML_CC_SYSTEM_GPUS_CC_BMSAI_CAPABLE 2 //!< GPUs are Baremetal Secure AI capable. typedef struct nvmlConfComputeSystemCaps_st { unsigned int cpuCaps; @@ -4087,6 +4105,7 @@ typedef struct nvmlConfComputeSystemCaps_st { */ #define NVML_CC_SYSTEM_FEATURE_DISABLED 0 //!< Feature is disabled. #define NVML_CC_SYSTEM_FEATURE_ENABLED 1 //!< Feature is enabled. +#define NVML_CC_SYSTEM_FEATURE_BMSAI_ENABLED 2 //!< Feature is enabled for Baremetal Secure AI. typedef struct nvmlConfComputeSystemState_st { unsigned int environment; @@ -4115,6 +4134,30 @@ typedef struct { typedef nvmlSystemConfComputeSettings_v1_t nvmlSystemConfComputeSettings_t; #define nvmlSystemConfComputeSettings_v1 NVML_STRUCT_VERSION(SystemConfComputeSettings, 1) //!< Version macro for \a nvmlSystemConfComputeSettings_v1_t +/** + * Confidential Compute TDISP state values + */ +#define NVML_CC_SYSTEM_TDISP_STATE_DISABLED 0 //!< The GPUs are not running behind a TDI. +#define NVML_CC_SYSTEM_TDISP_STATE_NOT_READY 1 //!< The TDIs are UNLOCKED, i.e. TDISP FW-only mode. +#define NVML_CC_SYSTEM_TDISP_STATE_READY 2 //!< The TDIs completed the TSM handshake and reached RUN, i.e. TDISP secure mode. + +/** + * Confidential Compute System settings, version 2 + * + * Adds \a tdispState, the TDISP state of the GPUs, reported as a single value + * so that callers do not have to combine flags. + */ +typedef struct { + unsigned int version; + unsigned int environment; + unsigned int ccFeature; + unsigned int devToolsMode; + unsigned int multiGpuMode; + unsigned int tdispState; +} nvmlSystemConfComputeSettings_v2_t; + +#define nvmlSystemConfComputeSettings_v2 NVML_STRUCT_VERSION(SystemConfComputeSettings, 2) //!< Version macro for \a nvmlSystemConfComputeSettings_v2_t + /** * Protected memory size */ @@ -4434,6 +4477,14 @@ typedef struct * * For all products. * + */ +/** + * @note With the environment variable \c NVML_MPS_DEVICE_ENUMERATION set to + * 1, this API selects the MPS locality-domain view described in + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @return * - \ref NVML_SUCCESS if the NVML Library was properly initialized. * - \ref NVML_ERROR_DRIVER_NOT_LOADED if the NVIDIA driver is not running. @@ -4461,6 +4512,15 @@ nvmlReturn_t DECLDIR nvmlInit_v2(void); * * For all products. * + */ +/** + * @note With the environment variable \c NVML_MPS_DEVICE_ENUMERATION set to + * 1, this API selects the MPS locality-domain view. + * \ref NVML_INIT_FLAG_NO_ATTACH is not supported in that view. See + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param[in] flags NVML_INIT_FLAG_* flags that can modify NVML Init behavior. * * @return @@ -4492,6 +4552,13 @@ nvmlReturn_t DECLDIR nvmlInitWithFlags(unsigned int flags); * * For all products. * + */ +/** + * @note The final matching shutdown releases the process-local MPS + * locality-domain view described in \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @return * - \ref NVML_SUCCESS if the NVML Library was properly shut down. * - \ref NVML_ERROR_UNINITIALIZED if the NVML Library was not previously initialized. @@ -4513,6 +4580,13 @@ nvmlReturn_t DECLDIR nvmlShutdown(void); * * For all products. * + */ +/** + * @note This helper is available in the MPS locality-domain view described in + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param result NVML error code to convert * * @return String representation of the error. @@ -4721,6 +4795,13 @@ nvmlReturn_t DECLDIR nvmlSystemGetDriverVersion(char *version, unsigned int leng * * For all products. * + */ +/** + * @note This query is available in the MPS locality-domain view described in + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * The version identifier is an alphanumeric string. It will not exceed 80 characters in length * (including the NULL terminator). See \ref nvmlConstants::NVML_SYSTEM_NVML_VERSION_BUFFER_SIZE. * @@ -5085,6 +5166,14 @@ nvmlReturn_t DECLDIR nvmlUnitGetDevices(nvmlUnit_t unit, unsigned int *deviceCou * library. * Old _v1 version of nvmlDeviceGetCount doesn't count devices that NVML has no permission to talk to. * + */ +/** + * @note In the MPS locality-domain view, this API returns the number of + * MPS-reported device entries. Each locality domain has its own NVML + * index and \c nvmlDevice_t handle. See \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param deviceCount Reference in which to return the number of accessible devices * * @return @@ -5145,6 +5234,13 @@ nvmlReturn_t DECLDIR nvmlDeviceGetAttributes_v2(nvmlDevice_t device, nvmlDeviceA * 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. * + */ +/** + * @note In the MPS locality-domain view, this API returns the locality-domain + * handle associated with \a index. See \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param index The index of the target GPU, >= 0 and < \a accessibleDevices * @param device Reference in which to return the device handle * @@ -5208,6 +5304,14 @@ DEPRECATED(13.0) nvmlReturn_t DECLDIR nvmlDeviceGetHandleBySerial(const char *se * 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 * + */ +/** + * @note In the MPS locality-domain view, this API returns the locality-domain + * handle whose MPS-provided UUID matches \a uuid. See + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @return * - \ref NVML_SUCCESS if \a device has been set * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized @@ -5234,6 +5338,14 @@ nvmlReturn_t DECLDIR nvmlDeviceGetHandleByUUID(const char *uuid, nvmlDevice_t *d * This API causes NVML to initialize the target GPU * NVML may initialize additional GPUs as it searches for the target GPU * + */ +/** + * @note This API returns \ref NVML_ERROR_NOT_SUPPORTED in the MPS + * locality-domain view. Use \ref nvmlDeviceGetHandleByUUID() with the + * ASCII UUID instead. See \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @return * - \ref NVML_SUCCESS if \a device has been set * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized @@ -5259,6 +5371,15 @@ nvmlReturn_t DECLDIR nvmlDeviceGetHandleByUUIDV(const nvmlUUID_t *uuid, nvmlDevi * \note NVML 4.304 and older version of nvmlDeviceGetHandleByPciBusId"_v1" returns NVML_ERROR_NOT_FOUND * instead of NVML_ERROR_NO_PERMISSION. * + */ +/** + * @note In the MPS locality-domain view, multiple locality domains can share a + * PCI bus ID. This API returns the first matching handle in NVML + * enumeration order. Use UUID or index to select a specific locality + * domain. See \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param 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 @@ -5292,6 +5413,13 @@ nvmlReturn_t DECLDIR nvmlDeviceGetHandleByPciBusId_v2(const char *pciBusId, nvml * When used with MIG device handles the API returns MIG device names which can be used to identify devices * based on their attributes. * + */ +/** + * @note In the MPS locality-domain view, this API returns the name supplied by + * MPS for the locality domain. See \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device The identifier of the target device * @param name Reference in which to return the product name * @param length The maximum allowed length of the string returned in \a name @@ -5344,6 +5472,13 @@ nvmlReturn_t DECLDIR nvmlDeviceGetBrand(nvmlDevice_t device, nvmlBrandType_t *ty * * Note: The NVML index may not correlate with other APIs, such as the CUDA device index. * + */ +/** + * @note In the MPS locality-domain view, this API returns the NVML index of the + * locality-domain handle. See \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device The identifier of the target device * @param index Reference in which to return the NVML index of the device * @@ -5500,6 +5635,14 @@ nvmlReturn_t DECLDIR nvmlDeviceGetCpuAffinityWithinScope(nvmlDevice_t device, un * For Kepler &tm; or newer fully supported devices. * Supported on Linux only. * + */ +/** + * @note In the MPS locality-domain view, this API returns the CPU affinity of + * the physical parent associated with the locality-domain handle. See + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device The identifier of the target device * @param cpuSetSize The size of the cpuSet array that is safe to access * @param cpuSet Array reference in which to return a bitmask of CPUs, 64 CPUs per @@ -5557,6 +5700,14 @@ nvmlReturn_t DECLDIR nvmlDeviceClearCpuAffinity(nvmlDevice_t device); * Get the NUMA node of the given GPU device. * This only applies to platforms where the GPUs are NUMA nodes. * + */ +/** + * @note In the MPS locality-domain view, this API returns the NUMA node + * supplied by MPS for the locality domain. See + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param[in] device The device handle * @param[out] node NUMA node ID of the device * @@ -5668,6 +5819,14 @@ nvmlReturn_t DECLDIR nvmlDeviceGetTopologyNearestGpus(nvmlDevice_t device, nvmlG /** * Retrieve the status for a given p2p capability index between a given pair of GPU * + */ +/** + * @note In the MPS locality-domain view, this API returns the directed P2P + * status supplied by MPS for the two locality-domain handles. See + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device1 The first device * @param device2 The second device * @param p2pIndex p2p Capability Index being looked for between \a device1 and \a device2 @@ -5693,6 +5852,13 @@ nvmlReturn_t DECLDIR nvmlDeviceGetP2PStatus(nvmlDevice_t device1, nvmlDevice_t d * 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. * + */ +/** + * @note In the MPS locality-domain view, this API returns the UUID supplied by + * MPS for the locality domain. See \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device The identifier of the target device * @param uuid Reference in which to return the GPU UUID * @param length The maximum allowed length of the string returned in \a uuid @@ -5881,6 +6047,27 @@ nvmlReturn_t DECLDIR nvmlDeviceGetLastBBXFlushTime(nvmlDevice_t device, unsigned */ nvmlReturn_t DECLDIR nvmlDeviceGetBBXTimeData_v1(nvmlDevice_t device, nvmlBBXTimeData_v1_t *timeData); + +/** + * Retrieves the GPU uptime. The uptime denotes the number of seconds elapsed + * since the GPU was initialized by the driver. The uptime resets to zero on a host reboot, + * driver unload/reload, or a GPU reset. + * + * For MIG device handles, the parent GPU uptime is returned. + * + * @param device The identifier of the target device + * @param uptime Reference in which to return the GPU uptime + * + * @return + * - \ref NVML_SUCCESS if \a uptime has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a uptime is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetGpuUptime_v1(nvmlDevice_t device, nvmlGpuUptime_v1_t *uptime); + /** * Retrieves the display mode for the device. * @@ -5981,6 +6168,15 @@ nvmlReturn_t DECLDIR nvmlDeviceGetPciInfoExt(nvmlDevice_t device, nvmlPciInfoExt * * See \ref nvmlPciInfo_t for details on the available PCI info. * + */ +/** + * @note In the MPS locality-domain view, this API and its v1 and v2 variants + * return the PCI attributes supplied by MPS. Multiple locality domains + * can report the same physical parent's PCI attributes. See + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device The identifier of the target device * @param pci Reference in which to return the PCI info * @@ -6523,6 +6719,11 @@ typedef nvmlTemperature_v1_t nvmlTemperature_t; * * For all products. * + * Note: This API reports the current GPU temperature rounded to a whole degree Celsius. + * For the current GPU temperature at higher precision, use + * \ref nvmlDeviceGetFieldValues with the \ref NVML_FI_DEV_GPU_TEMP field, which returns the + * temperature in degrees C as a double value. + * * @param[in] device Target device identifier. * @param[in,out] temperature Structure specifying the sensor type (input) and retrieved * temperature value (output). @@ -6537,7 +6738,6 @@ typedef nvmlTemperature_v1_t nvmlTemperature_t; */ nvmlReturn_t DECLDIR nvmlDeviceGetTemperatureV(nvmlDevice_t device, nvmlTemperature_t *temperature); - /** * Retrieves the temperature threshold for the GPU with the specified threshold type in degrees C. * @@ -7192,7 +7392,7 @@ nvmlReturn_t DECLDIR nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice_t device, nvmlEn * %RUBIN_OR_NEWER% * * Populates \a 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 + * override status, arbitrated enablement state, and adjusted TGP power limit. The adjusted TGP * power is valid only when feature is enabled. * See \ref nvmlAdaptiveTgpModeInfo_v1_t for field details. * @@ -7267,6 +7467,14 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuOperationMode(nvmlDevice_t device, nvmlGpuO * but instead shares memory with the system. As a result, \ref NVML_ERROR_NOT_SUPPORTED * will be returned in this case. * + */ +/** + * @note In the MPS locality-domain view, this API returns MPS-provided total, + * used, and free memory for the locality domain. Reserved memory is + * included in used memory. See \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device The identifier of the target device * @param memory Reference in which to return the memory information * @@ -7309,6 +7517,14 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMemoryInfo(nvmlDevice_t device, nvmlMemory_t * * but instead shares memory with the system. As a result, \ref NVML_ERROR_NOT_SUPPORTED * will be returned in this case. * + */ +/** + * @note In the MPS locality-domain view, this API returns MPS-provided total, + * used, free, and reserved memory for the locality domain. See + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device The identifier of the target device * @param memory Reference in which to return the memory information * @@ -7412,6 +7628,14 @@ nvmlReturn_t DECLDIR nvmlDeviceGetComputeMode(nvmlDevice_t device, nvmlComputeMo * CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR attributes that would be * returned by CUDA's cuDeviceGetAttribute(). * + */ +/** + * @note In the MPS locality-domain view, this API returns the compute + * capability supplied by MPS for the locality domain. See + * \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device The identifier of the target device * @param major Reference in which to return the major CUDA compute capability * @param minor Reference in which to return the minor CUDA compute capability @@ -8730,6 +8954,32 @@ nvmlReturn_t DECLDIR nvmlSystemSetConfComputeKeyRotationThresholdInfo( */ nvmlReturn_t DECLDIR nvmlSystemGetConfComputeSettings(nvmlSystemConfComputeSettings_t *settings); +/** + * Get Conf Computing System Settings, version 2. + * + * Returns everything \ref nvmlSystemGetConfComputeSettings reports, plus the + * TDISP state of the GPUs in \a tdispState. + * + * All GPUs, and therefore all TDIs, are expected to be in the same state. If + * they are not, the system level state is ambiguous and NVML_ERROR_UNKNOWN is + * returned. + * + * For Hopper &tm; or newer fully supported devices. + * Supported on Linux, Windows TCC. + * + * @param settings System CC settings + * + * @return + * - \ref NVML_SUCCESS If the query is success + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a settings is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED If the device does not support this feature + * - \ref NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the provided version is invalid/unsupported + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlSystemGetConfComputeSettings_v2(nvmlSystemConfComputeSettings_v2_t *settings); + /** * Retrieve GSP firmware version. * @@ -8838,6 +9088,13 @@ nvmlReturn_t DECLDIR nvmlDeviceSetPowerManagementLimit_v2(nvmlDevice_t device, n * See \ref nvmlDeviceGetAccountingStats for more details. * See \ref nvmlDeviceSetAccountingMode * + */ +/** + * @note In the MPS locality-domain view, this API returns the physical parent's + * accounting mode as reported by MPS. See \ref nvmlMpsDeviceEnumeration. + * + */ +/** * @param device The identifier of the target device * @param mode Reference in which to return the current accounting mode * @@ -10062,6 +10319,7 @@ nvmlReturn_t DECLDIR nvmlDeviceClearAccountingPids(nvmlDevice_t device); (((var) >> NVML_NVLINK_##type##_SHIFT) & \ (NVML_NVLINK_##type##_WIDTH)) \ + /* * NVML_FI_DEV_NVLINK_GET_STATE state enums */ @@ -10179,6 +10437,16 @@ typedef struct typedef nvmlNvLinkInfo_v2_t nvmlNvLinkInfo_t; #define nvmlNvLinkInfo_v2 NVML_STRUCT_VERSION(NvLinkInfo, 2) //!< Version macro for \a nvmlNvLinkInfo_v2_t +/** + * Struct to represent per device NVLINK information v3 + */ +typedef struct +{ + unsigned int isNvleEnabled; //!< OUT - NVLINK encryption enablement + nvmlNvlinkFirmwareInfo_t firmwareInfo; //!< OUT - NVLINK Firmware info + unsigned int isNvleReady; //!< OUT - Whether NVLE is ready on the GPU +} nvmlNvLinkInfo_v3_t; + /** * Retrieves the state of the device's NvLink for the link specified * @@ -10568,6 +10836,22 @@ nvmlReturn_t DECLDIR nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvml */ nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkInfo(nvmlDevice_t device, nvmlNvLinkInfo_t *info); +/** + * Query NVLINK information associated with this device (v3). + * + * @param[in] device The identifier of the target device + * @param[out] info Reference to \a nvmlNvLinkInfo_v3_t + * + * @return + * - \ref NVML_SUCCESS if query is success + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a info is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkInfo_v3(nvmlDevice_t device, nvmlNvLinkInfo_v3_t *info); + /** * Per-link NVLink telemetry sample types. */ @@ -10628,6 +10912,163 @@ typedef struct nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, nvmlNvlinkTelemetrySamples_v1_t *samples); +/** + * Maximum number of entries in the NVLink FLA/SPA(GPA) remap tables. + */ +#define NVML_NVLINK_MAX_REMAP_TABLE_ENTRIES_V2 4096 +#define NVML_NVLINK_REMAP_TABLE_ENTRIES_CHUNK 128 + +/** + * Structure for NVLink remap table information. + */ +typedef struct +{ + unsigned int alid; //!< ALID of the GPU + unsigned int flaRemapTabAddr[NVML_NVLINK_MAX_REMAP_TABLE_ENTRIES_V2]; //!< FLA remap table addrs for all the remap table entries + unsigned int gpaRemapTabAddr[NVML_NVLINK_MAX_REMAP_TABLE_ENTRIES_V2]; //!< SPA/GPA remap table addrs for all the remap table entries + unsigned int remapTabSize; //!< Number of entries in the remap tables +} nvmlNvlinkGetRemapTableInfo_v1_t; + +/** + * Get the NVLink remap table information. + * + * This API returns the remap table addresses for all the entries in the FLA and SPA/GPA remap tables. + * + * @param[in] device The identifier of the target device. + * @param[out] remapTableInfo Reference to \ref nvmlNvlinkGetRemapTableInfo_v1_t struct. + * + * @return + * - \ref NVML_SUCCESS if the operation completed successfully + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a remapTableInfo is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_UNKNOWN if an error was encountered during the operation + */ +nvmlReturn_t DECLDIR nvmlDeviceGetNvlinkRemapTableInfo_v1(nvmlDevice_t device, + nvmlNvlinkGetRemapTableInfo_v1_t *remapTableInfo); + +/** + * Structure for the NVLink NVLE ready state. + */ +typedef struct +{ + unsigned char bNvleReady; //!< Whether NVLE is ready on the GPU +} nvmlNvlinkSetNvleReady_v1_t; + +/** + * Set the NVLink NVLE ready state. + * + * This API signals whether NVLE (NVLink Encryption) is ready on the given device. + * + * @param[in] device The identifier of the target device. + * @param[in] setNvleReady Reference to \ref nvmlNvlinkSetNvleReady_v1_t struct. + * + * @return + * - \ref NVML_SUCCESS if the operation completed successfully + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a setNvleReady is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_UNKNOWN if an error was encountered during the operation + */ +nvmlReturn_t DECLDIR nvmlDeviceSetNvlinkNvleReady_v1(nvmlDevice_t device, + nvmlNvlinkSetNvleReady_v1_t *setNvleReady); + +/** + * Structure for the NVLink remap table and MSE lock operation. + */ +typedef struct +{ + unsigned char bRemapTableLocked; //!< Whether the remap table of the GPU is locked + unsigned char bRemapTableLockDisabled; //!< Whether locking of the remap table is disabled +} nvmlNvlinkLockRemapTable_v1_t; + +/** + * Lock the NVLink remap table to prevent MSE from making further updates. + * + * This API requests to lock the remap table to prevent MSE (Multi-Socket Engine) + * from making any further updates to the remap table for the given links. + * + * @param[in] device The identifier of the target device. + * @param[in,out] remapTableLockInfo Reference to \ref nvmlNvlinkLockRemapTable_v1_t struct. + * + * @return + * - \ref NVML_SUCCESS if the operation completed successfully + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a remapTableLockInfo is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_UNKNOWN if an error was encountered during the operation + */ +nvmlReturn_t DECLDIR nvmlDeviceLockNvlinkRemapTable_v1(nvmlDevice_t device, + nvmlNvlinkLockRemapTable_v1_t *remapTableLockInfo); + +/** + * Size in bytes of the NVLink NVLE private (opaque) info buffer. + */ +#define NVML_NVLINK_NVLE_PRIVATE_INFO_SIZE 256 + +/** + * Structure for NVLink NVLE private (opaque) information. + */ +typedef struct +{ + unsigned char data[NVML_NVLINK_NVLE_PRIVATE_INFO_SIZE]; //!< Buffer that receives the opaque private info blob + unsigned int size; //!< Number of valid bytes written to \a data on output +} nvmlNvlinkNvlePrivateInfo_v1_t; + +/** + * Size in bytes of the AES-256-GCM key secret used for NVLink encryption. + */ +#define NVML_NVLINK_NVLE_AES_256_GCM_KEY_SIZE_BYTES 32 + +/** + * Structure for NVLink NVLE encryption key setup. + */ +typedef struct +{ + unsigned char nvleKey[NVML_NVLINK_NVLE_AES_256_GCM_KEY_SIZE_BYTES]; //!< Key secret from which keyMgr will derive the key + unsigned int localGpuAlid; //!< ALID of the local GPU + unsigned int remoteGpuAlid; //!< ALID of the remote GPU + nvmlNvlinkNvlePrivateInfo_v1_t localGpuNvlePrivateInfo; //!< NVLE private info of the local GPU + nvmlNvlinkNvlePrivateInfo_v1_t remoteGpuNvlePrivateInfo; //!< NVLE private info of the remote GPU +} nvmlNvlinkSetupNvleEncryptionKey_v1_t; + +/** + * Setup the NVLink NVLE encryption key. + * + * This API sets the NVLE encryption key between GPUs with the given ALIDs. + * + * @param[in] device The identifier of the target device. + * @param[in] encryptionKey Reference to \ref nvmlNvlinkSetupNvleEncryptionKey_v1_t struct. + * + * @return + * - \ref NVML_SUCCESS if the operation completed successfully + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a encryptionKey is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_UNKNOWN if an error was encountered during the operation + */ +nvmlReturn_t DECLDIR nvmlDeviceSetupNvlinkNvleEncryptionKey_v1(nvmlDevice_t device, + nvmlNvlinkSetupNvleEncryptionKey_v1_t *encryptionKey); + +/** + * Get NVLink NVLE private (opaque) information. + * + * This API retrieves opaque NVLE private information for the given device and + * copies it into the \a data buffer, setting \a size to the number of bytes written. + * + * @param[in] device The identifier of the target device. + * @param[out] privateInfo Reference to \ref nvmlNvlinkNvlePrivateInfo_v1_t struct. + * + * @return + * - \ref NVML_SUCCESS if the operation completed successfully + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a privateInfo is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_UNKNOWN if an error was encountered during the operation + */ +nvmlReturn_t DECLDIR nvmlDeviceGetNvlinkNvlePrivateInfo_v1(nvmlDevice_t device, + nvmlNvlinkNvlePrivateInfo_v1_t *privateInfo); + /** @} */ // @defgroup NvLink NvLink Methods /***************************************************************************************************/ @@ -14468,8 +14909,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetDeviceHandleFromMigDeviceHandle(nvmlDevice_t m /***************************************************************************************************/ /** @defgroup GPM NVML GPM * @note For NVIDIA vGPU Software products - * @note (A) GPM is supported only on MIG-backed vGPU profiles that are allocated all of the instance's frame buffer - * @note (B) No GPM support on Windows + * @note GPM is supported only on MIG-backed vGPU profiles that are allocated all of the instance's frame buffer * @{ */ /***************************************************************************************************/ @@ -15453,11 +15893,20 @@ nvmlReturn_t DECLDIR nvmlDeviceWorkloadPowerProfileUpdateProfiles_v1(nvmlDevice_ * @{ */ /***************************************************************************************************/ + /** - * Macro for accomodating the gaps in field values for power smoothing. + * Deprecated, do not use. */ -#define NVML_POWER_SMOOTHING_IDX_FROM_FIELD_VAL(field_val) \ +#define NVML_POWER_SMOOTHING_IDX_FROM_FIELD_VAL(field_val) NVML_POWER_SMOOTHING_IDX_FROM_FIELD_VAL_DEPRECATED(field_val) + + +#define NVML_POWER_SMOOTHING_IDX_FROM_FIELD_VAL_DEPRECATED(field_val) \ ( \ + ((field_val) >= NVML_FI_PWR_SMOOTHING_LIMITED_TIME) ? \ + ((field_val) - NVML_FI_PWR_SMOOTHING_ENABLED - \ + (NVML_FI_PWR_SMOOTHING_PRIMARY_POWER_FLOOR - NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_HYST_VAL - 1) - \ + (NVML_FI_PWR_SMOOTHING_SOC_POWER_SMOOTHING_ENABLED - NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_ACT_OFFSET - 1) - \ + (NVML_FI_PWR_SMOOTHING_LIMITED_TIME - NVML_FI_PWR_SMOOTHING_SOC_POWER_SMOOTHING_ENABLED - 1)) : \ ((field_val) >= NVML_FI_PWR_SMOOTHING_SOC_POWER_SMOOTHING_ENABLED) ? \ ((field_val) - NVML_FI_PWR_SMOOTHING_ENABLED - \ (NVML_FI_PWR_SMOOTHING_PRIMARY_POWER_FLOOR - NVML_FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_HYST_VAL - 1) - \ @@ -15475,10 +15924,10 @@ nvmlReturn_t DECLDIR nvmlDeviceWorkloadPowerProfileUpdateProfiles_v1(nvmlDevice_ #define NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_UP_RATE 1 //!< Ramp up rate. #define NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_RATE 2 //!< Ramp down rate. #define NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_HYSTERESIS 3 //!< Ramp down hysteresis. -#define NVML_POWER_SMOOTHING_PROFILE_PARAM_SECONDARY_POWER_FLOOR 4 //!< Secondary power floor value in Watts for a given profile +#define NVML_POWER_SMOOTHING_PROFILE_PARAM_SECONDARY_POWER_FLOOR 4 //!< Secondary power floor value for a given profile #define NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_ACT_WIN_MULT 5 //!< Primary floor activation window multiplier value for a given profile #define NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_TAR_WIN_MULT 6 //!< Primary floor target window multiplier value for a given profile -#define NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_ACT_OFFSET 7 //!< Primary floor activation offset value in Watts for a given profile +#define NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_ACT_OFFSET 7 //!< Primary floor activation offset value for a given profile /** * Power Smoothing Structure for Profile information @@ -15506,7 +15955,7 @@ typedef nvmlPowerSmoothingState_v1_t nvmlPowerSmoothingState_t; #define nvmlPowerSmoothingState_v1 NVML_STRUCT_VERSION(PowerSmoothingState, 1) //!< Version macro for \a nvmlPowerSmoothingState_v1_t /** - * Activiate a specific preset profile for datacenter power smoothing. + * Activate 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. @@ -15535,9 +15984,13 @@ nvmlReturn_t DECLDIR nvmlDevicePowerSmoothingActivatePresetProfile(nvmlDevice_t * For Blackwell &tm; or newer fully supported devices. * * NVML_POWER_SMOOTHING_PROFILE_PARAM_PERCENT_TMP_FLOOR expects a value as a percentage from 00.00-100.00% - * NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_UP_RATE expects a value in W/s - * NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_RATE expects a value in W/s + * NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_UP_RATE expects a value in mW/s + * NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_RATE expects a value in mW/s * NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_HYSTERESIS expects a value in ms + * NVML_POWER_SMOOTHING_PROFILE_PARAM_SECONDARY_POWER_FLOOR expects a value in mW + * NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_ACT_WIN_MULT expects a value from 0-255 + * NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_TAR_WIN_MULT expects a value from 0-255 + * NVML_POWER_SMOOTHING_PROFILE_PARAM_PRIMARY_FLOOR_ACT_OFFSET expects a value in mW * * @param device The identifier of the target device * @param profile Reference to \ref nvmlPowerSmoothingProfile_v1_t struct @@ -15707,6 +16160,48 @@ nvmlReturn_t DECLDIR nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice_t device, nvmlEccBankRemapperStatus_v1_t *pBankRemapperStatus); /** @} */ +/** + * @addtogroup nvmlMpsDeviceEnumeration MPS Locality Domain Device Enumeration + * + * On supported Linux systems, set the following environment variable before + * the first NVML initialization to enumerate the device view reported by MPS: + * + * \code + * NVML_MPS_DEVICE_ENUMERATION=1 + * \endcode + * + * Each MPS locality domain has an \c nvmlDevice_t handle and an NVML index in + * this process-local view. A device that is not divided into locality domains + * can appear as one MPS device entry. These handles do not represent physical + * parent GPUs, and unsupported operations are not redirected to a parent. + * + * The supported APIs are: + * + * - Initialization and library information: + * \c nvmlInit(), \ref nvmlInit_v2(), \ref nvmlInitWithFlags(), + * \ref nvmlShutdown(), \ref nvmlSystemGetNVMLVersion(), and + * \ref nvmlErrorString(). + * - Enumeration and identity: + * \ref nvmlDeviceGetCount_v2(), \ref nvmlDeviceGetHandleByIndex_v2(), + * \ref nvmlDeviceGetIndex(), \ref nvmlDeviceGetHandleByUUID(), + * \ref nvmlDeviceGetUUID(), \ref nvmlDeviceGetHandleByPciBusId_v2(), + * and \ref nvmlDeviceGetName(). + * - Device attributes: + * \ref nvmlDeviceGetCudaComputeCapability(), \c nvmlDeviceGetPciInfo(), + * \c nvmlDeviceGetPciInfo_v2(), \ref nvmlDeviceGetPciInfo_v3(), + * \ref nvmlDeviceGetNumaNodeId(), and \ref nvmlDeviceGetCpuAffinity(). + * - Telemetry and capability status: + * \ref nvmlDeviceGetMemoryInfo(), \ref nvmlDeviceGetMemoryInfo_v2(), + * \ref nvmlDeviceGetP2PStatus(), and + * \ref nvmlDeviceGetAccountingMode(). + * + * Every other public NVML API returns \ref NVML_ERROR_NOT_SUPPORTED while this + * view is selected. \ref NVML_INIT_FLAG_NO_ATTACH and fork after initialization + * are unsupported. If the selected MPS session becomes invalid, MPS-backed APIs + * return \ref NVML_ERROR_INVALID_STATE without falling back to physical GPU + * enumeration. + */ + /** * NVML API versioning support */ diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/system.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/system.go index cbac602..2138635 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/system.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/system.go @@ -137,6 +137,14 @@ func (l *library) SystemGetConfComputeSettings() (SystemConfComputeSettings, Ret return settings, ret } +// nvml.SystemGetConfComputeSettings_v2() +func (l *library) SystemGetConfComputeSettings_v2() (SystemConfComputeSettings_v2, Return) { + var settings SystemConfComputeSettings_v2 + settings.Version = STRUCT_VERSION(settings, 2) + ret := nvmlSystemGetConfComputeSettings_v2(&settings) + return settings, ret +} + // nvml.SystemSetConfComputeKeyRotationThresholdInfo() func (l *library) SystemSetConfComputeKeyRotationThresholdInfo(keyRotationThresholdInfo ConfComputeSetKeyRotationThresholdInfo) Return { keyRotationThresholdInfo.Version = STRUCT_VERSION(keyRotationThresholdInfo, 1) diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/types_gen.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/types_gen.go index de0e257..cf577d5 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/types_gen.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/types_gen.go @@ -356,6 +356,10 @@ type BBXTimeData_v1 struct { TimeRun uint32 } +type GpuUptime_v1 struct { + Uptime uint32 +} + type DramEncryptionInfo_v1 struct { Version uint32 EncryptionState uint32 @@ -1248,6 +1252,15 @@ type SystemConfComputeSettings struct { MultiGpuMode uint32 } +type SystemConfComputeSettings_v2 struct { + Version uint32 + Environment uint32 + CcFeature uint32 + DevToolsMode uint32 + MultiGpuMode uint32 + TdispState uint32 +} + type ConfComputeMemSizeInfo struct { ProtectedMemSizeKib uint64 UnprotectedMemSizeKib uint64 @@ -1495,6 +1508,12 @@ type NvLinkInfo struct { FirmwareInfo NvlinkFirmwareInfo } +type NvLinkInfo_v3 struct { + IsNvleEnabled uint32 + FirmwareInfo NvlinkFirmwareInfo + IsNvleReady uint32 +} + type NvlinkTelemetrySample_v1 struct { LinkId uint32 SampleType uint32 @@ -1509,6 +1528,35 @@ type NvlinkTelemetrySamples_v1 struct { TelemetrySamples *NvlinkTelemetrySample_v1 } +type NvlinkGetRemapTableInfo_v1 struct { + Alid uint32 + FlaRemapTabAddr [4096]uint32 + GpaRemapTabAddr [4096]uint32 + RemapTabSize uint32 +} + +type NvlinkSetNvleReady_v1 struct { + BNvleReady uint8 +} + +type NvlinkLockRemapTable_v1 struct { + BRemapTableLocked uint8 + BRemapTableLockDisabled uint8 +} + +type NvlinkNvlePrivateInfo_v1 struct { + Data [256]uint8 + Size uint32 +} + +type NvlinkSetupNvleEncryptionKey_v1 struct { + NvleKey [32]uint8 + LocalGpuAlid uint32 + RemoteGpuAlid uint32 + LocalGpuNvlePrivateInfo NvlinkNvlePrivateInfo_v1 + RemoteGpuNvlePrivateInfo NvlinkNvlePrivateInfo_v1 +} + type VgpuVersion struct { MinVersion uint32 MaxVersion uint32 diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/zz_generated.api.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/zz_generated.api.go index 0c8fb71..d75f991 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/zz_generated.api.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/zz_generated.api.go @@ -115,6 +115,7 @@ var ( DeviceGetGpuInstances = libnvml.DeviceGetGpuInstances DeviceGetGpuMaxPcieLinkGeneration = libnvml.DeviceGetGpuMaxPcieLinkGeneration DeviceGetGpuOperationMode = libnvml.DeviceGetGpuOperationMode + DeviceGetGpuUptime_v1 = libnvml.DeviceGetGpuUptime_v1 DeviceGetGraphicsRunningProcesses = libnvml.DeviceGetGraphicsRunningProcesses DeviceGetGridLicensableFeatures = libnvml.DeviceGetGridLicensableFeatures DeviceGetGspFirmwareMode = libnvml.DeviceGetGspFirmwareMode @@ -162,6 +163,7 @@ var ( DeviceGetNvLinkCapability = libnvml.DeviceGetNvLinkCapability DeviceGetNvLinkErrorCounter = libnvml.DeviceGetNvLinkErrorCounter DeviceGetNvLinkInfo = libnvml.DeviceGetNvLinkInfo + DeviceGetNvLinkInfo_v3 = libnvml.DeviceGetNvLinkInfo_v3 DeviceGetNvLinkRemoteDeviceType = libnvml.DeviceGetNvLinkRemoteDeviceType DeviceGetNvLinkRemotePciInfo = libnvml.DeviceGetNvLinkRemotePciInfo DeviceGetNvLinkState = libnvml.DeviceGetNvLinkState @@ -170,6 +172,8 @@ var ( DeviceGetNvLinkUtilizationCounter = libnvml.DeviceGetNvLinkUtilizationCounter DeviceGetNvLinkVersion = libnvml.DeviceGetNvLinkVersion DeviceGetNvlinkBwMode = libnvml.DeviceGetNvlinkBwMode + DeviceGetNvlinkNvlePrivateInfo_v1 = libnvml.DeviceGetNvlinkNvlePrivateInfo_v1 + DeviceGetNvlinkRemapTableInfo_v1 = libnvml.DeviceGetNvlinkRemapTableInfo_v1 DeviceGetNvlinkSupportedBwModes = libnvml.DeviceGetNvlinkSupportedBwModes DeviceGetOfaUtilization = libnvml.DeviceGetOfaUtilization DeviceGetP2PStatus = libnvml.DeviceGetP2PStatus @@ -244,6 +248,7 @@ var ( DeviceGetViolationStatus = libnvml.DeviceGetViolationStatus DeviceGetVirtualizationMode = libnvml.DeviceGetVirtualizationMode DeviceIsMigDeviceHandle = libnvml.DeviceIsMigDeviceHandle + DeviceLockNvlinkRemapTable_v1 = libnvml.DeviceLockNvlinkRemapTable_v1 DeviceModifyDrainState = libnvml.DeviceModifyDrainState DeviceOnSameBoard = libnvml.DeviceOnSameBoard DevicePerfMetricsGetSamples_v1 = libnvml.DevicePerfMetricsGetSamples_v1 @@ -289,6 +294,7 @@ var ( DeviceSetNvLinkUtilizationControl = libnvml.DeviceSetNvLinkUtilizationControl DeviceSetNvlinkBwMode = libnvml.DeviceSetNvlinkBwMode DeviceSetNvlinkBwModeAsync_v1 = libnvml.DeviceSetNvlinkBwModeAsync_v1 + DeviceSetNvlinkNvleReady_v1 = libnvml.DeviceSetNvlinkNvleReady_v1 DeviceSetPersistenceMode = libnvml.DeviceSetPersistenceMode DeviceSetPowerManagementLimit = libnvml.DeviceSetPowerManagementLimit DeviceSetPowerManagementLimit_v2 = libnvml.DeviceSetPowerManagementLimit_v2 @@ -299,6 +305,7 @@ var ( DeviceSetVgpuSchedulerState = libnvml.DeviceSetVgpuSchedulerState DeviceSetVgpuSchedulerState_v2 = libnvml.DeviceSetVgpuSchedulerState_v2 DeviceSetVirtualizationMode = libnvml.DeviceSetVirtualizationMode + DeviceSetupNvlinkNvleEncryptionKey_v1 = libnvml.DeviceSetupNvlinkNvleEncryptionKey_v1 DeviceValidateInforom = libnvml.DeviceValidateInforom DeviceVgpuForceGspUnload = libnvml.DeviceVgpuForceGspUnload DeviceWorkloadPowerProfileClearRequestedProfiles = libnvml.DeviceWorkloadPowerProfileClearRequestedProfiles @@ -365,6 +372,7 @@ var ( SystemGetConfComputeGpusReadyState = libnvml.SystemGetConfComputeGpusReadyState SystemGetConfComputeKeyRotationThresholdInfo = libnvml.SystemGetConfComputeKeyRotationThresholdInfo SystemGetConfComputeSettings = libnvml.SystemGetConfComputeSettings + SystemGetConfComputeSettings_v2 = libnvml.SystemGetConfComputeSettings_v2 SystemGetConfComputeState = libnvml.SystemGetConfComputeState SystemGetCudaDriverVersion = libnvml.SystemGetCudaDriverVersion SystemGetCudaDriverVersion_v2 = libnvml.SystemGetCudaDriverVersion_v2 @@ -528,6 +536,7 @@ type Interface interface { DeviceGetGpuInstances(Device, *GpuInstanceProfileInfo) ([]GpuInstance, Return) DeviceGetGpuMaxPcieLinkGeneration(Device) (int, Return) DeviceGetGpuOperationMode(Device) (GpuOperationMode, GpuOperationMode, Return) + DeviceGetGpuUptime_v1(Device) (GpuUptime_v1, Return) DeviceGetGraphicsRunningProcesses(Device) ([]ProcessInfo, Return) DeviceGetGridLicensableFeatures(Device) (GridLicensableFeatures, Return) DeviceGetGspFirmwareMode(Device) (bool, bool, Return) @@ -575,6 +584,7 @@ type Interface interface { DeviceGetNvLinkCapability(Device, int, NvLinkCapability) (uint32, Return) DeviceGetNvLinkErrorCounter(Device, int, NvLinkErrorCounter) (uint64, Return) DeviceGetNvLinkInfo(Device) NvLinkInfoHandler + DeviceGetNvLinkInfo_v3(Device) (NvLinkInfo_v3, Return) DeviceGetNvLinkRemoteDeviceType(Device, int) (IntNvLinkDeviceType, Return) DeviceGetNvLinkRemotePciInfo(Device, int) (PciInfo, Return) DeviceGetNvLinkState(Device, int) (EnableState, Return) @@ -583,6 +593,8 @@ type Interface interface { DeviceGetNvLinkUtilizationCounter(Device, int, int) (uint64, uint64, Return) DeviceGetNvLinkVersion(Device, int) (uint32, Return) DeviceGetNvlinkBwMode(Device) (NvlinkGetBwMode, Return) + DeviceGetNvlinkNvlePrivateInfo_v1(Device) (NvlinkNvlePrivateInfo_v1, Return) + DeviceGetNvlinkRemapTableInfo_v1(Device) (NvlinkGetRemapTableInfo_v1, Return) DeviceGetNvlinkSupportedBwModes(Device) (NvlinkSupportedBwModes, Return) DeviceGetOfaUtilization(Device) (uint32, uint32, Return) DeviceGetP2PStatus(Device, Device, GpuP2PCapsIndex) (GpuP2PStatus, Return) @@ -623,8 +635,8 @@ type Interface interface { DeviceGetSupportedClocksEventReasons(Device) (uint64, Return) DeviceGetSupportedClocksThrottleReasons(Device) (uint64, Return) DeviceGetSupportedEventTypes(Device) (uint64, Return) - DeviceGetSupportedGraphicsClocks(Device, int) (int, uint32, Return) - DeviceGetSupportedMemoryClocks(Device) (int, uint32, Return) + DeviceGetSupportedGraphicsClocks(Device, int) ([]uint32, Return) + DeviceGetSupportedMemoryClocks(Device) ([]uint32, Return) DeviceGetSupportedPerformanceStates(Device) ([]Pstates, Return) DeviceGetSupportedVgpus(Device) ([]VgpuTypeId, Return) DeviceGetTargetFanSpeed(Device, int) (int, Return) @@ -657,6 +669,7 @@ type Interface interface { DeviceGetViolationStatus(Device, PerfPolicyType) (ViolationTime, Return) DeviceGetVirtualizationMode(Device) (GpuVirtualizationMode, Return) DeviceIsMigDeviceHandle(Device) (bool, Return) + DeviceLockNvlinkRemapTable_v1(Device, *NvlinkLockRemapTable_v1) Return DeviceModifyDrainState(*PciInfo, EnableState) Return DeviceOnSameBoard(Device, Device) (int, Return) DevicePerfMetricsGetSamples_v1(Device) (PerfMetricsSamples_v1, Return) @@ -702,6 +715,7 @@ type Interface interface { DeviceSetNvLinkUtilizationControl(Device, int, int, *NvLinkUtilizationControl, bool) Return DeviceSetNvlinkBwMode(Device, *NvlinkSetBwMode) Return DeviceSetNvlinkBwModeAsync_v1(Device, *NvlinkSetBwModeAsync_v1) Return + DeviceSetNvlinkNvleReady_v1(Device, *NvlinkSetNvleReady_v1) Return DeviceSetPersistenceMode(Device, EnableState) Return DeviceSetPowerManagementLimit(Device, uint32) Return DeviceSetPowerManagementLimit_v2(Device, *PowerValue_v2) Return @@ -712,6 +726,7 @@ type Interface interface { DeviceSetVgpuSchedulerState(Device, *VgpuSchedulerSetState) Return DeviceSetVgpuSchedulerState_v2(Device, *VgpuSchedulerState_v2) Return DeviceSetVirtualizationMode(Device, GpuVirtualizationMode) Return + DeviceSetupNvlinkNvleEncryptionKey_v1(Device, *NvlinkSetupNvleEncryptionKey_v1) Return DeviceValidateInforom(Device) Return DeviceVgpuForceGspUnload(Device) Return DeviceWorkloadPowerProfileClearRequestedProfiles(Device, *WorkloadPowerProfileRequestedProfiles) Return @@ -778,6 +793,7 @@ type Interface interface { SystemGetConfComputeGpusReadyState() (uint32, Return) SystemGetConfComputeKeyRotationThresholdInfo() (ConfComputeGetKeyRotationThresholdInfo, Return) SystemGetConfComputeSettings() (SystemConfComputeSettings, Return) + SystemGetConfComputeSettings_v2() (SystemConfComputeSettings_v2, Return) SystemGetConfComputeState() (ConfComputeSystemState, Return) SystemGetCudaDriverVersion() (int, Return) SystemGetCudaDriverVersion_v2() (int, Return) @@ -937,6 +953,7 @@ type Device interface { GetGpuInstances(*GpuInstanceProfileInfo) ([]GpuInstance, Return) GetGpuMaxPcieLinkGeneration() (int, Return) GetGpuOperationMode() (GpuOperationMode, GpuOperationMode, Return) + GetGpuUptime_v1() (GpuUptime_v1, Return) GetGraphicsRunningProcesses() ([]ProcessInfo, Return) GetGridLicensableFeatures() (GridLicensableFeatures, Return) GetGspFirmwareMode() (bool, bool, Return) @@ -979,6 +996,7 @@ type Device interface { GetNvLinkCapability(int, NvLinkCapability) (uint32, Return) GetNvLinkErrorCounter(int, NvLinkErrorCounter) (uint64, Return) GetNvLinkInfo() NvLinkInfoHandler + GetNvLinkInfo_v3() (NvLinkInfo_v3, Return) GetNvLinkRemoteDeviceType(int) (IntNvLinkDeviceType, Return) GetNvLinkRemotePciInfo(int) (PciInfo, Return) GetNvLinkState(int) (EnableState, Return) @@ -987,6 +1005,8 @@ type Device interface { GetNvLinkUtilizationCounter(int, int) (uint64, uint64, Return) GetNvLinkVersion(int) (uint32, Return) GetNvlinkBwMode() (NvlinkGetBwMode, Return) + GetNvlinkNvlePrivateInfo_v1() (NvlinkNvlePrivateInfo_v1, Return) + GetNvlinkRemapTableInfo_v1() (NvlinkGetRemapTableInfo_v1, Return) GetNvlinkSupportedBwModes() (NvlinkSupportedBwModes, Return) GetOfaUtilization() (uint32, uint32, Return) GetP2PStatus(Device, GpuP2PCapsIndex) (GpuP2PStatus, Return) @@ -1027,8 +1047,8 @@ type Device interface { GetSupportedClocksEventReasons() (uint64, Return) GetSupportedClocksThrottleReasons() (uint64, Return) GetSupportedEventTypes() (uint64, Return) - GetSupportedGraphicsClocks(int) (int, uint32, Return) - GetSupportedMemoryClocks() (int, uint32, Return) + GetSupportedGraphicsClocks(int) ([]uint32, Return) + GetSupportedMemoryClocks() ([]uint32, Return) GetSupportedPerformanceStates() ([]Pstates, Return) GetSupportedVgpus() ([]VgpuTypeId, Return) GetTargetFanSpeed(int) (int, Return) @@ -1067,6 +1087,7 @@ type Device interface { GpmSampleGet(GpmSample) Return GpmSetStreamingEnabled(uint32) Return IsMigDeviceHandle() (bool, Return) + LockNvlinkRemapTable_v1(*NvlinkLockRemapTable_v1) Return OnSameBoard(Device) (int, Return) PerfMetricsGetSamples_v1() (PerfMetricsSamples_v1, Return) PowerSmoothingActivatePresetProfile(*PowerSmoothingProfile) Return @@ -1108,6 +1129,7 @@ type Device interface { SetNvLinkUtilizationControl(int, int, *NvLinkUtilizationControl, bool) Return SetNvlinkBwMode(*NvlinkSetBwMode) Return SetNvlinkBwModeAsync_v1(*NvlinkSetBwModeAsync_v1) Return + SetNvlinkNvleReady_v1(*NvlinkSetNvleReady_v1) Return SetPersistenceMode(EnableState) Return SetPowerManagementLimit(uint32) Return SetPowerManagementLimit_v2(*PowerValue_v2) Return @@ -1118,6 +1140,7 @@ type Device interface { SetVgpuSchedulerState(*VgpuSchedulerSetState) Return SetVgpuSchedulerState_v2(*VgpuSchedulerState_v2) Return SetVirtualizationMode(GpuVirtualizationMode) Return + SetupNvlinkNvleEncryptionKey_v1(*NvlinkSetupNvleEncryptionKey_v1) Return ValidateInforom() Return VgpuForceGspUnload() Return VgpuTypeGetMaxInstances(VgpuTypeId) (int, Return) diff --git a/vendor/modules.txt b/vendor/modules.txt index f4b56ac..2a6bbfa 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,5 +1,5 @@ -# github.com/NVIDIA/go-nvml v0.13.4-1 -## explicit; go 1.20 +# github.com/NVIDIA/go-nvml v0.13.5-0 +## explicit; go 1.21 github.com/NVIDIA/go-nvml/pkg/dl github.com/NVIDIA/go-nvml/pkg/nvml github.com/NVIDIA/go-nvml/pkg/nvml/mock