Skip to content

Commit

Permalink
Merge pull request #2465 from WingkaiHo/fix/predicateGPUbyMemory
Browse files Browse the repository at this point in the history
fix bug predicateGPUbyMemory when gpu id not continuous
  • Loading branch information
volcano-sh-bot authored Aug 29, 2022
2 parents 82e8e03 + ca94392 commit 5b031f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scheduler/plugins/predicates/gpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func predicateGPUbyMemory(pod *v1.Pod, node *api.NodeInfo) []int {

var devIDs []int

for devID := 0; devID < len(allocatableGPUs); devID++ {
for devID := range allocatableGPUs {
if availableGPU, ok := allocatableGPUs[devID]; ok && availableGPU >= gpuRequest {
devIDs = append(devIDs, devID)
}
Expand Down

0 comments on commit 5b031f9

Please sign in to comment.