Skip to content

Commit

Permalink
Merge pull request #1758 from maryamtahhan/hotfix-habana
Browse files Browse the repository at this point in the history
fix: habana image build
  • Loading branch information
vprashar2929 authored Sep 3, 2024
2 parents 527d6a3 + 5b95acb commit 89f868c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/sensors/accelerator/device/sources/dcgm.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (d *GPUDcgm) AbsEnergyFromDevice() []uint32 {
}
// since Kepler collects metrics at intervals of SamplePeriodSec, which is greater than 1 second, it is
// necessary to calculate the energy consumption for the entire waiting period
energy := uint32(uint64(power) * config.SamplePeriodSec)
energy := uint32(uint64(power) * config.SamplePeriodSec())
gpuEnergy = append(gpuEnergy, energy)
}
return gpuEnergy
Expand Down
2 changes: 1 addition & 1 deletion pkg/sensors/accelerator/device/sources/habana.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (g *GPUHabana) AbsEnergyFromDevice() []uint32 {
klog.Errorf("failed to get power usage on device %v: %v\n", dev, ret)
continue
}
energy := uint32(uint64(power) * config.SamplePeriodSec)
energy := uint32(uint64(power) * config.SamplePeriodSec())
gpuEnergy = append(gpuEnergy, energy)

dname, _ := dev.(device.GPUDevice).DeviceHandler.(hlml.Device).Name()
Expand Down
2 changes: 1 addition & 1 deletion pkg/sensors/accelerator/device/sources/nvml.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (n *GPUNvml) AbsEnergyFromDevice() []uint32 {
}
// since Kepler collects metrics at intervals of SamplePeriodSec, which is greater than 1 second, it is
// necessary to calculate the energy consumption for the entire waiting period
energy := uint32(uint64(power) * config.SamplePeriodSec)
energy := uint32(uint64(power) * config.SamplePeriodSec())
gpuEnergy = append(gpuEnergy, energy)
}
return gpuEnergy
Expand Down

0 comments on commit 89f868c

Please sign in to comment.