diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index b3002a63d8..e91a531b17 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -1350,7 +1350,7 @@ amdsmi_status_t amdsmi_get_gpu_id(amdsmi_processor_handle processor_handle, uint * * @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail */ -amdsmi_status_t amdsmi_dev_get_vendor_name(amdsmi_processor_handle processor_handle, char *name, +amdsmi_status_t amdsmi_get_gpu_vendor_name(amdsmi_processor_handle processor_handle, char *name, size_t len); /** diff --git a/projects/amdsmi/py-interface/README.md b/projects/amdsmi/py-interface/README.md index b11cf7a08d..ce8d5345bd 100644 --- a/projects/amdsmi/py-interface/README.md +++ b/projects/amdsmi/py-interface/README.md @@ -2874,7 +2874,7 @@ try: except AmdSmiException as e: print(e) ``` -## amdsmi_dev_get_vendor_name +## amdsmi_get_gpu_vendor_name Description: Returns the device vendor name Input parameters: @@ -2883,7 +2883,7 @@ Input parameters: Output: device vendor name -Exceptions that can be thrown by `amdsmi_dev_get_vendor_name` function: +Exceptions that can be thrown by `amdsmi_get_gpu_vendor_name` function: * `AmdSmiLibraryException` * `AmdSmiRetryException` * `AmdSmiParameterException` @@ -2896,7 +2896,7 @@ try: print("No GPUs on machine") else: for device in devices: - vendor_name = amdsmi_dev_get_vendor_name(device) + vendor_name = amdsmi_get_gpu_vendor_name(device) print(vendor_name) except AmdSmiException as e: print(e) diff --git a/projects/amdsmi/py-interface/__init__.py b/projects/amdsmi/py-interface/__init__.py index 44aa58286c..d6e342f1b8 100644 --- a/projects/amdsmi/py-interface/__init__.py +++ b/projects/amdsmi/py-interface/__init__.py @@ -157,7 +157,7 @@ from .amdsmi_interface import amdsmi_dev_get_memory_reserved_pages from .amdsmi_interface import AmdSmiEventReader # # Device Identification information -from .amdsmi_interface import amdsmi_dev_get_vendor_name +from .amdsmi_interface import amdsmi_get_gpu_vendor_name from .amdsmi_interface import amdsmi_get_gpu_id from .amdsmi_interface import amdsmi_dev_get_vram_vendor from .amdsmi_interface import amdsmi_dev_get_drm_render_minor diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index 26e8031009..66cfe9845f 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -1068,7 +1068,7 @@ def amdsmi_get_processor_handle_from_bdf(bdf): return processor_handle -def amdsmi_dev_get_vendor_name( +def amdsmi_get_gpu_vendor_name( processor_handle: amdsmi_wrapper.amdsmi_processor_handle, ) -> str: if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle): @@ -1082,7 +1082,7 @@ def amdsmi_dev_get_vendor_name( vendor_name = ctypes.create_string_buffer(_AMDSMI_STRING_LENGTH) _check_res( - amdsmi_wrapper.amdsmi_dev_get_vendor_name( + amdsmi_wrapper.amdsmi_get_gpu_vendor_name( processor_handle, vendor_name, length) ) diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index 0690a9d5d8..a13dbec41d 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -1423,9 +1423,9 @@ amdsmi_get_processor_handle_from_bdf.argtypes = [amdsmi_bdf_t, ctypes.POINTER(ct amdsmi_get_gpu_id = _libraries['libamd_smi.so'].amdsmi_get_gpu_id amdsmi_get_gpu_id.restype = amdsmi_status_t amdsmi_get_gpu_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint16)] -amdsmi_dev_get_vendor_name = _libraries['libamd_smi.so'].amdsmi_dev_get_vendor_name -amdsmi_dev_get_vendor_name.restype = amdsmi_status_t -amdsmi_dev_get_vendor_name.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_char), size_t] +amdsmi_get_gpu_vendor_name = _libraries['libamd_smi.so'].amdsmi_get_gpu_vendor_name +amdsmi_get_gpu_vendor_name.restype = amdsmi_status_t +amdsmi_get_gpu_vendor_name.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_char), size_t] uint32_t = ctypes.c_uint32 amdsmi_dev_get_vram_vendor = _libraries['libamd_smi.so'].amdsmi_dev_get_vram_vendor amdsmi_dev_get_vram_vendor.restype = amdsmi_status_t @@ -1868,7 +1868,7 @@ __all__ = \ 'amdsmi_dev_get_power_ave', 'amdsmi_dev_get_power_profile_presets', 'amdsmi_dev_get_subsystem_id', 'amdsmi_dev_get_subsystem_name', - 'amdsmi_dev_get_temp_metric', 'amdsmi_dev_get_vendor_name', + 'amdsmi_dev_get_temp_metric', 'amdsmi_get_gpu_vendor_name', 'amdsmi_dev_get_volt_metric', 'amdsmi_dev_get_vram_vendor', 'amdsmi_dev_open_supported_func_iterator', 'amdsmi_dev_open_supported_variant_iterator', diff --git a/projects/amdsmi/py-interface/rocm_smi_tool.py b/projects/amdsmi/py-interface/rocm_smi_tool.py index b8c165cbea..5352105245 100644 --- a/projects/amdsmi/py-interface/rocm_smi_tool.py +++ b/projects/amdsmi/py-interface/rocm_smi_tool.py @@ -287,7 +287,7 @@ class Formatter: | | | """ + self.style.header("COMMANDS:") + """ | | | - | """ + self.style.text(" 1 Get device vendor name. Api: amdsmi_dev_get_vendor_name ") + """ | + | """ + self.style.text(" 1 Get device vendor name. Api: amdsmi_get_gpu_vendor_name ") + """ | | """ + self.style.text(" 2 Get device id. Api: amdsmi_get_gpu_id ") + """ | | """ + self.style.text(" 3 Get device vram vendor. Api: amdsmi_dev_get_vram_vendor ") + """ | | """ + self.style.text(" 4 Get device drm render minor. Api: amdsmi_dev_get_drm_render_minor ") + """ | @@ -722,7 +722,7 @@ def amdsmi_tool_func_iter_next(dev): commands = { # idx: [func, {arg_name : [arg_type, is_arg_obligatory]}] - 1: [smi_api.amdsmi_dev_get_vendor_name, { + 1: [smi_api.amdsmi_get_gpu_vendor_name, { "device_identifier1": [None, True] }], 2: [smi_api.amdsmi_get_gpu_id, { diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index d2debe13c8..e25dd47f85 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -633,7 +633,7 @@ amdsmi_status_t amdsmi_dev_get_subsystem_name( return rsmi_wrapper(rsmi_dev_subsystem_name_get, processor_handle, name, len); } -amdsmi_status_t amdsmi_dev_get_vendor_name( +amdsmi_status_t amdsmi_get_gpu_vendor_name( amdsmi_processor_handle processor_handle, char *name, size_t len) { return rsmi_wrapper(rsmi_dev_vendor_name_get, processor_handle, name, len); } @@ -894,7 +894,7 @@ amdsmi_get_func_iter_value(amdsmi_func_id_iter_handle_t handle, {"rsmi_dev_name_get", "amdsmi_get_board_info"}, {"rsmi_dev_sku_get", "amdsmi_get_board_info"}, {"rsmi_dev_brand_get", "amdsmi_get_asic_info"}, - {"rsmi_dev_vendor_name_get", "amdsmi_dev_get_vendor_name"}, + {"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_dev_get_subsystem_id"}, {"rsmi_dev_subsystem_name_get", "amdsmi_dev_get_subsystem_name"}, 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 d09175fc23..d8f745affd 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 @@ -159,12 +159,12 @@ void TestIdInfoRead::Run(void) { err = amdsmi_dev_get_drm_render_minor(processor_handles_[i], nullptr); ASSERT_EQ(err, AMDSMI_STATUS_INVAL); } - err = amdsmi_dev_get_vendor_name(processor_handles_[i], buffer, kBufferLen); + err = amdsmi_get_gpu_vendor_name(processor_handles_[i], buffer, kBufferLen); if (err == AMDSMI_STATUS_NOT_SUPPORTED) { std::cout << "\t**Device Vendor name string not found on this system." << std::endl; // Verify api support checking functionality is working - err = amdsmi_dev_get_vendor_name(processor_handles_[i], nullptr, kBufferLen); + err = amdsmi_get_gpu_vendor_name(processor_handles_[i], nullptr, kBufferLen); ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED); } else { CHK_ERR_ASRT(err) @@ -172,7 +172,7 @@ void TestIdInfoRead::Run(void) { std::cout << "\t**Device Vendor name: " << buffer << std::endl; } // Verify api support checking functionality is working - err = amdsmi_dev_get_vendor_name(processor_handles_[i], nullptr, kBufferLen); + err = amdsmi_get_gpu_vendor_name(processor_handles_[i], nullptr, kBufferLen); ASSERT_EQ(err, AMDSMI_STATUS_INVAL); } @@ -213,13 +213,13 @@ void TestIdInfoRead::Run(void) { asci_info.subvendor_id << std::endl; } - err = amdsmi_dev_get_vendor_name(processor_handles_[i], buffer, kBufferLen); + err = amdsmi_get_gpu_vendor_name(processor_handles_[i], buffer, kBufferLen); if (err == AMDSMI_STATUS_NOT_SUPPORTED) { std::cout << "\t**Subsystem Vendor name string not found on this system." << std::endl; // Verify api support checking functionality is working - err = amdsmi_dev_get_vendor_name(processor_handles_[i], nullptr, kBufferLen); + err = amdsmi_get_gpu_vendor_name(processor_handles_[i], nullptr, kBufferLen); ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED); } else { CHK_ERR_ASRT(err) @@ -227,7 +227,7 @@ void TestIdInfoRead::Run(void) { std::cout << "\t**Subsystem Vendor name: " << buffer << std::endl; } // Verify api support checking functionality is working - err = amdsmi_dev_get_vendor_name(processor_handles_[i], nullptr, kBufferLen); + err = amdsmi_get_gpu_vendor_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 f52189f7f8..c77709526c 100755 --- a/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc @@ -209,7 +209,7 @@ void TestMutualExclusion::Run(void) { ret = amdsmi_get_board_info(processor_handles_[0], &board_info); CHECK_RET(ret, AMDSMI_STATUS_BUSY); - ret = amdsmi_dev_get_vendor_name(processor_handles_[0], dmy_str, 10); + ret = amdsmi_get_gpu_vendor_name(processor_handles_[0], dmy_str, 10); CHECK_RET(ret, AMDSMI_STATUS_BUSY); ret = amdsmi_dev_get_vram_vendor(processor_handles_[0], dmy_str, 10); CHECK_RET(ret, AMDSMI_STATUS_BUSY); @@ -268,7 +268,7 @@ void TestMutualExclusion::Run(void) { amdsmi_dev_get_vram_vendor amdsmi_dev_get_subsystem_name amdsmi_dev_get_drm_render_minor - amdsmi_dev_get_vendor_name + amdsmi_get_gpu_vendor_name amdsmi_dev_get_pci_bandwidth amdsmi_dev_set_pci_bandwidth amdsmi_dev_get_pci_throughput