We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 459ebd5 commit b012429Copy full SHA for b012429
pkg/plugin/nvidia/utils.go
@@ -92,8 +92,8 @@ func GetDevices() ([]*pluginapi.Device, map[uint]string) {
92
migs, err := d.GetMigDevices()
93
check(err)
94
for j, mig := range migs {
95
- // TODO: explain formula (based on device and mig numbers)
96
- id = i*uint(2) + i + uint(j)
+ // TODO: explain formula (based on device and mig numbers) i = device index, j = mig index
+ id = i * uint(len(migs)) + uint(j)
97
deviceByIndex[id] = mig.UUID
98
if GetGPUMemory() == uint(0) {
99
SetGPUMemory(uint(*mig.Memory))
0 commit comments