NVIDIA GPU loadable plugin
Source
22
22
Temperature int
23
23
Name string
24
24
MemoryInfo *nvml.MemoryInfo
25
25
MemoryInfoV2 *nvml.MemoryInfoV2
26
26
PcieThroughput uint
27
27
FanSpeed uint
28
28
PowerUsage uint
29
29
WantedErr error
30
30
}
31
31
32
-
func (m *MockRunner) InitNVML() error {
32
+
func (m *MockRunner) Init() error {
33
33
if m.WantedErr != nil {
34
34
return m.WantedErr
35
35
}
36
36
37
37
if m.IsInit {
38
38
return nvml.ErrAlreadyInitialized
39
39
}
40
40
41
41
m.IsInit = true
42
42
return nil
43
43
}
44
44
45
-
func (m *MockRunner) InitNVMLv2() error {
45
+
func (m *MockRunner) InitV2() error {
46
46
if m.WantedErr != nil {
47
47
return m.WantedErr
48
48
}
49
49
50
50
if m.IsInit {
51
51
return nvml.ErrAlreadyInitialized
52
52
}
53
53
54
54
m.IsInit = true
55
55
return nil