Skip to content

Commit 895a5ed

Browse files
committed
Update to github.com/NVIDIA/go-nvlib@f3264c8a6a7a
Signed-off-by: Christopher Desiniotis <[email protected]>
1 parent 2d7b126 commit 895a5ed

File tree

7 files changed

+103
-175
lines changed

7 files changed

+103
-175
lines changed

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ module github.com/NVIDIA/nvidia-container-toolkit
33
go 1.20
44

55
require (
6-
github.com/NVIDIA/go-nvlib v0.0.0-20231116150931-9fd385bace0d
6+
github.com/NVIDIA/go-nvlib v0.0.0-20231212194527-f3264c8a6a7a
77
github.com/NVIDIA/go-nvml v0.12.0-1.0.20231020145430-e06766c5e74f
88
github.com/fsnotify/fsnotify v1.5.4
9-
github.com/google/uuid v1.4.0
109
github.com/opencontainers/runtime-spec v1.1.0
1110
github.com/pelletier/go-toml v1.9.4
1211
github.com/sirupsen/logrus v1.9.0
@@ -21,6 +20,7 @@ require (
2120
require (
2221
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
2322
github.com/davecgh/go-spew v1.1.1 // indirect
23+
github.com/google/uuid v1.4.0 // indirect
2424
github.com/hashicorp/errwrap v1.1.0 // indirect
2525
github.com/kr/pretty v0.3.1 // indirect
2626
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 // indirect

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
2-
github.com/NVIDIA/go-nvlib v0.0.0-20231116150931-9fd385bace0d h1:XxRHS7eNkZVcPpZZmUcoT4oO8FEcoYKn06sooQh5niU=
3-
github.com/NVIDIA/go-nvlib v0.0.0-20231116150931-9fd385bace0d/go.mod h1:HPFNPAYqQeoos58MKUboWsdZMu71EzSQrbmd+QBRD40=
2+
github.com/NVIDIA/go-nvlib v0.0.0-20231212194527-f3264c8a6a7a h1:aHaNKihxpWzWnV3yoVkit3bhOF7cg2ScCbzW+gepQ/E=
3+
github.com/NVIDIA/go-nvlib v0.0.0-20231212194527-f3264c8a6a7a/go.mod h1:U82N6/xKp6OnoqpALBH0C5SO59Buu4sX1Z3rQtBsBKQ=
44
github.com/NVIDIA/go-nvml v0.12.0-1.0.20231020145430-e06766c5e74f h1:FTblgO87K1vPB8tcwM5EOFpFf6UpsrlDpErPm25mFWE=
55
github.com/NVIDIA/go-nvml v0.12.0-1.0.20231020145430-e06766c5e74f/go.mod h1:7ruy85eOM73muOc/I37euONSwEyFqZsv5ED9AogD4G0=
66
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=

pkg/nvcdi/identifier.go

-76
This file was deleted.

pkg/nvcdi/identifier_test.go

-90
This file was deleted.

pkg/nvcdi/lib-nvml.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,20 @@ func (l *nvmllib) getNVMLDevicesByID(identifiers ...string) ([]nvml.Device, erro
133133

134134
func (l *nvmllib) getNVMLDeviceByID(id string) (nvml.Device, error) {
135135
var err error
136-
devID := identifier(id)
136+
devID := device.Identifier(id)
137137

138-
if devID.isUUID() {
138+
if devID.IsUUID() {
139139
return l.nvmllib.DeviceGetHandleByUUID(id)
140140
}
141141

142-
if devID.isGpuIndex() {
142+
if devID.IsGpuIndex() {
143143
if idx, err := strconv.Atoi(id); err == nil {
144144
return l.nvmllib.DeviceGetHandleByIndex(idx)
145145
}
146146
return nil, fmt.Errorf("failed to convert device index to an int: %w", err)
147147
}
148148

149-
if devID.isMigIndex() {
149+
if devID.IsMigIndex() {
150150
var gpuIdx, migIdx int
151151
var parent nvml.Device
152152
split := strings.SplitN(id, ":", 2)

vendor/github.com/NVIDIA/go-nvlib/pkg/nvlib/device/identifier.go

+94
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# github.com/NVIDIA/go-nvlib v0.0.0-20231116150931-9fd385bace0d
1+
# github.com/NVIDIA/go-nvlib v0.0.0-20231212194527-f3264c8a6a7a
22
## explicit; go 1.20
33
github.com/NVIDIA/go-nvlib/pkg/nvlib/device
44
github.com/NVIDIA/go-nvlib/pkg/nvlib/info

0 commit comments

Comments
 (0)