harmonytask task with no gpu
This commit is contained in:
parent
c73f35dcea
commit
4f2650b0c0
@ -219,8 +219,12 @@ func (h *taskTypeHandler) AssertMachineHasCapacity() error {
|
||||
if r.Gpu-h.Cost.Gpu < 0 {
|
||||
return errors.New("Did not accept " + h.Name + " task: out of available GPU")
|
||||
}
|
||||
gpuRamSum := lo.Sum(h.Cost.GpuRam)
|
||||
if gpuRamSum == 0 {
|
||||
goto enoughGpuRam
|
||||
}
|
||||
for _, u := range r.GpuRam {
|
||||
if u >= lo.Sum(h.Cost.GpuRam) {
|
||||
if u >= gpuRamSum {
|
||||
goto enoughGpuRam
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user