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) {
inGpus := make(map[string]Gpu)
// gpuUtil, err := c.GpuUtil(inGpus)
gpuUtil, err := c.GpuUtil(inGpus)
// if err != nil {
// return nil, err
// }
if err != nil {
return nil, err
}
// gpuMemUtil, err := c.GpuMemUtil(gpuUtil)
......@@ -72,7 +72,7 @@ func (c *ProApi) Gpus() ([]Gpu, error) {
// return nil, err
// }
powerUsage, err := c.GpuPowerUsage(inGpus)
powerUsage, err := c.GpuPowerUsage(gpuUtil)
if err != nil {
return nil, err
......@@ -99,7 +99,6 @@ func (c *ProApi) Gpus() ([]Gpu, error) {
for uuidStr, gpu := range gpuMemFree {
gpu.UUIDStr = uuidStr
gpu.Performance = int64(comput[gpu.Model])
gpu.GpuUtil = gpu.MemFree
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