diff --git a/projects/amdsmi/example/amd_smi_drm_example.cc b/projects/amdsmi/example/amd_smi_drm_example.cc index 8f52d7d832..4dd523f821 100644 --- a/projects/amdsmi/example/amd_smi_drm_example.cc +++ b/projects/amdsmi/example/amd_smi_drm_example.cc @@ -459,15 +459,15 @@ int main() { char bad_page_status_names[3][15] = {"RESERVED", "PENDING", "UNRESERVABLE"}; uint32_t num_pages = 0; - ret = amdsmi_get_bad_page_info(processor_handles[j], &num_pages, + ret = amdsmi_get_gpu_bad_page_info(processor_handles[j], &num_pages, nullptr); CHK_AMDSMI_RET(ret) - printf(" Output of amdsmi_get_bad_page_info:\n"); + printf(" Output of amdsmi_get_gpu_bad_page_info:\n"); if (!num_pages) { printf("\tNo bad pages found.\n"); } else { std::vector bad_page_info(num_pages); - ret = amdsmi_get_bad_page_info(processor_handles[j], &num_pages, + ret = amdsmi_get_gpu_bad_page_info(processor_handles[j], &num_pages, bad_page_info.data()); CHK_AMDSMI_RET(ret) for (uint32_t page_it = 0; page_it < num_pages; page_it += 1) { diff --git a/projects/amdsmi/example/amd_smi_nodrm_example.cc b/projects/amdsmi/example/amd_smi_nodrm_example.cc index e5d86648c0..22fbfc4dae 100644 --- a/projects/amdsmi/example/amd_smi_nodrm_example.cc +++ b/projects/amdsmi/example/amd_smi_nodrm_example.cc @@ -246,15 +246,15 @@ int main() { char bad_page_status_names[3][15] = {"RESERVED", "PENDING", "UNRESERVABLE"}; uint32_t num_pages = 0; - ret = amdsmi_get_bad_page_info(processor_handles[j], &num_pages, + ret = amdsmi_get_gpu_bad_page_info(processor_handles[j], &num_pages, nullptr); CHK_AMDSMI_RET(ret) - printf(" Output of amdsmi_get_bad_page_info:\n"); + printf(" Output of amdsmi_get_gpu_bad_page_info:\n"); if (!num_pages) { printf("\tNo bad pages found.\n"); } else { std::vector bad_page_info(num_pages); - ret = amdsmi_get_bad_page_info(processor_handles[j], &num_pages, + ret = amdsmi_get_gpu_bad_page_info(processor_handles[j], &num_pages, bad_page_info.data()); CHK_AMDSMI_RET(ret) for (uint32_t page_it = 0; page_it < num_pages; page_it += 1) { diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 522d5c196a..b24b1b2683 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -1800,7 +1800,7 @@ amdsmi_get_gpu_memory_usage(amdsmi_processor_handle processor_handle, amdsmi_mem * @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail */ amdsmi_status_t -amdsmi_get_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *info); +amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *info); /** * @brief Returns if RAS features are enabled or disabled for given block diff --git a/projects/amdsmi/py-interface/README.md b/projects/amdsmi/py-interface/README.md index a5e0767564..3867aebcea 100644 --- a/projects/amdsmi/py-interface/README.md +++ b/projects/amdsmi/py-interface/README.md @@ -698,7 +698,7 @@ except AmdSmiException as e: print(e) ``` -## amdsmi_get_bad_page_info +## amdsmi_get_gpu_bad_page_info Description: Returns bad page info for the given GPU Input parameters: @@ -713,7 +713,7 @@ Field | Description `page_size` | Size of bad page `status` | Status of bad page -Exceptions that can be thrown by `amdsmi_get_bad_page_info` function: +Exceptions that can be thrown by `amdsmi_get_gpu_bad_page_info` function: * `AmdSmiLibraryException` * `AmdSmiRetryException` * `AmdSmiParameterException` @@ -726,7 +726,7 @@ try: print("No GPUs on machine") else: for device in devices: - bad_page_info = amdsmi_get_bad_page_info(device) + bad_page_info = amdsmi_get_gpu_bad_page_info(device) if not len(bad_page_info): print("No bad pages found") continue diff --git a/projects/amdsmi/py-interface/__init__.py b/projects/amdsmi/py-interface/__init__.py index 5f8862d19e..b1fb20d1ef 100644 --- a/projects/amdsmi/py-interface/__init__.py +++ b/projects/amdsmi/py-interface/__init__.py @@ -53,7 +53,7 @@ from .amdsmi_interface import amdsmi_get_clock_measure from .amdsmi_interface import amdsmi_get_pcie_link_status from .amdsmi_interface import amdsmi_get_pcie_link_caps -from .amdsmi_interface import amdsmi_get_bad_page_info +from .amdsmi_interface import amdsmi_get_gpu_bad_page_info # # Power Management from .amdsmi_interface import amdsmi_get_gpu_target_frequency_range diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index 69d4f8153b..cb1b8a7d1b 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -726,7 +726,7 @@ def amdsmi_get_clock_measure( } -def amdsmi_get_bad_page_info( +def amdsmi_get_gpu_bad_page_info( processor_handle: amdsmi_wrapper.amdsmi_processor_handle, ) -> Union[list, str]: if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle): @@ -738,7 +738,7 @@ def amdsmi_get_bad_page_info( retired_page_record = ctypes.POINTER( amdsmi_wrapper.amdsmi_retired_page_record_t)() _check_res( - amdsmi_wrapper.amdsmi_get_bad_page_info( + amdsmi_wrapper.amdsmi_get_gpu_bad_page_info( processor_handle, ctypes.byref(num_pages), retired_page_record ) ) diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index 6d7efbea17..c7cec32ee1 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -1475,9 +1475,9 @@ amdsmi_get_gpu_memory_total.argtypes = [amdsmi_processor_handle, amdsmi_memory_t amdsmi_get_gpu_memory_usage = _libraries['libamd_smi.so'].amdsmi_get_gpu_memory_usage amdsmi_get_gpu_memory_usage.restype = amdsmi_status_t amdsmi_get_gpu_memory_usage.argtypes = [amdsmi_processor_handle, amdsmi_memory_type_t, ctypes.POINTER(ctypes.c_uint64)] -amdsmi_get_bad_page_info = _libraries['libamd_smi.so'].amdsmi_get_bad_page_info -amdsmi_get_bad_page_info.restype = amdsmi_status_t -amdsmi_get_bad_page_info.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(struct_c__SA_amdsmi_retired_page_record_t)] +amdsmi_get_gpu_bad_page_info = _libraries['libamd_smi.so'].amdsmi_get_gpu_bad_page_info +amdsmi_get_gpu_bad_page_info.restype = amdsmi_status_t +amdsmi_get_gpu_bad_page_info.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(struct_c__SA_amdsmi_retired_page_record_t)] amdsmi_get_gpu_ras_block_features_enabled = _libraries['libamd_smi.so'].amdsmi_get_gpu_ras_block_features_enabled amdsmi_get_gpu_ras_block_features_enabled.restype = amdsmi_status_t amdsmi_get_gpu_ras_block_features_enabled.argtypes = [amdsmi_processor_handle, amdsmi_gpu_block_t, ctypes.POINTER(c__EA_amdsmi_ras_err_state_t)] @@ -1894,7 +1894,7 @@ __all__ = \ 'amdsmi_func_id_iter_handle_t', 'amdsmi_func_id_value_t', 'amdsmi_fw_block_t', 'amdsmi_fw_block_t__enumvalues', 'amdsmi_fw_info_t', 'amdsmi_get_gpu_asic_info', - 'amdsmi_get_bad_page_info', 'amdsmi_get_gpu_board_info', + 'amdsmi_get_gpu_bad_page_info', 'amdsmi_get_gpu_board_info', 'amdsmi_get_caps_info', 'amdsmi_get_clock_measure', 'amdsmi_get_compute_process_gpus', 'amdsmi_get_compute_process_info', diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index 56e4e90eb2..7f8d103ea8 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -1571,7 +1571,7 @@ amdsmi_get_gpu_ras_block_features_enabled(amdsmi_processor_handle processor_hand } amdsmi_status_t -amdsmi_get_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *info) { +amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *info) { AMDSMI_CHECK_INIT(); if (num_pages == nullptr) {