Skip to content

Commit

Permalink
remove lines
Browse files Browse the repository at this point in the history
Signed-off-by: peiniliu <[email protected]>
  • Loading branch information
peiniliu committed Aug 30, 2021
1 parent c3611d1 commit f6d8583
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions pkg/scheduler/api/pod_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ func GetGPUIndex(pod *v1.Pod) []int {
if len(pod.Annotations) > 0 {
value, found := pod.Annotations[GPUIndex]
if found {
//id, err := strconv.Atoi(value)
//if err != nil {
// klog.Errorf("invalid %s=%s", GPUIndex, value)
// return nil
//}
ids := strings.Split(value, ",")
idSlice := make([]int, len(ids))
for idx, id := range ids {
Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/plugins/predicates/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (pp *predicatesPlugin) OnSessionOpen(ssn *framework.Session) {
return
}

if predicate.gpuSharingEnable && (api.GetGPUResourceOfPod(pod) > 0 || api.GetGPUNumberOfPod(pod) > 0) {
if (predicate.gpuSharingEnable && api.GetGPUResourceOfPod(pod) > 0) || (predicate.gpuNumberEnable && api.GetGPUNumberOfPod(pod) > 0) {
// deallocate pod gpu id
ids := api.GetGPUIndex(pod)
patch := api.RemoveGPUIndexPatch()
Expand Down

0 comments on commit f6d8583

Please sign in to comment.