From cbdf893fb2d506398d6283f66f2a999c0ae8d9c5 Mon Sep 17 00:00:00 2001 From: Jae-Won Chung Date: Tue, 10 Sep 2024 17:24:11 -0400 Subject: [PATCH] Add `getAverageMemoryPowerUsage` to `GPUs` as well --- 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()