Skip to content

Commit

Permalink
fix id of gpu devices never delete when number gpu decrease
Browse files Browse the repository at this point in the history
  • Loading branch information
yongjiahe committed May 7, 2022
1 parent 6ea2341 commit 5846a5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/scheduler/api/node_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ func (ni *NodeInfo) setNodeGPUInfo(node *v1.Node) {
}

memoryPerCard := uint(totalMemory / gpuNumber)
ni.GPUDevices = make(map[int]*GPUDevice)
for i := 0; i < int(gpuNumber); i++ {
ni.GPUDevices[i] = NewGPUDevice(i, memoryPerCard)
}
Expand Down

0 comments on commit 5846a5d

Please sign in to comment.