diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 2ff24c7f72..27ab70830d 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -1431,7 +1431,7 @@ amdsmi_status_t amdsmi_get_gpu_subsystem_id(amdsmi_processor_handle processor_ha * @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail */ amdsmi_status_t -amdsmi_dev_get_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len); +amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len); /** * @brief Get the drm minor number associated with this device diff --git a/projects/amdsmi/py-interface/README.md b/projects/amdsmi/py-interface/README.md index f777e8733c..58b320bcad 100644 --- a/projects/amdsmi/py-interface/README.md +++ b/projects/amdsmi/py-interface/README.md @@ -3015,7 +3015,7 @@ except AmdSmiException as e: ``` -## amdsmi_dev_get_subsystem_name +## amdsmi_get_gpu_subsystem_name Description: Get the name string for the device subsytem Input parameters: @@ -3024,7 +3024,7 @@ Input parameters: Output: device subsytem -Exceptions that can be thrown by `amdsmi_dev_get_subsystem_name` function: +Exceptions that can be thrown by `amdsmi_get_gpu_subsystem_name` function: * `AmdSmiLibraryException` * `AmdSmiRetryException` * `AmdSmiParameterException` @@ -3037,7 +3037,7 @@ try: print("No GPUs on machine") else: for device in devices: - subsystem_nam = amdsmi_dev_get_subsystem_name(device) + subsystem_nam = amdsmi_get_gpu_subsystem_name(device) print(subsystem_nam) except AmdSmiException as e: print(e) diff --git a/projects/amdsmi/py-interface/__init__.py b/projects/amdsmi/py-interface/__init__.py index c8b742ae1d..5bcd8b40b3 100644 --- a/projects/amdsmi/py-interface/__init__.py +++ b/projects/amdsmi/py-interface/__init__.py @@ -162,7 +162,7 @@ from .amdsmi_interface import amdsmi_get_gpu_id from .amdsmi_interface import amdsmi_get_gpu_vram_vendor from .amdsmi_interface import amdsmi_dev_get_drm_render_minor from .amdsmi_interface import amdsmi_get_gpu_subsystem_id -from .amdsmi_interface import amdsmi_dev_get_subsystem_name +from .amdsmi_interface import amdsmi_get_gpu_subsystem_name # # Version information from .amdsmi_interface import amdsmi_get_version diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index ec98f9eaef..a48d33a1e9 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -1152,7 +1152,7 @@ def amdsmi_get_gpu_subsystem_id(processor_handle: amdsmi_wrapper.amdsmi_processo return id.value -def amdsmi_dev_get_subsystem_name(processor_handle: amdsmi_wrapper.amdsmi_processor_handle): +def amdsmi_get_gpu_subsystem_name(processor_handle: amdsmi_wrapper.amdsmi_processor_handle): if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle): raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle @@ -1164,7 +1164,7 @@ def amdsmi_dev_get_subsystem_name(processor_handle: amdsmi_wrapper.amdsmi_proces name = ctypes.create_string_buffer(_AMDSMI_STRING_LENGTH) _check_res( - amdsmi_wrapper.amdsmi_dev_get_subsystem_name( + amdsmi_wrapper.amdsmi_get_gpu_subsystem_name( processor_handle, name, length) ) diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index 54080a6cb8..641a3984db 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -1433,9 +1433,9 @@ amdsmi_get_gpu_vram_vendor.argtypes = [amdsmi_processor_handle, ctypes.POINTER(c amdsmi_get_gpu_subsystem_id = _libraries['libamd_smi.so'].amdsmi_get_gpu_subsystem_id amdsmi_get_gpu_subsystem_id.restype = amdsmi_status_t amdsmi_get_gpu_subsystem_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint16)] -amdsmi_dev_get_subsystem_name = _libraries['libamd_smi.so'].amdsmi_dev_get_subsystem_name -amdsmi_dev_get_subsystem_name.restype = amdsmi_status_t -amdsmi_dev_get_subsystem_name.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_char), size_t] +amdsmi_get_gpu_subsystem_name = _libraries['libamd_smi.so'].amdsmi_get_gpu_subsystem_name +amdsmi_get_gpu_subsystem_name.restype = amdsmi_status_t +amdsmi_get_gpu_subsystem_name.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_char), size_t] amdsmi_dev_get_drm_render_minor = _libraries['libamd_smi.so'].amdsmi_dev_get_drm_render_minor amdsmi_dev_get_drm_render_minor.restype = amdsmi_status_t amdsmi_dev_get_drm_render_minor.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32)] @@ -1867,7 +1867,7 @@ __all__ = \ 'amdsmi_dev_get_pci_throughput', 'amdsmi_dev_get_perf_level', 'amdsmi_dev_get_power_ave', 'amdsmi_dev_get_power_profile_presets', - 'amdsmi_get_gpu_subsystem_id', 'amdsmi_dev_get_subsystem_name', + 'amdsmi_get_gpu_subsystem_id', 'amdsmi_get_gpu_subsystem_name', 'amdsmi_dev_get_temp_metric', 'amdsmi_get_gpu_vendor_name', 'amdsmi_dev_get_volt_metric', 'amdsmi_get_gpu_vram_vendor', 'amdsmi_dev_open_supported_func_iterator', diff --git a/projects/amdsmi/py-interface/rocm_smi_tool.py b/projects/amdsmi/py-interface/rocm_smi_tool.py index efc7dc15cd..b7d25d891d 100644 --- a/projects/amdsmi/py-interface/rocm_smi_tool.py +++ b/projects/amdsmi/py-interface/rocm_smi_tool.py @@ -292,7 +292,7 @@ class Formatter: | """ + self.style.text(" 3 Get device vram vendor. Api: amdsmi_get_gpu_vram_vendor ") + """ | | """ + self.style.text(" 4 Get device drm render minor. Api: amdsmi_dev_get_drm_render_minor ") + """ | | """ + self.style.text(" 5 Get device subsystem id. Api: amdsmi_get_gpu_subsystem_id ") + """ | - | """ + self.style.text(" 6 Get device subsystem name. Api: amdsmi_dev_get_subsystem_name ") + """ | + | """ + self.style.text(" 6 Get device subsystem name. Api: amdsmi_get_gpu_subsystem_name ") + """ | | """ + self.style.text(" 7 Get device pci id. Api: amdsmi_dev_get_pci_id ") + """ | | """ + self.style.text(" 8 Get device pci bandwidth. Api: amdsmi_dev_get_pci_bandwidth ") + """ | | """ + self.style.text(" 9 Get device pci throughput. Api: amdsmi_dev_get_pci_throughput ") + """ | @@ -737,7 +737,7 @@ commands = { 5: [smi_api.amdsmi_get_gpu_subsystem_id, { "device_identifier1": [None, True] }], - 6: [smi_api.amdsmi_dev_get_subsystem_name, { + 6: [smi_api.amdsmi_get_gpu_subsystem_name, { "device_identifier1": [None, True] }], 7: [smi_api.amdsmi_dev_get_pci_id, { diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index 95c3193670..91296046f2 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -627,7 +627,7 @@ amdsmi_status_t amdsmi_get_gpu_subsystem_id(amdsmi_processor_handle processor_ha return rsmi_wrapper(rsmi_dev_subsystem_id_get, processor_handle, id); } -amdsmi_status_t amdsmi_dev_get_subsystem_name( +amdsmi_status_t amdsmi_get_gpu_subsystem_name( amdsmi_processor_handle processor_handle, char *name, size_t len) { return rsmi_wrapper(rsmi_dev_subsystem_name_get, processor_handle, name, len); @@ -897,7 +897,7 @@ amdsmi_get_func_iter_value(amdsmi_func_id_iter_handle_t handle, {"rsmi_dev_vendor_name_get", "amdsmi_get_gpu_vendor_name"}, {"rsmi_dev_serial_number_get", "amdsmi_get_asic_info"}, {"rsmi_dev_subsystem_id_get", "amdsmi_get_gpu_subsystem_id"}, - {"rsmi_dev_subsystem_name_get", "amdsmi_dev_get_subsystem_name"}, + {"rsmi_dev_subsystem_name_get", "amdsmi_get_gpu_subsystem_name"}, {"rsmi_dev_drm_render_minor_get", "amdsmi_dev_get_drm_render_minor"}, {"rsmi_dev_subsystem_vendor_id_get", "amdsmi_get_asic_info"}, {"rsmi_dev_unique_id_get", "amdsmi_get_board_info"}, diff --git a/projects/amdsmi/tests/amd_smi_test/functional/id_info_read.cc b/projects/amdsmi/tests/amd_smi_test/functional/id_info_read.cc index c0b34de5ce..052a4cceb6 100755 --- a/projects/amdsmi/tests/amd_smi_test/functional/id_info_read.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/id_info_read.cc @@ -191,12 +191,12 @@ void TestIdInfoRead::Run(void) { err = amdsmi_get_gpu_subsystem_id(processor_handles_[i], nullptr); ASSERT_EQ(err, AMDSMI_STATUS_INVAL); } - err = amdsmi_dev_get_subsystem_name(processor_handles_[i], buffer, kBufferLen); + err = amdsmi_get_gpu_subsystem_name(processor_handles_[i], buffer, kBufferLen); if (err == AMDSMI_STATUS_NOT_SUPPORTED) { std::cout << "\t**Subsystem name string not found on this system." << std::endl; // Verify api support checking functionality is working - err = amdsmi_dev_get_subsystem_name(processor_handles_[i], nullptr, kBufferLen); + err = amdsmi_get_gpu_subsystem_name(processor_handles_[i], nullptr, kBufferLen); ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED); } else { CHK_ERR_ASRT(err) @@ -204,7 +204,7 @@ void TestIdInfoRead::Run(void) { std::cout << "\t**Subsystem name: " << buffer << std::endl; } // Verify api support checking functionality is working - err = amdsmi_dev_get_subsystem_name(processor_handles_[i], nullptr, kBufferLen); + err = amdsmi_get_gpu_subsystem_name(processor_handles_[i], nullptr, kBufferLen); 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 bf7d8b7759..970eded965 100755 --- a/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc @@ -266,7 +266,7 @@ void TestMutualExclusion::Run(void) { amdsmi_dev_name_get amdsmi_dev_brand_get amdsmi_get_gpu_vram_vendor - amdsmi_dev_get_subsystem_name + amdsmi_get_gpu_subsystem_name amdsmi_dev_get_drm_render_minor amdsmi_get_gpu_vendor_name amdsmi_dev_get_pci_bandwidth