Changed power parameter in amdsmi_get_energy_count() to energy_accumulator

Issue linked here: https://github.com/ROCm/amdsmi/issues/38

Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: I622236eb3f0144aefeb6c82d2713b4822bfeeb11
This commit is contained in:
gabrpham authored and Maisam Arif committed 2024-09-04 09:38:08 -04:00
1 parent 3c954e78fc
commit 95ca2b83a1
8 files changed
+36 -29

No files matched your search

+4 -3
View File
@@ -3105,17 +3105,18 @@ def amdsmi_get_energy_count(processor_handle: amdsmi_wrapper.amdsmi_processor_ha
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
)
power = ctypes.c_uint64()
energy_accumulator= ctypes.c_uint64()
counter_resolution = ctypes.c_float()
timestamp = ctypes.c_uint64()
_check_res(
amdsmi_wrapper.amdsmi_get_energy_count(processor_handle, ctypes.byref(
power), ctypes.byref(counter_resolution), ctypes.byref(timestamp))
energy_accumulator), ctypes.byref(counter_resolution), ctypes.byref(timestamp))
)
return {
'power': power.value,
'power': energy_accumulator.value, # deprecating in 6.4
'energy_accumulator': energy_accumulator.value,
'counter_resolution': counter_resolution.value,
'timestamp': timestamp.value,
}