[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>
Этот коммит содержится в:
Kanangot Balakrishnan, Bindhiya authored and GitHub committed 2025-04-14 04:19:45 -05:00
1 родитель 19a4775d32
Коммит 9d7964dff5
6 files changed
+71 -1

No files matched your search

+5
Просмотреть файл
@@ -712,6 +712,7 @@ class AMDSMICommands():
if 'ras' in current_platform_args:
if args.ras:
ras_dict = {"eeprom_version": "N/A",
"bad_page_threshold": "N/A",
"parity_schema" : "N/A",
"single_bit_schema" : "N/A",
"double_bit_schema" : "N/A",
@@ -735,6 +736,10 @@ class AMDSMICommands():
ras_dict.update(ras_info)
except amdsmi_exception.AmdSmiLibraryException as e:
logging.debug("Failed to get ras info for gpu %s | %s", gpu_id, e.get_error_info())
try:
ras_dict["bad_page_threshold"] = amdsmi_interface.amdsmi_get_gpu_bad_page_threshold(args.gpu)
except amdsmi_exception.AmdSmiLibraryException as e:
logging.debug("Failed to get bad page threshold count for gpu %s | %s", gpu_id, e.get_error_info())
try:
ras_states = amdsmi_interface.amdsmi_get_gpu_ras_block_features_enabled(args.gpu)
+2 -1
Просмотреть файл
@@ -682,7 +682,8 @@ class AMDSMIParser(argparse.ArgumentParser):
clock_help = f"Show one or more valid clock frequency levels. Available options:\n\t{clk_option_str}"
# Options arguments help text for Hypervisors and Baremetal
ras_help = "Displays RAS features information"
# Might be able to remove Sudo requirement in ROCm 7.0
ras_help = "Displays RAS features information;\n\tSudo may be required for some features"
numa_help = "All numa node information" # Linux Baremetal only
partition_help = "Partition information"