From c63fb35ba80ceb6ccd824e95def14f9e2fa1f4aa Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 15 Nov 2023 21:36:23 +0100 Subject: [PATCH] Use github.com/NVIDIA/go-nvlib imports Signed-off-by: Evan Lezar --- cmd/nvidia-ctk/system/create-dev-char-symlinks/all.go | 2 +- internal/info/additional_info.go | 6 +++--- internal/info/additional_info_test.go | 4 ++-- internal/info/auto.go | 6 +++--- pkg/nvcdi/api.go | 2 +- pkg/nvcdi/common-nvml.go | 2 +- pkg/nvcdi/driver-nvml.go | 2 +- pkg/nvcdi/full-gpu-nvml.go | 4 ++-- pkg/nvcdi/gds.go | 2 +- pkg/nvcdi/lib-csv.go | 2 +- pkg/nvcdi/lib-nvml.go | 4 ++-- pkg/nvcdi/lib-wsl.go | 2 +- pkg/nvcdi/lib.go | 6 +++--- pkg/nvcdi/management.go | 2 +- pkg/nvcdi/mig-device-nvml.go | 4 ++-- pkg/nvcdi/mofed.go | 2 +- pkg/nvcdi/namer.go | 2 +- pkg/nvcdi/namer_nvml_mock.go | 2 +- pkg/nvcdi/namer_test.go | 2 +- pkg/nvcdi/options.go | 4 ++-- 20 files changed, 31 insertions(+), 31 deletions(-) diff --git a/cmd/nvidia-ctk/system/create-dev-char-symlinks/all.go b/cmd/nvidia-ctk/system/create-dev-char-symlinks/all.go index 7dcabf0e..2f9ef5df 100644 --- a/cmd/nvidia-ctk/system/create-dev-char-symlinks/all.go +++ b/cmd/nvidia-ctk/system/create-dev-char-symlinks/all.go @@ -20,10 +20,10 @@ import ( "fmt" "path/filepath" + "github.com/NVIDIA/go-nvlib/pkg/nvpci" "github.com/NVIDIA/nvidia-container-toolkit/internal/info/proc/devices" "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" "github.com/NVIDIA/nvidia-container-toolkit/internal/nvcaps" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvpci" ) type allPossible struct { diff --git a/internal/info/additional_info.go b/internal/info/additional_info.go index 9fffad78..3d37fd2a 100644 --- a/internal/info/additional_info.go +++ b/internal/info/additional_info.go @@ -20,9 +20,9 @@ import ( "fmt" "strings" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/info" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/info" + "github.com/NVIDIA/go-nvlib/pkg/nvml" ) // additionalInfo allows for the info.Interface to be extened to implement the infoInterface. diff --git a/internal/info/additional_info_test.go b/internal/info/additional_info_test.go index 7281f324..a7c9518f 100644 --- a/internal/info/additional_info_test.go +++ b/internal/info/additional_info_test.go @@ -19,9 +19,9 @@ package info import ( "testing" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "github.com/stretchr/testify/require" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" ) func TestUsesNVGPUModule(t *testing.T) { diff --git a/internal/info/auto.go b/internal/info/auto.go index c089b6c2..f72021e9 100644 --- a/internal/info/auto.go +++ b/internal/info/auto.go @@ -17,11 +17,11 @@ package info import ( + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/info" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "github.com/NVIDIA/nvidia-container-toolkit/internal/config/image" "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/info" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" ) // infoInterface provides an alias for mocking. diff --git a/pkg/nvcdi/api.go b/pkg/nvcdi/api.go index aa3fa31a..9d158d8d 100644 --- a/pkg/nvcdi/api.go +++ b/pkg/nvcdi/api.go @@ -17,8 +17,8 @@ package nvcdi import ( + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/spec" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" "tags.cncf.io/container-device-interface/pkg/cdi" "tags.cncf.io/container-device-interface/specs-go" ) diff --git a/pkg/nvcdi/common-nvml.go b/pkg/nvcdi/common-nvml.go index 82c65735..3c9fe6bf 100644 --- a/pkg/nvcdi/common-nvml.go +++ b/pkg/nvcdi/common-nvml.go @@ -23,7 +23,7 @@ import ( "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" "github.com/NVIDIA/nvidia-container-toolkit/internal/lookup" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" + "github.com/NVIDIA/go-nvlib/pkg/nvml" ) // newCommonNVMLDiscoverer returns a discoverer for entities that are not associated with a specific CDI device. diff --git a/pkg/nvcdi/driver-nvml.go b/pkg/nvcdi/driver-nvml.go index a2a4a41c..cbc892af 100644 --- a/pkg/nvcdi/driver-nvml.go +++ b/pkg/nvcdi/driver-nvml.go @@ -22,11 +22,11 @@ import ( "path/filepath" "strings" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "github.com/NVIDIA/nvidia-container-toolkit/internal/discover" "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" "github.com/NVIDIA/nvidia-container-toolkit/internal/lookup" "github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/cuda" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" "golang.org/x/sys/unix" ) diff --git a/pkg/nvcdi/full-gpu-nvml.go b/pkg/nvcdi/full-gpu-nvml.go index e69bb033..b808153b 100644 --- a/pkg/nvcdi/full-gpu-nvml.go +++ b/pkg/nvcdi/full-gpu-nvml.go @@ -22,12 +22,12 @@ import ( "path/filepath" "strings" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "github.com/NVIDIA/nvidia-container-toolkit/internal/discover" "github.com/NVIDIA/nvidia-container-toolkit/internal/edits" "github.com/NVIDIA/nvidia-container-toolkit/internal/info/drm" "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" "tags.cncf.io/container-device-interface/pkg/cdi" "tags.cncf.io/container-device-interface/specs-go" ) diff --git a/pkg/nvcdi/gds.go b/pkg/nvcdi/gds.go index 06ca770a..3cb5bcf2 100644 --- a/pkg/nvcdi/gds.go +++ b/pkg/nvcdi/gds.go @@ -19,10 +19,10 @@ package nvcdi import ( "fmt" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" "github.com/NVIDIA/nvidia-container-toolkit/internal/discover" "github.com/NVIDIA/nvidia-container-toolkit/internal/edits" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/spec" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" "tags.cncf.io/container-device-interface/pkg/cdi" "tags.cncf.io/container-device-interface/specs-go" ) diff --git a/pkg/nvcdi/lib-csv.go b/pkg/nvcdi/lib-csv.go index 6ac1e257..e0b7fbc6 100644 --- a/pkg/nvcdi/lib-csv.go +++ b/pkg/nvcdi/lib-csv.go @@ -19,11 +19,11 @@ package nvcdi import ( "fmt" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" "github.com/NVIDIA/nvidia-container-toolkit/internal/discover" "github.com/NVIDIA/nvidia-container-toolkit/internal/edits" "github.com/NVIDIA/nvidia-container-toolkit/internal/platform-support/tegra" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/spec" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" "tags.cncf.io/container-device-interface/pkg/cdi" "tags.cncf.io/container-device-interface/specs-go" ) diff --git a/pkg/nvcdi/lib-nvml.go b/pkg/nvcdi/lib-nvml.go index d2d3cf52..c49833cf 100644 --- a/pkg/nvcdi/lib-nvml.go +++ b/pkg/nvcdi/lib-nvml.go @@ -19,10 +19,10 @@ package nvcdi import ( "fmt" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "github.com/NVIDIA/nvidia-container-toolkit/internal/edits" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/spec" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" "tags.cncf.io/container-device-interface/pkg/cdi" "tags.cncf.io/container-device-interface/specs-go" ) diff --git a/pkg/nvcdi/lib-wsl.go b/pkg/nvcdi/lib-wsl.go index f98c919c..23ee79bd 100644 --- a/pkg/nvcdi/lib-wsl.go +++ b/pkg/nvcdi/lib-wsl.go @@ -19,9 +19,9 @@ package nvcdi import ( "fmt" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" "github.com/NVIDIA/nvidia-container-toolkit/internal/edits" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/spec" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" "tags.cncf.io/container-device-interface/pkg/cdi" "tags.cncf.io/container-device-interface/specs-go" ) diff --git a/pkg/nvcdi/lib.go b/pkg/nvcdi/lib.go index be4e62af..f5b53245 100644 --- a/pkg/nvcdi/lib.go +++ b/pkg/nvcdi/lib.go @@ -19,13 +19,13 @@ package nvcdi import ( "fmt" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/info" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" "github.com/NVIDIA/nvidia-container-toolkit/internal/platform-support/tegra/csv" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/spec" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/transform" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/info" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" ) type wrapper struct { diff --git a/pkg/nvcdi/management.go b/pkg/nvcdi/management.go index 5a740d8a..626a6c2b 100644 --- a/pkg/nvcdi/management.go +++ b/pkg/nvcdi/management.go @@ -21,11 +21,11 @@ import ( "path/filepath" "strings" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" "github.com/NVIDIA/nvidia-container-toolkit/internal/discover" "github.com/NVIDIA/nvidia-container-toolkit/internal/edits" "github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/cuda" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/spec" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" "tags.cncf.io/container-device-interface/pkg/cdi" "tags.cncf.io/container-device-interface/specs-go" ) diff --git a/pkg/nvcdi/mig-device-nvml.go b/pkg/nvcdi/mig-device-nvml.go index 1f37ee80..a442a738 100644 --- a/pkg/nvcdi/mig-device-nvml.go +++ b/pkg/nvcdi/mig-device-nvml.go @@ -19,12 +19,12 @@ package nvcdi import ( "fmt" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "github.com/NVIDIA/nvidia-container-toolkit/internal/discover" "github.com/NVIDIA/nvidia-container-toolkit/internal/edits" "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" "github.com/NVIDIA/nvidia-container-toolkit/internal/nvcaps" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" "tags.cncf.io/container-device-interface/pkg/cdi" "tags.cncf.io/container-device-interface/specs-go" ) diff --git a/pkg/nvcdi/mofed.go b/pkg/nvcdi/mofed.go index 78af1635..39b0f537 100644 --- a/pkg/nvcdi/mofed.go +++ b/pkg/nvcdi/mofed.go @@ -19,10 +19,10 @@ package nvcdi import ( "fmt" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" "github.com/NVIDIA/nvidia-container-toolkit/internal/discover" "github.com/NVIDIA/nvidia-container-toolkit/internal/edits" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/spec" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" "tags.cncf.io/container-device-interface/pkg/cdi" "tags.cncf.io/container-device-interface/specs-go" ) diff --git a/pkg/nvcdi/namer.go b/pkg/nvcdi/namer.go index 8e443cdb..b460611c 100644 --- a/pkg/nvcdi/namer.go +++ b/pkg/nvcdi/namer.go @@ -20,7 +20,7 @@ import ( "errors" "fmt" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" + "github.com/NVIDIA/go-nvlib/pkg/nvml" ) // UUIDer is an interface for getting UUIDs. diff --git a/pkg/nvcdi/namer_nvml_mock.go b/pkg/nvcdi/namer_nvml_mock.go index f87a0fcb..4cc958f7 100644 --- a/pkg/nvcdi/namer_nvml_mock.go +++ b/pkg/nvcdi/namer_nvml_mock.go @@ -4,7 +4,7 @@ package nvcdi import ( - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "sync" ) diff --git a/pkg/nvcdi/namer_test.go b/pkg/nvcdi/namer_test.go index 30169267..1a106f68 100644 --- a/pkg/nvcdi/namer_test.go +++ b/pkg/nvcdi/namer_test.go @@ -19,8 +19,8 @@ package nvcdi import ( "testing" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "github.com/stretchr/testify/require" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" ) func TestConvert(t *testing.T) { diff --git a/pkg/nvcdi/options.go b/pkg/nvcdi/options.go index 61c4c956..03cfc362 100644 --- a/pkg/nvcdi/options.go +++ b/pkg/nvcdi/options.go @@ -17,10 +17,10 @@ package nvcdi import ( + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvlib/pkg/nvml" "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" "github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/transform" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/device" - "gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvml" ) // Option is a function that configures the nvcdilib