Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 93029a1

Browse files
uniemimumadalazar
authored andcommitted
default to all-gpus operation
In case of bad numa label group, return no groups if single-numa operation is requested, as is done with other numa label errors. Signed-off-by: Ukri Niemimuukko <[email protected]>
1 parent 972cbfd commit 93029a1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

gpu-aware-scheduling/pkg/gpuscheduler/scheduler.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -772,9 +772,7 @@ func createGPUMaps(pod *v1.Pod, node *v1.Node, allGPUs []string) []map[string]bo
772772
maps := []map[string]bool{}
773773

774774
if pod.Annotations == nil || node.Labels == nil {
775-
maps = append(maps, createSearchMapFromStrings(allGPUs))
776-
777-
return maps
775+
return []map[string]bool{createSearchMapFromStrings(allGPUs)}
778776
}
779777

780778
_, singleNumaRequested := pod.Annotations[singleNumaAnnotationName]
@@ -787,9 +785,9 @@ func createGPUMaps(pod *v1.Pod, node *v1.Node, allGPUs []string) []map[string]bo
787785
numaGroupSplit := strings.Split(numaGroup, "-")
788786

789787
if len(numaGroupSplit) != numaSplitParts {
790-
klog.Error("bad numa group in label %s", gpuNumaInformation)
788+
klog.Error("node %v bad numa group in label %s", node.Name, gpuNumaInformation)
791789

792-
return maps
790+
return []map[string]bool{}
793791
}
794792

795793
gpuNumbers := numaGroupSplit[1]
@@ -799,7 +797,7 @@ func createGPUMaps(pod *v1.Pod, node *v1.Node, allGPUs []string) []map[string]bo
799797
maps = append(maps, createSearchMapFromStrings(cardNames))
800798
}
801799
} else {
802-
maps = append(maps, createSearchMapFromStrings(allGPUs))
800+
return []map[string]bool{createSearchMapFromStrings(allGPUs)}
803801
}
804802

805803
return maps

0 commit comments

Comments
 (0)