[SWDEV-508173] [AMDSMI] Python API missing function errors (#46)

* [SWDEV-508173] Updates include:
- Updating py-interface to import amdsmi_get_gpu_reg_table_info and amdsmi_get_gpu_pm_metrics_info.
- Updating the ctypes from byref to pointer.

Signed-off-by: Castillo, Juan <Juan.Castillo@amd.com>
This commit is contained in:
Castillo, Juan
2025-01-21 14:11:41 -06:00
zatwierdzone przez GitHub
rodzic 03a2368655
commit 9cc5c303a2
3 zmienionych plików z 40 dodań i 7 usunięć
+6 -6
Wyświetl plik
@@ -1778,12 +1778,12 @@ def amdsmi_get_gpu_pm_metrics_info(
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
)
pm_metrics = ctypes.POINTER(amdsmi_wrapper.amdsmi_name_value_t)
num_mets = ctypes.c_uint32
pm_metrics = ctypes.POINTER(amdsmi_wrapper.amdsmi_name_value_t)()
num_mets = ctypes.c_uint32()
_check_res(
amdsmi_wrapper.amdsmi_get_gpu_pm_metrics_info(
processor_handle, ctypes.byref(pm_metrics), ctypes.byref(num_mets)
processor_handle, ctypes.pointer(pm_metrics), ctypes.byref(num_mets)
)
)
@@ -1807,12 +1807,12 @@ def amdsmi_get_gpu_reg_table_info(
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
)
reg_metrics = ctypes.POINTER(amdsmi_wrapper.amdsmi_name_value_t)
num_regs = ctypes.c_uint32
reg_metrics = ctypes.POINTER(amdsmi_wrapper.amdsmi_name_value_t)()
num_regs = ctypes.c_uint32()
_check_res(
amdsmi_wrapper.amdsmi_get_gpu_reg_table_info(
processor_handle, reg_type, ctypes.byref(reg_metrics), ctypes.byref(num_regs)
processor_handle, reg_type, ctypes.pointer(reg_metrics), ctypes.byref(num_regs)
)
)