Skip to content

Commit

Permalink
WIP: Update vendoring from go-nvlib
Browse files Browse the repository at this point in the history
This pulls in a temporary change to ensure that the CI created within a
GI is always of maximum size. It is a WIP because the change in go-nvlib
is not yet finalized, so we can't actually vendor in the solution yet.

It works by reversing the loop that walks through CIs to ensure that we
visit up any "newer" CI profiles before visiting older ones. The
assumption being that newer ones may provide a CI definition that has a
larger memory slice count with the same compute slice count.
Unfortunately, we don't have a way to distinguish this in the canonical
naming convention, so the same names refers to both MIG devices -- hence
the bug.

We need a more robust / comprehensive solution to this issue, possibly
introducing a "custom" naming convention to distibguish the cases.

Signed-off-by: Kevin Klues <[email protected]>
  • Loading branch information
klueska committed Jan 7, 2025
1 parent 0a4df2c commit 1bc5391
Show file tree
Hide file tree
Showing 5 changed files with 356 additions and 73 deletions.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ go 1.22.0

toolchain go1.22.5

replace github.com/NVIDIA/go-nvlib => github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1

require (
github.com/NVIDIA/go-nvlib v0.7.0
github.com/NVIDIA/go-nvlib v0.0.0-00010101000000-000000000000
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.7.0 h1:Z/J7skMdLbTiHvomKVsGYsttfQMZj5FwNYIFXhZ4i/c=
github.com/NVIDIA/go-nvlib v0.7.0/go.mod h1:9UrsLGx/q1OrENygXjOuM5Ey5KCtiZhbvBlbUIxtGWY=
github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1 h1:pvWhaPRXgbhuIP+XKrLjz+Y5OHHTWMwH9YCCEC0ppO4=
github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1/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.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
Expand Down
6 changes: 3 additions & 3 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.

Loading

0 comments on commit 1bc5391

Please sign in to comment.