Commit ac283701 authored by Your Name's avatar Your Name

fix gpu util

parent 3652b317
...@@ -60,11 +60,11 @@ func (c *ProApi) Gpus() ([]Gpu, error) { ...@@ -60,11 +60,11 @@ func (c *ProApi) Gpus() ([]Gpu, error) {
inGpus := make(map[string]Gpu) inGpus := make(map[string]Gpu)
// gpuUtil, err := c.GpuUtil(inGpus) gpuUtil, err := c.GpuUtil(inGpus)
// if err != nil { if err != nil {
// return nil, err return nil, err
// } }
// gpuMemUtil, err := c.GpuMemUtil(gpuUtil) // gpuMemUtil, err := c.GpuMemUtil(gpuUtil)
...@@ -72,7 +72,7 @@ func (c *ProApi) Gpus() ([]Gpu, error) { ...@@ -72,7 +72,7 @@ func (c *ProApi) Gpus() ([]Gpu, error) {
// return nil, err // return nil, err
// } // }
powerUsage, err := c.GpuPowerUsage(inGpus) powerUsage, err := c.GpuPowerUsage(gpuUtil)
if err != nil { if err != nil {
return nil, err return nil, err
...@@ -99,7 +99,6 @@ func (c *ProApi) Gpus() ([]Gpu, error) { ...@@ -99,7 +99,6 @@ func (c *ProApi) Gpus() ([]Gpu, error) {
for uuidStr, gpu := range gpuMemFree { for uuidStr, gpu := range gpuMemFree {
gpu.UUIDStr = uuidStr gpu.UUIDStr = uuidStr
gpu.Performance = int64(comput[gpu.Model]) gpu.Performance = int64(comput[gpu.Model])
gpu.GpuUtil = gpu.MemFree
res = append(res, gpu) res = append(res, gpu)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment