Skip to content

Commit

Permalink
correct GpuUsageMetric param in GetGPUPower
Browse files Browse the repository at this point in the history
Signed-off-by: Sunyanan Choochotkaew <[email protected]>
  • Loading branch information
sunya-ch committed Aug 24, 2023
1 parent d3c7c8a commit f2da781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/model/estimator/local/ratio.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ func (r *RatioPowerModel) GetGPUPower(isIdlePower bool) ([]float64, error) {

// TODO: idle power should be divided accordinly to the container requested resource
if isIdlePower {
containerPower = r.getPowerByRatio(containerIdx, int(GpuDynPower), int(GpuIdlePower), numContainers)
containerPower = r.getPowerByRatio(containerIdx, int(GpuUsageMetric), int(GpuIdlePower), numContainers)
} else {
containerPower = r.getPowerByRatio(containerIdx, int(GpuDynPower), int(GpuDynPower), numContainers)
containerPower = r.getPowerByRatio(containerIdx, int(GpuUsageMetric), int(GpuDynPower), numContainers)
}
nodeComponentsPowerOfAllContainers = append(nodeComponentsPowerOfAllContainers, containerPower)
}
Expand Down

0 comments on commit f2da781

Please sign in to comment.