File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,8 @@ func ParseAllocatedGPUs() float64 {
4545 if len (line ) > 0 {
4646 line = strings .Trim (line , "\" " )
4747 descriptor := strings .TrimPrefix (line , "gpu:" )
48- job_gpus , err := strconv .ParseFloat (descriptor , 64 )
49- if err != nil {
50- num_gpus += job_gpus
51- }
48+ job_gpus , _ := strconv .ParseFloat (descriptor , 64 )
49+ num_gpus += job_gpus
5250 }
5351 }
5452 }
@@ -68,12 +66,8 @@ func ParseTotalGPUs() float64 {
6866 descriptor := strings .Fields (line )[1 ]
6967 descriptor = strings .TrimPrefix (descriptor , "gpu:" )
7068 descriptor = strings .Split (descriptor , "(" )[0 ]
71- node_gpus , err := strconv .ParseFloat (descriptor , 64 )
72- log .Infof ("Number of GPUs %f" , node_gpus )
73- if err != nil {
74- log .Infof ("Adding GPUs %f" , node_gpus )
75- num_gpus += node_gpus
76- }
69+ node_gpus , _ := strconv .ParseFloat (descriptor , 64 )
70+ num_gpus += node_gpus
7771 }
7872 }
7973 }
You can’t perform that action at this time.
0 commit comments