Updated amdsmi_get_driver_info() to handle empty strings (#126)

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: 9d2bbcf14d]
Этот коммит содержится в:
Arif, Maisam
2025-02-21 19:15:18 -06:00
коммит произвёл GitHub
родитель ccb51bf977
Коммит 5e4f1bb245
2 изменённых файлов: 8 добавлений и 2 удалений
+1 -1
Просмотреть файл
@@ -817,7 +817,7 @@ class AMDSMIParser(argparse.ArgumentParser):
perf_level_help = "Current DPM performance level"
xgmi_err_help = "XGMI error information since last read"
energy_help = "Amount of energy consumed"
throttle_help = "Displays throttle accumulators; Only available for MI300 or newer ASICs"
throttle_help = "Displays throttle accumulators;\n Only available for MI300 or newer ASICs"
# Help text for Arguments only on Hypervisors
schedule_help = "All scheduling information"
+7 -1
Просмотреть файл
@@ -2297,12 +2297,18 @@ def amdsmi_get_gpu_driver_info(
)
)
return {
driver_info = {
"driver_name": info.driver_name.decode("utf-8"),
"driver_version": info.driver_version.decode("utf-8"),
"driver_date": info.driver_date.decode("utf-8")
}
for key, value in driver_info.items():
if value == "":
driver_info[key] = "N/A"
return driver_info
def amdsmi_get_power_info(
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,