Skip to content

Commit 9b66b93

Browse files
committed
fix: normalize gpu scoring in allocator
1 parent 55fd470 commit 9b66b93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/gpuallocator/gpuallocator.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,12 @@ func (s *GpuAllocator) Score(ctx context.Context, cfg *config.GPUFitConfig, req
580580
for nodeName, gpus := range validNodeGPUs {
581581
for _, gpu := range gpus {
582582
res := strategy.Score(gpu)
583+
584+
// making Pending GPU to lower score, prefer not scheduling to them
585+
if gpu.Status.Phase == tfv1.TensorFusionGPUPhasePending {
586+
res = res / 4
587+
}
588+
583589
if _, exists := result[nodeName]; !exists {
584590
result[nodeName] = make(map[string]int, len(gpus))
585591
}

0 commit comments

Comments
 (0)