Skip to content

Commit

Permalink
Merge pull request #2577 from WingkaiHo/fix/predicateGPUbyMemory-retu…
Browse files Browse the repository at this point in the history
…rn-ids-with-sequence

fix(predicates/predicateGPUbyMemory): traversal key of map are not sequence
  • Loading branch information
volcano-sh-bot authored Nov 24, 2022
2 parents e9036c2 + 9a872e4 commit a5ca40c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/scheduler/plugins/predicates/gpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package predicates

import (
"fmt"
"sort"

v1 "k8s.io/api/core/v1"
"k8s.io/klog"
Expand Down Expand Up @@ -62,6 +63,7 @@ func predicateGPUbyMemory(pod *v1.Pod, node *api.NodeInfo) []int {
devIDs = append(devIDs, devID)
}
}
sort.Ints(devIDs)
return devIDs
}

Expand Down

0 comments on commit a5ca40c

Please sign in to comment.