Skip to content

Commit

Permalink
Fixed dcgm.WatchPidFields using wrong time unit
Browse files Browse the repository at this point in the history
Signed-off-by: helinfan.hlf <[email protected]>
  • Loading branch information
helinfan.hlf committed Oct 27, 2023
1 parent d898cc7 commit 875019b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/dcgm/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"
"sync"
"time"
)

var (
Expand Down Expand Up @@ -89,7 +90,7 @@ func GetDeviceTopology(gpuId uint) ([]P2PLink, error) {
// WatchPidFields lets DCGM start recording stats for GPU process
// It needs to be called before calling GetProcessInfo
func WatchPidFields() (GroupHandle, error) {
return watchPidFields(defaultUpdateFreq, defaultMaxKeepAge, defaultMaxKeepSamples)
return watchPidFields(time.Microsecond * time.Duration(defaultUpdateFreq), time.Second * time.Duration(defaultMaxKeepAge), defaultMaxKeepSamples)
}

// GetProcessInfo provides detailed per GPU stats for this process
Expand Down

0 comments on commit 875019b

Please sign in to comment.