From 3693d5a0424e396707ca5db35b703dbc78e86b4f Mon Sep 17 00:00:00 2001 From: Jae-Won Chung Date: Tue, 10 Sep 2024 17:28:45 -0400 Subject: [PATCH] Fix: Add `getAverageMemoryPowerUsage` to `GPUs` as well (#124) --- zeus/device/gpu/common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zeus/device/gpu/common.py b/zeus/device/gpu/common.py index a84c05b7..11c2ebea 100644 --- a/zeus/device/gpu/common.py +++ b/zeus/device/gpu/common.py @@ -253,6 +253,10 @@ def getInstantPowerUsage(self, gpu_index: int) -> int: """Return the current power draw of the GPU. Units: mW.""" return self.gpus[gpu_index].getInstantPowerUsage() + def getAverageMemoryPowerUsage(self, gpu_index: int) -> int: + """Return the average power usage of the GPU's memory. Units: mW.""" + return self.gpus[gpu_index].getAverageMemoryPowerUsage() + def supportsGetTotalEnergyConsumption(self, gpu_index: int) -> bool: """Check if the GPU supports retrieving total energy consumption.""" return self.gpus[gpu_index].supportsGetTotalEnergyConsumption()