[SWDEV-516592] Add python interface API for Bad Page Threshold (#141)

- Added python interface APIs for amdsmi_get_gpu_bad_page_threshold()
 - Updated the docs and changelog.

---------

Signed-off-by: Kanangot Balakrishnan, Bindhiya <Bindhiya.KanangotBalakrishnan@amd.com>
Signed-off-by: Arif, Maisam <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: 9d7964dff5]
This commit is contained in:
Kanangot Balakrishnan, Bindhiya
2025-04-14 04:19:45 -05:00
zatwierdzone przez GitHub
rodzic 1413ae1431
commit 58b46c5c9d
6 zmienionych plików z 71 dodań i 1 usunięć
@@ -2214,6 +2214,22 @@ def amdsmi_get_gpu_bad_page_info(
return _format_bad_page_info(bad_pages, num_pages)
def amdsmi_get_gpu_bad_page_threshold(
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
) -> Dict[str, Any]:
if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle):
raise AmdSmiParameterException(
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
)
threshold = ctypes.c_uint32()
_check_res(
amdsmi_wrapper.amdsmi_get_gpu_bad_page_threshold(
processor_handle, ctypes.byref(threshold)
)
)
return threshold.value
def amdsmi_get_violation_status(
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,