File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -763,18 +763,18 @@ func (p *TaskProcessor) updateDecommissionStats(ctx context.Context) error {
763763// For now we only have 1 gpu node per host.
764764// Anything other than that is considered non-gpu.
765765func (p * TaskProcessor ) isGPUTask (t * models.Task ) bool {
766- nodes := t .GetNodes ()
767-
768- if len (nodes ) != 1 {
766+ if len (t .GetNodes ()) == 0 {
769767 return false
770768 }
771769
772- nodeComponent , ok := p .resolveNodeComponent (t , nodes [0 ])
773- if ok && nodeComponent .HasTag ("gpu" ) {
774- return true
770+ for _ , n := range t .GetNodes () {
771+ nodeComponent , ok := p .resolveNodeComponent (t , n )
772+ if ! ok || ! nodeComponent .HasTag ("gpu" ) {
773+ return false
774+ }
775775 }
776776
777- return false
777+ return true
778778}
779779
780780// makeProcessingPlan reorders and filters tasks based on their and cluster states.
You can’t perform that action at this time.
0 commit comments