Merge pull request #478 from NVIDIA/dependabot/go_modules/main/github.com/NVIDIA/go-nvml-0.12.0-5

Bump github.com/NVIDIA/go-nvml from 0.12.0-4 to 0.12.0-5
This commit is contained in:
Evan Lezar 2024-05-03 13:14:38 +02:00 committed by GitHub
commit a442a5ed1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 29 additions and 29 deletions

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.20
require ( require (
github.com/NVIDIA/go-nvlib v0.3.0 github.com/NVIDIA/go-nvlib v0.3.0
github.com/NVIDIA/go-nvml v0.12.0-4 github.com/NVIDIA/go-nvml v0.12.0-5
github.com/fsnotify/fsnotify v1.7.0 github.com/fsnotify/fsnotify v1.7.0
github.com/opencontainers/runtime-spec v1.2.0 github.com/opencontainers/runtime-spec v1.2.0
github.com/pelletier/go-toml v1.9.5 github.com/pelletier/go-toml v1.9.5

4
go.sum
View File

@ -1,7 +1,7 @@
github.com/NVIDIA/go-nvlib v0.3.0 h1:vd7jSOthJTqzqIWZrv317xDr1+Mnjoy5X4N69W9YwQM= github.com/NVIDIA/go-nvlib v0.3.0 h1:vd7jSOthJTqzqIWZrv317xDr1+Mnjoy5X4N69W9YwQM=
github.com/NVIDIA/go-nvlib v0.3.0/go.mod h1:NasUuId9hYFvwzuOHCu9F2X6oTU2tG0JHTfbJYuDAbA= github.com/NVIDIA/go-nvlib v0.3.0/go.mod h1:NasUuId9hYFvwzuOHCu9F2X6oTU2tG0JHTfbJYuDAbA=
github.com/NVIDIA/go-nvml v0.12.0-4 h1:BvPjnjJr6qje0zov57Md7TwEA8i/12kZeUQIpyWzTEE= github.com/NVIDIA/go-nvml v0.12.0-5 h1:4DYsngBqJEAEj+/RFmBZ43Q3ymoR3tyS0oBuJk12Fag=
github.com/NVIDIA/go-nvml v0.12.0-4/go.mod h1:8Llmj+1Rr+9VGGwZuRer5N/aCjxGuR5nPb/9ebBiIEQ= github.com/NVIDIA/go-nvml v0.12.0-5/go.mod h1:8Llmj+1Rr+9VGGwZuRer5N/aCjxGuR5nPb/9ebBiIEQ=
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=

View File

@ -18,7 +18,7 @@ import "C"
// nvml.Init() // nvml.Init()
func (l *library) Init() Return { func (l *library) Init() Return {
if err := libnvml.load(); err != nil { if err := l.load(); err != nil {
return ERROR_LIBRARY_NOT_FOUND return ERROR_LIBRARY_NOT_FOUND
} }
return nvmlInit() return nvmlInit()
@ -26,7 +26,7 @@ func (l *library) Init() Return {
// nvml.InitWithFlags() // nvml.InitWithFlags()
func (l *library) InitWithFlags(flags uint32) Return { func (l *library) InitWithFlags(flags uint32) Return {
if err := libnvml.load(); err != nil { if err := l.load(); err != nil {
return ERROR_LIBRARY_NOT_FOUND return ERROR_LIBRARY_NOT_FOUND
} }
return nvmlInitWithFlags(flags) return nvmlInitWithFlags(flags)
@ -39,7 +39,7 @@ func (l *library) Shutdown() Return {
return ret return ret
} }
err := libnvml.close() err := l.close()
if err != nil { if err != nil {
return ERROR_UNKNOWN return ERROR_UNKNOWN
} }

View File

@ -198,93 +198,93 @@ func (pis ProcessInfo_v2Slice) ToProcessInfoSlice() []ProcessInfo {
// When new versioned symbols are added, these would have to be initialized above and have // When new versioned symbols are added, these would have to be initialized above and have
// corresponding checks and subsequent assignments added below. // corresponding checks and subsequent assignments added below.
func (l *library) updateVersionedSymbols() { func (l *library) updateVersionedSymbols() {
err := l.LookupSymbol("nvmlInit_v2") err := l.dl.Lookup("nvmlInit_v2")
if err == nil { if err == nil {
nvmlInit = nvmlInit_v2 nvmlInit = nvmlInit_v2
} }
err = l.LookupSymbol("nvmlDeviceGetPciInfo_v2") err = l.dl.Lookup("nvmlDeviceGetPciInfo_v2")
if err == nil { if err == nil {
nvmlDeviceGetPciInfo = nvmlDeviceGetPciInfo_v2 nvmlDeviceGetPciInfo = nvmlDeviceGetPciInfo_v2
} }
err = l.LookupSymbol("nvmlDeviceGetPciInfo_v3") err = l.dl.Lookup("nvmlDeviceGetPciInfo_v3")
if err == nil { if err == nil {
nvmlDeviceGetPciInfo = nvmlDeviceGetPciInfo_v3 nvmlDeviceGetPciInfo = nvmlDeviceGetPciInfo_v3
} }
err = l.LookupSymbol("nvmlDeviceGetCount_v2") err = l.dl.Lookup("nvmlDeviceGetCount_v2")
if err == nil { if err == nil {
nvmlDeviceGetCount = nvmlDeviceGetCount_v2 nvmlDeviceGetCount = nvmlDeviceGetCount_v2
} }
err = l.LookupSymbol("nvmlDeviceGetHandleByIndex_v2") err = l.dl.Lookup("nvmlDeviceGetHandleByIndex_v2")
if err == nil { if err == nil {
nvmlDeviceGetHandleByIndex = nvmlDeviceGetHandleByIndex_v2 nvmlDeviceGetHandleByIndex = nvmlDeviceGetHandleByIndex_v2
} }
err = l.LookupSymbol("nvmlDeviceGetHandleByPciBusId_v2") err = l.dl.Lookup("nvmlDeviceGetHandleByPciBusId_v2")
if err == nil { if err == nil {
nvmlDeviceGetHandleByPciBusId = nvmlDeviceGetHandleByPciBusId_v2 nvmlDeviceGetHandleByPciBusId = nvmlDeviceGetHandleByPciBusId_v2
} }
err = l.LookupSymbol("nvmlDeviceGetNvLinkRemotePciInfo_v2") err = l.dl.Lookup("nvmlDeviceGetNvLinkRemotePciInfo_v2")
if err == nil { if err == nil {
nvmlDeviceGetNvLinkRemotePciInfo = nvmlDeviceGetNvLinkRemotePciInfo_v2 nvmlDeviceGetNvLinkRemotePciInfo = nvmlDeviceGetNvLinkRemotePciInfo_v2
} }
// Unable to overwrite nvmlDeviceRemoveGpu() because the v2 function takes // Unable to overwrite nvmlDeviceRemoveGpu() because the v2 function takes
// a different set of parameters than the v1 function. // a different set of parameters than the v1 function.
//err = l.LookupSymbol("nvmlDeviceRemoveGpu_v2") //err = l.dl.Lookup("nvmlDeviceRemoveGpu_v2")
//if err == nil { //if err == nil {
// nvmlDeviceRemoveGpu = nvmlDeviceRemoveGpu_v2 // nvmlDeviceRemoveGpu = nvmlDeviceRemoveGpu_v2
//} //}
err = l.LookupSymbol("nvmlDeviceGetGridLicensableFeatures_v2") err = l.dl.Lookup("nvmlDeviceGetGridLicensableFeatures_v2")
if err == nil { if err == nil {
nvmlDeviceGetGridLicensableFeatures = nvmlDeviceGetGridLicensableFeatures_v2 nvmlDeviceGetGridLicensableFeatures = nvmlDeviceGetGridLicensableFeatures_v2
} }
err = l.LookupSymbol("nvmlDeviceGetGridLicensableFeatures_v3") err = l.dl.Lookup("nvmlDeviceGetGridLicensableFeatures_v3")
if err == nil { if err == nil {
nvmlDeviceGetGridLicensableFeatures = nvmlDeviceGetGridLicensableFeatures_v3 nvmlDeviceGetGridLicensableFeatures = nvmlDeviceGetGridLicensableFeatures_v3
} }
err = l.LookupSymbol("nvmlDeviceGetGridLicensableFeatures_v4") err = l.dl.Lookup("nvmlDeviceGetGridLicensableFeatures_v4")
if err == nil { if err == nil {
nvmlDeviceGetGridLicensableFeatures = nvmlDeviceGetGridLicensableFeatures_v4 nvmlDeviceGetGridLicensableFeatures = nvmlDeviceGetGridLicensableFeatures_v4
} }
err = l.LookupSymbol("nvmlEventSetWait_v2") err = l.dl.Lookup("nvmlEventSetWait_v2")
if err == nil { if err == nil {
nvmlEventSetWait = nvmlEventSetWait_v2 nvmlEventSetWait = nvmlEventSetWait_v2
} }
err = l.LookupSymbol("nvmlDeviceGetAttributes_v2") err = l.dl.Lookup("nvmlDeviceGetAttributes_v2")
if err == nil { if err == nil {
nvmlDeviceGetAttributes = nvmlDeviceGetAttributes_v2 nvmlDeviceGetAttributes = nvmlDeviceGetAttributes_v2
} }
err = l.LookupSymbol("nvmlComputeInstanceGetInfo_v2") err = l.dl.Lookup("nvmlComputeInstanceGetInfo_v2")
if err == nil { if err == nil {
nvmlComputeInstanceGetInfo = nvmlComputeInstanceGetInfo_v2 nvmlComputeInstanceGetInfo = nvmlComputeInstanceGetInfo_v2
} }
err = l.LookupSymbol("nvmlDeviceGetComputeRunningProcesses_v2") err = l.dl.Lookup("nvmlDeviceGetComputeRunningProcesses_v2")
if err == nil { if err == nil {
deviceGetComputeRunningProcesses = deviceGetComputeRunningProcesses_v2 deviceGetComputeRunningProcesses = deviceGetComputeRunningProcesses_v2
} }
err = l.LookupSymbol("nvmlDeviceGetComputeRunningProcesses_v3") err = l.dl.Lookup("nvmlDeviceGetComputeRunningProcesses_v3")
if err == nil { if err == nil {
deviceGetComputeRunningProcesses = deviceGetComputeRunningProcesses_v3 deviceGetComputeRunningProcesses = deviceGetComputeRunningProcesses_v3
} }
err = l.LookupSymbol("nvmlDeviceGetGraphicsRunningProcesses_v2") err = l.dl.Lookup("nvmlDeviceGetGraphicsRunningProcesses_v2")
if err == nil { if err == nil {
deviceGetGraphicsRunningProcesses = deviceGetGraphicsRunningProcesses_v2 deviceGetGraphicsRunningProcesses = deviceGetGraphicsRunningProcesses_v2
} }
err = l.LookupSymbol("nvmlDeviceGetGraphicsRunningProcesses_v3") err = l.dl.Lookup("nvmlDeviceGetGraphicsRunningProcesses_v3")
if err == nil { if err == nil {
deviceGetGraphicsRunningProcesses = deviceGetGraphicsRunningProcesses_v3 deviceGetGraphicsRunningProcesses = deviceGetGraphicsRunningProcesses_v3
} }
err = l.LookupSymbol("nvmlDeviceGetMPSComputeRunningProcesses_v2") err = l.dl.Lookup("nvmlDeviceGetMPSComputeRunningProcesses_v2")
if err == nil { if err == nil {
deviceGetMPSComputeRunningProcesses = deviceGetMPSComputeRunningProcesses_v2 deviceGetMPSComputeRunningProcesses = deviceGetMPSComputeRunningProcesses_v2
} }
err = l.LookupSymbol("nvmlDeviceGetMPSComputeRunningProcesses_v3") err = l.dl.Lookup("nvmlDeviceGetMPSComputeRunningProcesses_v3")
if err == nil { if err == nil {
deviceGetMPSComputeRunningProcesses = deviceGetMPSComputeRunningProcesses_v3 deviceGetMPSComputeRunningProcesses = deviceGetMPSComputeRunningProcesses_v3
} }
err = l.LookupSymbol("nvmlDeviceGetGpuInstancePossiblePlacements_v2") err = l.dl.Lookup("nvmlDeviceGetGpuInstancePossiblePlacements_v2")
if err == nil { if err == nil {
nvmlDeviceGetGpuInstancePossiblePlacements = nvmlDeviceGetGpuInstancePossiblePlacements_v2 nvmlDeviceGetGpuInstancePossiblePlacements = nvmlDeviceGetGpuInstancePossiblePlacements_v2
} }
err = l.LookupSymbol("nvmlVgpuInstanceGetLicenseInfo_v2") err = l.dl.Lookup("nvmlVgpuInstanceGetLicenseInfo_v2")
if err == nil { if err == nil {
nvmlVgpuInstanceGetLicenseInfo = nvmlVgpuInstanceGetLicenseInfo_v2 nvmlVgpuInstanceGetLicenseInfo = nvmlVgpuInstanceGetLicenseInfo_v2
} }

2
vendor/modules.txt vendored
View File

@ -6,7 +6,7 @@ github.com/NVIDIA/go-nvlib/pkg/nvpci
github.com/NVIDIA/go-nvlib/pkg/nvpci/bytes github.com/NVIDIA/go-nvlib/pkg/nvpci/bytes
github.com/NVIDIA/go-nvlib/pkg/nvpci/mmio github.com/NVIDIA/go-nvlib/pkg/nvpci/mmio
github.com/NVIDIA/go-nvlib/pkg/pciids github.com/NVIDIA/go-nvlib/pkg/pciids
# github.com/NVIDIA/go-nvml v0.12.0-4 # github.com/NVIDIA/go-nvml v0.12.0-5
## explicit; go 1.20 ## explicit; go 1.20
github.com/NVIDIA/go-nvml/pkg/dl github.com/NVIDIA/go-nvml/pkg/dl
github.com/NVIDIA/go-nvml/pkg/nvml github.com/NVIDIA/go-nvml/pkg/nvml