1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-13 07:46:43 +00:00
This commit is contained in:
2020-04-30 18:50:50 +08:00
parent ff0c10647b
commit 713fbdc4e7
3 changed files with 18 additions and 1 deletions

View File

@@ -281,6 +281,11 @@ func (scheduler *SchedulerFair) AcquireResource(job Job, task Task) NodeStatus {
/* third round, find gpu to be released */
if len(candidates) == 0 && len(job.Tasks) == 1 && task.NumberGPU == 1 && scheduler.enablePreSchedule {
estimate, valid := InstanceOfOptimizer().predictTime(job.Name)
log.Info(pool.TotalGPU)
log.Info(estimate, valid)
log.Info(scheduler.UsingGPU)
if pool.TotalGPU != 0 && float64(scheduler.UsingGPU)/float64(pool.TotalGPU) >= scheduler.enablePreScheduleRatio && valid {
allocationType = 3
for i := 0; i < pool.poolsCount; i++ {