File tree Expand file tree Collapse file tree 3 files changed +1
-24
lines changed
binder/plugins/gpusharing/gpu-request Expand file tree Collapse file tree 3 files changed +1
-24
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ func ValidateGpuRequests(pod *v1.Pod) error {
2121 gpuFractionFromAnnotation , hasGpuFractionAnnotation := pod .Annotations [constants .GpuFraction ]
2222 gpuMemoryFromAnnotation , hasGpuMemoryAnnotation := pod .Annotations [constants .GpuMemory ]
2323 gpuFractionsCountFromAnnotation , hasGpuFractionsCount := pod .Annotations [constants .GpuFractionsNumDevices ]
24- _ , hasGpuLimitAnnotation := pod . Annotations [ constants . GpuLimit ]
24+
2525 mpsFromAnnotation , hasMpsAnnotation := pod .Annotations [constants .MpsAnnotation ]
2626 _ , hasGpuResourceRequest := container .Resources .Requests [constants .GpuResource ]
2727 gpuLimitQuantity , hasGpuResourceLimit := container .Resources .Limits [constants .GpuResource ]
@@ -46,10 +46,6 @@ func ValidateGpuRequests(pod *v1.Pod) error {
4646 return fmt .Errorf ("GPU is not not listed in resource limits" )
4747 }
4848
49- if hasGpuLimitAnnotation && ! isFractional {
50- return fmt .Errorf ("cannot have GPU limit annotation without GPU fraction request" )
51- }
52-
5349 if hasGpuResourceLimit && ! isGpuFractionValid (hasWholeGPULimit , gpuLimitQuantity ) {
5450 return fmt .Errorf ("GPU resource limit annotation cannot be larger than 1" )
5551 }
Original file line number Diff line number Diff line change @@ -121,24 +121,6 @@ func TestValidateGpuRequests(t *testing.T) {
121121 },
122122 error : fmt .Errorf ("GPU is not not listed in resource limits" ),
123123 },
124- {
125- name : "forbid fraction limit annotation without fraction request" ,
126- pod : & v1.Pod {
127- ObjectMeta : metav1.ObjectMeta {
128- Annotations : map [string ]string {
129- constants .GpuLimit : "1" ,
130- },
131- },
132- Spec : v1.PodSpec {
133- Containers : []v1.Container {
134- {
135- Resources : v1.ResourceRequirements {},
136- },
137- },
138- },
139- },
140- error : fmt .Errorf ("cannot have GPU limit annotation without GPU fraction request" ),
141- },
142124 {
143125 name : "forbid fraction limit annotation without fraction request" ,
144126 pod : & v1.Pod {
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ const (
2121 GpuMemory = "gpu-memory"
2222 ReceivedResourceType = "received-resource-type"
2323 GpuFractionsNumDevices = "gpu-fraction-num-devices"
24- GpuLimit = "runai-gpu-limit"
2524 MpsAnnotation = "mps"
2625 StalePodgroupTimeStamp = "kai.scheduler/stale-podgroup-timestamp"
2726 LastStartTimeStamp = "kai.scheduler/last-start-timestamp"
You can’t perform that action at this time.
0 commit comments