File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ func (g *gpuGraceACPI) findModulePowerPaths() error {
97
97
continue
98
98
}
99
99
100
- socketNum := - 1
100
+ var socketNum int
101
101
if strings .HasSuffix (label , "Socket 0" ) {
102
102
socketNum = 0
103
103
} else if strings .HasSuffix (label , "Socket 1" ) {
Original file line number Diff line number Diff line change @@ -36,11 +36,6 @@ const (
36
36
graceOemInfoFile = "_oem_info"
37
37
graceAverageFile = "_average"
38
38
39
- // Grace power component identifiers from hwmon
40
- gracePowerLabel = "Grace Power Socket" // Total socket power including DRAM
41
- graceCPULabel = "CPU Power Socket" // CPU rail power
42
- graceSysIOLabel = "SysIO Power Socket" // SOC rail power
43
-
44
39
// Conversion factors
45
40
microWattToMilliJoule = 1000 // Convert microwatts to mJ assuming 1 second sampling
46
41
)
@@ -82,7 +77,7 @@ func (g *GraceACPI) findPowerPathsByLabel() error {
82
77
83
78
// Extract socket number and power type
84
79
// Per docs, Grace has 2 sockets, Grace Hopper has 1 CPU and 1 GPU socket
85
- socketNum := - 1
80
+ var socketNum int
86
81
if strings .HasSuffix (label , "Socket 0" ) {
87
82
socketNum = 0
88
83
} else if strings .HasSuffix (label , "Socket 1" ) {
You can’t perform that action at this time.
0 commit comments