Skip to content

Commit ce1b254

Browse files
committed
update order of traversing CIs in WalkComputeInstances method
Signed-off-by: Tariq Ibrahim <[email protected]>
1 parent 1bc5391 commit ce1b254

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.22.0
44

55
toolchain go1.22.5
66

7-
replace github.com/NVIDIA/go-nvlib => github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1
7+
replace github.com/NVIDIA/go-nvlib => github.com/NVIDIA/go-nvlib v0.7.1-0.20250129152604-6fdb4960ba28
88

99
require (
1010
github.com/NVIDIA/go-nvlib v0.0.0-00010101000000-000000000000

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1 h1:pvWhaPRXgbhuIP+XKrLjz+Y5OHHTWMwH9YCCEC0ppO4=
2-
github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1/go.mod h1:9UrsLGx/q1OrENygXjOuM5Ey5KCtiZhbvBlbUIxtGWY=
1+
github.com/NVIDIA/go-nvlib v0.7.1-0.20250129152604-6fdb4960ba28 h1:6mBCRfesrQGrs3yHRA9x81m5xOJehgYMKHLj92PsCTE=
2+
github.com/NVIDIA/go-nvlib v0.7.1-0.20250129152604-6fdb4960ba28/go.mod h1:9UrsLGx/q1OrENygXjOuM5Ey5KCtiZhbvBlbUIxtGWY=
33
github.com/NVIDIA/go-nvml v0.12.4-0 h1:4tkbB3pT1O77JGr0gQ6uD8FrsUPqP1A/EOEm2wI1TUg=
44
github.com/NVIDIA/go-nvml v0.12.4-0/go.mod h1:8Llmj+1Rr+9VGGwZuRer5N/aCjxGuR5nPb/9ebBiIEQ=
55
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=

internal/nvlib/mig/mig.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ func (device Device) WalkGpuInstances(f func(nvml.GpuInstance, int, nvml.GpuInst
9393
}
9494

9595
func (gi GpuInstance) WalkComputeInstances(f func(ci nvml.ComputeInstance, ciProfileId int, ciEngProfileId int, ciProfileInfo nvml.ComputeInstanceProfileInfo) error) error {
96-
for j := 0; j < nvml.COMPUTE_INSTANCE_PROFILE_COUNT; j++ {
97-
for k := 0; k < nvml.COMPUTE_INSTANCE_ENGINE_PROFILE_COUNT; k++ {
96+
for j := nvml.COMPUTE_INSTANCE_PROFILE_COUNT - 1; j >= 0; j-- {
97+
for k := nvml.COMPUTE_INSTANCE_ENGINE_PROFILE_COUNT - 1; k >= 0; k-- {
9898
ciProfileInfo, ret := gi.GetComputeInstanceProfileInfo(j, k)
9999
if ret == nvml.ERROR_NOT_SUPPORTED {
100100
continue

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

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

vendor/modules.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# github.com/NVIDIA/go-nvlib v0.0.0-00010101000000-000000000000 => github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1
1+
# github.com/NVIDIA/go-nvlib v0.0.0-00010101000000-000000000000 => github.com/NVIDIA/go-nvlib v0.7.1-0.20250129152604-6fdb4960ba28
22
## explicit; go 1.20
33
github.com/NVIDIA/go-nvlib/pkg/nvlib/device
44
github.com/NVIDIA/go-nvlib/pkg/nvpci
@@ -478,4 +478,4 @@ sigs.k8s.io/structured-merge-diff/v4/value
478478
## explicit; go 1.12
479479
sigs.k8s.io/yaml
480480
sigs.k8s.io/yaml/goyaml.v2
481-
# github.com/NVIDIA/go-nvlib => github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1
481+
# github.com/NVIDIA/go-nvlib => github.com/NVIDIA/go-nvlib v0.7.1-0.20250129152604-6fdb4960ba28

0 commit comments

Comments
 (0)