Skip to content

Commit

Permalink
Merge pull request #84 from NVIDIA/dependabot/go_modules/main/github.…
Browse files Browse the repository at this point in the history
…com/NVIDIA/go-nvlib-0.6.0

Bump github.com/NVIDIA/go-nvlib from 0.3.0 to 0.6.0
  • Loading branch information
elezar authored Jul 16, 2024
2 parents d672653 + 913f998 commit afa6ff1
Show file tree
Hide file tree
Showing 10 changed files with 267 additions and 56 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.0
toolchain go1.22.5

require (
github.com/NVIDIA/go-nvlib v0.3.0
github.com/NVIDIA/go-nvlib v0.6.0
github.com/NVIDIA/go-nvml v0.12.4-0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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.6.0 h1:zAMBzCYT9xeyRQo0tb7HJbStkzajD6e5joyaQqJ2OGU=
github.com/NVIDIA/go-nvlib v0.6.0/go.mod h1:9UrsLGx/q1OrENygXjOuM5Ey5KCtiZhbvBlbUIxtGWY=
github.com/NVIDIA/go-nvml v0.12.4-0 h1:4tkbB3pT1O77JGr0gQ6uD8FrsUPqP1A/EOEm2wI1TUg=
github.com/NVIDIA/go-nvml v0.12.4-0/go.mod h1:8Llmj+1Rr+9VGGwZuRer5N/aCjxGuR5nPb/9ebBiIEQ=
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
Expand Down
2 changes: 1 addition & 1 deletion pkg/mig/mode/pci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func NewMockPciA100Device() (*mockPciMigModeManager, error) {
return nil, fmt.Errorf("error creating Mock A100 PCI device: %v", err)
}

err = nvpci.AddMockA100("0000:80:05.1", 0)
err = nvpci.AddMockA100("0000:80:05.1", 0, nil)
if err != nil {
return nil, fmt.Errorf("error adding Mock A100 device to MockNvpci: %v", err)
}
Expand Down
9 changes: 4 additions & 5 deletions pkg/types/nvdev.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func nvdevNewMigProfile(giProfileID, ciProfileID, ciEngProfileID int, migMemoryS
nvmllib = nvml.New()
}
if nvdevlib == nil {
nvdevlib = nvdev.New(nvdev.WithNvml(nvmllib))
nvdevlib = nvdev.New(nvmllib)
}

mp, err := nvdevlib.NewMigProfile(giProfileID, ciProfileID, ciEngProfileID, migMemorySizeMB, deviceMemorySizeBytes)
Expand All @@ -57,7 +57,7 @@ func nvdevAssertValidMigProfileFormat(profile string) error {
nvmllib = nvml.New()
}
if nvdevlib == nil {
nvdevlib = nvdev.New(nvdev.WithNvml(nvmllib))
nvdevlib = nvdev.New(nvmllib)
}

return nvdevlib.AssertValidMigProfileFormat(profile)
Expand All @@ -68,7 +68,7 @@ func nvdevParseMigProfile(profile string) (nvdev.MigProfile, error) {
nvmllib = nvml.New()
}
if nvdevlib == nil {
nvdevlib = nvdev.New(nvdev.WithNvml(nvmllib))
nvdevlib = nvdev.New(nvmllib)
}

ret := nvmllib.Init()
Expand Down Expand Up @@ -141,8 +141,7 @@ func SetMockNVdevlib() {
},
}

nvdevlib = nvdev.New(
nvdev.WithNvml(nvmllib),
nvdevlib = nvdev.New(nvmllib,
nvdev.WithVerifySymbols(false),
)
}
18 changes: 5 additions & 13 deletions vendor/github.com/NVIDIA/go-nvlib/pkg/nvlib/device/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 29 additions & 4 deletions vendor/github.com/NVIDIA/go-nvlib/pkg/nvlib/device/device.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

130 changes: 116 additions & 14 deletions vendor/github.com/NVIDIA/go-nvlib/pkg/nvpci/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit afa6ff1

Please sign in to comment.