Skip to content

Commit

Permalink
update order of traversing CIs in WalkComputeInstances method
Browse files Browse the repository at this point in the history
Signed-off-by: Tariq Ibrahim <[email protected]>
  • Loading branch information
tariq1890 committed Jan 30, 2025
1 parent 39a2cba commit e9352b9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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
replace github.com/NVIDIA/go-nvlib => github.com/NVIDIA/go-nvlib v0.7.1-0.20250129152604-6fdb4960ba28

require (
github.com/NVIDIA/go-nvlib v0.0.0-00010101000000-000000000000
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.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-nvlib v0.7.1-0.20250129152604-6fdb4960ba28 h1:6mBCRfesrQGrs3yHRA9x81m5xOJehgYMKHLj92PsCTE=
github.com/NVIDIA/go-nvlib v0.7.1-0.20250129152604-6fdb4960ba28/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
4 changes: 2 additions & 2 deletions internal/nvlib/mig/mig.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ func (device Device) WalkGpuInstances(f func(nvml.GpuInstance, int, nvml.GpuInst
}

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

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

4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# github.com/NVIDIA/go-nvlib v0.0.0-00010101000000-000000000000 => github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1
# github.com/NVIDIA/go-nvlib v0.0.0-00010101000000-000000000000 => github.com/NVIDIA/go-nvlib v0.7.1-0.20250129152604-6fdb4960ba28
## explicit; go 1.20
github.com/NVIDIA/go-nvlib/pkg/nvlib/device
github.com/NVIDIA/go-nvlib/pkg/nvpci
Expand Down Expand Up @@ -479,4 +479,4 @@ sigs.k8s.io/structured-merge-diff/v4/value
## explicit; go 1.12
sigs.k8s.io/yaml
sigs.k8s.io/yaml/goyaml.v2
# github.com/NVIDIA/go-nvlib => github.com/NVIDIA/go-nvlib v0.7.1-0.20250107124257-ab7bb86cf9d1
# github.com/NVIDIA/go-nvlib => github.com/NVIDIA/go-nvlib v0.7.1-0.20250129152604-6fdb4960ba28

0 comments on commit e9352b9

Please sign in to comment.