Skip to content

Commit 82d8924

Browse files
authored
Merge pull request #32 from elezar/update-go-nvml-interfaces
Update go nvml interfaces
2 parents 12679f8 + 8d13604 commit 82d8924

51 files changed

Lines changed: 28304 additions & 5705 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ module github.com/NVIDIA/go-gpuallocator
33
go 1.20
44

55
require (
6-
github.com/NVIDIA/go-nvlib v0.2.0
6+
github.com/NVIDIA/go-nvlib v0.3.0
7+
github.com/NVIDIA/go-nvml v0.12.0-4
78
github.com/stretchr/testify v1.9.0
89
)
910

1011
require (
11-
github.com/NVIDIA/go-nvml v0.12.0-3 // indirect
1212
github.com/davecgh/go-spew v1.1.1 // indirect
1313
github.com/google/uuid v1.6.0 // indirect
1414
github.com/pmezard/go-difflib v1.0.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
github.com/NVIDIA/go-nvlib v0.2.0 h1:roq+SDstbP1fcy2XVH7wB2Gz2/Ud7Q+NGQYOcVITVrA=
2-
github.com/NVIDIA/go-nvlib v0.2.0/go.mod h1:kFuLNTyD1tF6FbRFlk+/EdUW5BrkE+v1Y3A3/9zKSjA=
3-
github.com/NVIDIA/go-nvml v0.12.0-3 h1:QwfjYxEqIQVRhl8327g2Y3ZvKResPydpGSKtCIIK9jE=
4-
github.com/NVIDIA/go-nvml v0.12.0-3/go.mod h1:SOufGc5Wql+cxrIZ8RyJwVKDYxfbs4WPkHXqadcbfvA=
1+
github.com/NVIDIA/go-nvlib v0.3.0 h1:vd7jSOthJTqzqIWZrv317xDr1+Mnjoy5X4N69W9YwQM=
2+
github.com/NVIDIA/go-nvlib v0.3.0/go.mod h1:NasUuId9hYFvwzuOHCu9F2X6oTU2tG0JHTfbJYuDAbA=
3+
github.com/NVIDIA/go-nvml v0.12.0-4 h1:BvPjnjJr6qje0zov57Md7TwEA8i/12kZeUQIpyWzTEE=
4+
github.com/NVIDIA/go-nvml v0.12.0-4/go.mod h1:8Llmj+1Rr+9VGGwZuRer5N/aCjxGuR5nPb/9ebBiIEQ=
55
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
66
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
77
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=

gpuallocator/allocator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
"runtime"
88

9-
"github.com/NVIDIA/go-nvlib/pkg/nvml"
9+
"github.com/NVIDIA/go-nvml/pkg/nvml"
1010
)
1111

1212
// Allocator defines the primary object for allocating and freeing the

gpuallocator/device.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"strings"
99

1010
"github.com/NVIDIA/go-nvlib/pkg/nvlib/device"
11-
"github.com/NVIDIA/go-nvlib/pkg/nvml"
11+
"github.com/NVIDIA/go-nvml/pkg/nvml"
1212

1313
"github.com/NVIDIA/go-gpuallocator/internal/links"
1414
)

gpuallocator/device_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ package gpuallocator
1919
import (
2020
"testing"
2121

22-
"github.com/NVIDIA/go-nvlib/pkg/nvml"
22+
"github.com/NVIDIA/go-nvml/pkg/nvml"
23+
"github.com/NVIDIA/go-nvml/pkg/nvml/mock"
2324
"github.com/stretchr/testify/require"
2425
)
2526

2627
func TestDeviceListFilter(t *testing.T) {
27-
singleDeviceNVML := &nvml.InterfaceMock{
28+
singleDeviceNVML := &mock.Interface{
2829
InitFunc: func() nvml.Return {
2930
return nvml.SUCCESS
3031
},
@@ -35,7 +36,7 @@ func TestDeviceListFilter(t *testing.T) {
3536
return 1, nvml.SUCCESS
3637
},
3738
DeviceGetHandleByIndexFunc: func(Index int) (nvml.Device, nvml.Return) {
38-
device := &nvml.DeviceMock{
39+
device := &mock.Device{
3940
GetNameFunc: func() (string, nvml.Return) {
4041
return "Device0", nvml.SUCCESS
4142
},

gpuallocator/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package gpuallocator
1818

1919
import (
2020
"github.com/NVIDIA/go-nvlib/pkg/nvlib/device"
21-
"github.com/NVIDIA/go-nvlib/pkg/nvml"
21+
"github.com/NVIDIA/go-nvml/pkg/nvml"
2222
)
2323

2424
// deviceListBuilder stores the options required to build a list of linked devices.

internal/links/device.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"fmt"
2121

2222
"github.com/NVIDIA/go-nvlib/pkg/nvlib/device"
23-
"github.com/NVIDIA/go-nvlib/pkg/nvml"
23+
"github.com/NVIDIA/go-nvml/pkg/nvml"
2424
)
2525

2626
// P2PLinkType defines the link information between two devices.

internal/links/pciinfo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"strconv"
2424
"strings"
2525

26-
"github.com/NVIDIA/go-nvlib/pkg/nvml"
26+
"github.com/NVIDIA/go-nvml/pkg/nvml"
2727
)
2828

2929
// PciInfo is a type alias to nvml.PciInfo to allow for functions to be defined on the type.

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

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)