Skip to content

Commit

Permalink
[fix] Fix typos in stat.py to collect gpu memory and power correctly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanderG authored and alberttorosyan committed Feb 6, 2024
1 parent cf46d7e commit ac2ad12
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions aim/ext/resource/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ def get_stats(self):
memory = nvml.nvmlDeviceGetMemoryInfo(handle)
# Device memory usage
# 'memory_used': round10e5(memory.used / 1024 / 1024),
gpu_info["gpu_memory_percent"] = (
round10e5(memory.used * 100 / memory.total),
)
gpu_info["gpu_memory_percent"] = round10e5(memory.used * 100 / memory.total)
except nvml.NVMLError_NotSupported:
pass
try:
Expand All @@ -181,7 +179,7 @@ def get_stats(self):
power_cap_watts = power_cap / 1000
power_watts / power_cap_watts * 100
# Power usage in watts and percent
gpu_info["gpu_power_watts"]: round10e5(power_watts)
gpu_info["gpu_power_watts"] = round10e5(power_watts)
# gpu_info["power_percent"] = round10e5(power_usage)
except nvml.NVMLError_NotSupported:
pass
Expand Down

0 comments on commit ac2ad12

Please sign in to comment.