diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index e38d06c4e6..6ee1af9f78 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -2679,7 +2679,7 @@ amdsmi_get_version_str(amdsmi_sw_component_t component, char *ver_str, * * @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail */ -amdsmi_status_t amdsmi_dev_get_ecc_count(amdsmi_processor_handle processor_handle, +amdsmi_status_t amdsmi_dev_get_gpu_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_error_count_t *ec); /** diff --git a/projects/amdsmi/py-interface/README.md b/projects/amdsmi/py-interface/README.md index 6537f9ef1d..4874ea24d7 100644 --- a/projects/amdsmi/py-interface/README.md +++ b/projects/amdsmi/py-interface/README.md @@ -2631,7 +2631,7 @@ except AmdSmiException as e: print(e) ``` -## amdsmi_dev_get_ecc_count +## amdsmi_dev_get_gpu_ecc_count Description: Retrieve the error counts for a GPU block Input parameters: @@ -2645,7 +2645,7 @@ Field | Description `correctable_count`| Count of correctable errors `uncorrectable_count`| Count of uncorrectable errors -Exceptions that can be thrown by ` amdsmi_dev_get_ecc_count` function: +Exceptions that can be thrown by ` amdsmi_dev_get_gpu_ecc_count` function: * `AmdSmiLibraryException` * `AmdSmiRetryException` * `AmdSmiParameterException` @@ -2658,7 +2658,7 @@ try: print("No GPUs on machine") else: for device in devices: - ecc_count = amdsmi_dev_get_ecc_count(device, AmdSmiGpuBlock.UMC) + ecc_count = amdsmi_dev_get_gpu_ecc_count(device, AmdSmiGpuBlock.UMC) print(ecc_count) except AmdSmiException as e: print(e) diff --git a/projects/amdsmi/py-interface/__init__.py b/projects/amdsmi/py-interface/__init__.py index 2db2cf0d66..171e721a9b 100644 --- a/projects/amdsmi/py-interface/__init__.py +++ b/projects/amdsmi/py-interface/__init__.py @@ -124,7 +124,7 @@ from .amdsmi_interface import amdsmi_read_counter from .amdsmi_interface import amdsmi_counter_get_available_counters # # Error Query -from .amdsmi_interface import amdsmi_dev_get_ecc_count +from .amdsmi_interface import amdsmi_dev_get_gpu_ecc_count from .amdsmi_interface import amdsmi_dev_get_ecc_enabled from .amdsmi_interface import amdsmi_dev_get_ecc_status from .amdsmi_interface import amdsmi_status_string diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index b99feeaeed..19c8de8bb5 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -2462,7 +2462,7 @@ def amdsmi_get_gpu_power_profile_presets( } -def amdsmi_dev_get_ecc_count( +def amdsmi_dev_get_gpu_ecc_count( processor_handle: amdsmi_wrapper.amdsmi_processor_handle, block: AmdSmiGpuBlock ) -> Dict[str, int]: if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle): @@ -2475,7 +2475,7 @@ def amdsmi_dev_get_ecc_count( ec = amdsmi_wrapper.amdsmi_error_count_t() _check_res( - amdsmi_wrapper. amdsmi_dev_get_ecc_count( + amdsmi_wrapper. amdsmi_dev_get_gpu_ecc_count( processor_handle, block, ctypes.byref(ec)) ) diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index 0335975b9d..6fb1c1cd12 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -1577,9 +1577,9 @@ amdsmi_get_version.argtypes = [ctypes.POINTER(struct_c__SA_amdsmi_version_t)] amdsmi_get_version_str = _libraries['libamd_smi.so'].amdsmi_get_version_str amdsmi_get_version_str.restype = amdsmi_status_t amdsmi_get_version_str.argtypes = [amdsmi_sw_component_t, ctypes.POINTER(ctypes.c_char), uint32_t] -amdsmi_dev_get_ecc_count = _libraries['libamd_smi.so'].amdsmi_dev_get_ecc_count -amdsmi_dev_get_ecc_count.restype = amdsmi_status_t -amdsmi_dev_get_ecc_count.argtypes = [amdsmi_processor_handle, amdsmi_gpu_block_t, ctypes.POINTER(struct_c__SA_amdsmi_error_count_t)] +amdsmi_dev_get_gpu_ecc_count = _libraries['libamd_smi.so'].amdsmi_dev_get_gpu_ecc_count +amdsmi_dev_get_gpu_ecc_count.restype = amdsmi_status_t +amdsmi_dev_get_gpu_ecc_count.argtypes = [amdsmi_processor_handle, amdsmi_gpu_block_t, ctypes.POINTER(struct_c__SA_amdsmi_error_count_t)] amdsmi_dev_get_ecc_enabled = _libraries['libamd_smi.so'].amdsmi_dev_get_ecc_enabled amdsmi_dev_get_ecc_enabled.restype = amdsmi_status_t amdsmi_dev_get_ecc_enabled.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)] @@ -1852,7 +1852,7 @@ __all__ = \ 'amdsmi_dev_close_supported_func_iterator', 'amdsmi_dev_counter_group_supported', 'amdsmi_dev_create_counter', 'amdsmi_dev_destroy_counter', 'amdsmi_get_busy_percent', - 'amdsmi_get_gpu_drm_render_minor', 'amdsmi_dev_get_ecc_count', + 'amdsmi_get_gpu_drm_render_minor', 'amdsmi_dev_get_gpu_ecc_count', 'amdsmi_dev_get_ecc_enabled', 'amdsmi_dev_get_ecc_status', 'amdsmi_get_energy_count', 'amdsmi_get_gpu_fan_rpms', 'amdsmi_get_gpu_fan_speed', 'amdsmi_get_gpu_fan_speed_max', diff --git a/projects/amdsmi/py-interface/rocm_smi_tool.py b/projects/amdsmi/py-interface/rocm_smi_tool.py index a2e7c17077..4dff80901d 100644 --- a/projects/amdsmi/py-interface/rocm_smi_tool.py +++ b/projects/amdsmi/py-interface/rocm_smi_tool.py @@ -321,7 +321,7 @@ class Formatter: | """ + self.style.text("32 Get device power profile presets. Api: amdsmi_get_gpu_power_profile_presets ") + """ | | """ + self.style.text("33 Get the build version. Api: amdsmi_get_version ") + """ | | """ + self.style.text("34 Get version string. Api: amdsmi_get_version_str ") + """ | - | """ + self.style.text("35 Get device ecc counter. Api: amdsmi_dev_get_ecc_count ") + """ | + | """ + self.style.text("35 Get device ecc counter. Api: amdsmi_dev_get_gpu_ecc_count ") + """ | | """ + self.style.text("36 Get device ecc enable. Api: amdsmi_dev_get_ecc_enabled ") + """ | | """ + self.style.text("37 Get device ecc status. Api: amdsmi_dev_get_ecc_status ") + """ | | """ + self.style.text("38 Get status string. Api: amdsmi_status_string ") + """ | @@ -509,7 +509,7 @@ def amdsmi_tool_dev_ecc_count_get(dev): result = {} for gpu_block in smi_api.AmdSmiGpuBlock: try: - value = smi_api. amdsmi_dev_get_ecc_count(dev, gpu_block) + value = smi_api. amdsmi_dev_get_gpu_ecc_count(dev, gpu_block) result.update({gpu_block.name: value}) except smi_api.AmdSmiException as e: print("{}:\t{}".format(gpu_block.name, e)) diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index f47cf3c86b..6f22455f71 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -936,7 +936,7 @@ amdsmi_get_func_iter_value(amdsmi_func_id_iter_handle_t handle, {"rsmi_dev_gpu_clk_freq_get", " amdsmi_get_clk_freq"}, {"rsmi_dev_gpu_clk_freq_set", " amdsmi_set_clk_freq"}, {"rsmi_dev_firmware_version_get", "amdsmi_get_fw_info"}, - {"rsmi_dev_ecc_count_get", " amdsmi_dev_get_ecc_count"}, + {"rsmi_dev_ecc_count_get", " amdsmi_dev_get_gpu_ecc_count"}, {"rsmi_counter_available_counters_get", " amdsmi_counter_get_available_counters"}, {"rsmi_dev_power_ave_get", "amdsmi_get_power_ave"}, {"rsmi_dev_power_cap_get", "amdsmi_get_power_cap_info"}, @@ -1008,7 +1008,7 @@ amdsmi_get_compute_process_gpus(uint32_t pid, uint32_t *dv_indices, return amd::smi::rsmi_to_amdsmi_status(r); } -amdsmi_status_t amdsmi_dev_get_ecc_count(amdsmi_processor_handle processor_handle, +amdsmi_status_t amdsmi_dev_get_gpu_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_error_count_t *ec) { AMDSMI_CHECK_INIT(); diff --git a/projects/amdsmi/tests/amd_smi_test/functional/err_cnt_read.cc b/projects/amdsmi/tests/amd_smi_test/functional/err_cnt_read.cc index db8dc6ba09..2ff4630459 100755 --- a/projects/amdsmi/tests/amd_smi_test/functional/err_cnt_read.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/err_cnt_read.cc @@ -139,7 +139,7 @@ void TestErrCntRead::Run(void) { nullptr); ASSERT_EQ(err, AMDSMI_STATUS_INVAL); - err = amdsmi_dev_get_ecc_count(processor_handles_[i], static_cast(b), &ec); + err = amdsmi_dev_get_gpu_ecc_count(processor_handles_[i], static_cast(b), &ec); if (err == AMDSMI_STATUS_NOT_SUPPORTED) { IF_VERB(STANDARD) { @@ -148,7 +148,7 @@ void TestErrCntRead::Run(void) { ": Not supported for this device" << std::endl; } // Verify api support checking functionality is working - err = amdsmi_dev_get_ecc_count(processor_handles_[i], static_cast(b), + err = amdsmi_dev_get_gpu_ecc_count(processor_handles_[i], static_cast(b), nullptr); ASSERT_EQ(err, AMDSMI_STATUS_INVAL); @@ -164,7 +164,7 @@ void TestErrCntRead::Run(void) { << std::endl; } // Verify api support checking functionality is working - err = amdsmi_dev_get_ecc_count(processor_handles_[i], static_cast(b), + err = amdsmi_dev_get_gpu_ecc_count(processor_handles_[i], static_cast(b), nullptr); ASSERT_EQ(err, AMDSMI_STATUS_INVAL); } diff --git a/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc b/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc index 31965fb834..021caa3372 100755 --- a/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc @@ -249,7 +249,7 @@ void TestMutualExclusion::Run(void) { CHECK_RET(ret, AMDSMI_STATUS_BUSY); ret = amdsmi_set_clk_freq(processor_handles_[0], CLK_TYPE_SYS, 0); CHECK_RET(ret, AMDSMI_STATUS_BUSY); - ret = amdsmi_dev_get_ecc_count(processor_handles_[0], AMDSMI_GPU_BLOCK_UMC, &dmy_err_cnt); + ret = amdsmi_dev_get_gpu_ecc_count(processor_handles_[0], AMDSMI_GPU_BLOCK_UMC, &dmy_err_cnt); CHECK_RET(ret, AMDSMI_STATUS_BUSY); ret = amdsmi_dev_get_ecc_enabled(processor_handles_[0], &dmy_ui64); CHECK_RET(ret, AMDSMI_STATUS_BUSY);