From a3ec450571875af2a3c76c90c352623aba611fa4 Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Fri, 2 Jun 2023 01:19:26 -0500 Subject: [PATCH] Cleaned up APIs Change-Id: I93487e01d7126bdfa77439b571df927a6af3bb70 Signed-off-by: Maisam Arif [ROCm/amdsmi commit: 9cebc93ceefed3047ab01361baf7aeb44f825965] --- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 4 +- projects/amdsmi/include/amd_smi/amdsmi.h | 6 +-- projects/amdsmi/py-interface/README.md | 12 ++--- projects/amdsmi/py-interface/__init__.py | 4 +- .../amdsmi/py-interface/amdsmi_interface.py | 54 +++++++++---------- .../amdsmi/py-interface/amdsmi_wrapper.py | 16 +++--- projects/amdsmi/py-interface/rocm_smi_tool.py | 2 +- projects/amdsmi/src/amd_smi/amd_smi.cc | 4 +- .../amd_smi_test/functional/id_info_read.cc | 4 +- .../functional/mutual_exclusion.cc | 2 +- .../amd_smi_test/functional/sys_info_read.cc | 4 +- 11 files changed, 56 insertions(+), 56 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index a899e3b850..f3fb36f1bc 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -1446,8 +1446,8 @@ class AMDSMICommands(): src_gpu_link_type[dest_gpu_key] = e.get_error_info() try: - min_bw = amdsmi_interface.admsmi_get_minmax_bandwith_between_processors(src_gpu, dest_gpu)['min_bandwidth'] - max_bw = amdsmi_interface.admsmi_get_minmax_bandwith_between_processors(src_gpu, dest_gpu)['max_bandwidth'] + min_bw = amdsmi_interface.amdsmi_get_minmax_bandwith_between_processors(src_gpu, dest_gpu)['min_bandwidth'] + max_bw = amdsmi_interface.amdsmi_get_minmax_bandwith_between_processors(src_gpu, dest_gpu)['max_bandwidth'] src_gpu_link_type[dest_gpu_key] = f'{min_bw}-{max_bw}' except amdsmi_exception.AmdSmiLibraryException as e: diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 2d8591ba0c..57a35518d3 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -1268,7 +1268,7 @@ amdsmi_status_t amdsmi_get_processor_handle_from_bdf(amdsmi_bdf_t bdf, amdsmi_pr * @p id. This ID is an identification of the type of device, so calling this * function for different devices will give the same value if they are kind * of device. Consequently, this function should not be used to distinguish - * one device from another. admsmi_get_gpu_bdf_id() should be used to get a + * one device from another. amdsmi_get_gpu_bdf_id() should be used to get a * unique identifier. * * @param[in] processor_handle a processor handle @@ -1457,7 +1457,7 @@ amdsmi_get_gpu_pci_bandwidth(amdsmi_processor_handle processor_handle, amdsmi_pc * * @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail */ -amdsmi_status_t admsmi_get_gpu_bdf_id(amdsmi_processor_handle processor_handle, uint64_t *bdfid); +amdsmi_status_t amdsmi_get_gpu_bdf_id(amdsmi_processor_handle processor_handle, uint64_t *bdfid); /** * @brief Get the NUMA node associated with a device @@ -2971,7 +2971,7 @@ amdsmi_topo_get_link_weight(amdsmi_processor_handle processor_handle_src, amdsmi * @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail */ amdsmi_status_t - admsmi_get_minmax_bandwith_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, + amdsmi_get_minmax_bandwith_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *min_bandwidth, uint64_t *max_bandwidth); /** diff --git a/projects/amdsmi/py-interface/README.md b/projects/amdsmi/py-interface/README.md index 768ee5cd89..cfaacc90e6 100644 --- a/projects/amdsmi/py-interface/README.md +++ b/projects/amdsmi/py-interface/README.md @@ -1237,7 +1237,7 @@ except AmdSmiException as e: print(e) ``` -### admsmi_get_gpu_bdf_id +### amdsmi_get_gpu_bdf_id Description: Get the unique PCI device identifier associated for a device @@ -1259,7 +1259,7 @@ BDFID = ((DOMAIN & 0xffffffff) << 32) | ((BUS & 0xff) << 8) | | Device | [ 7: 3] | | Function | [ 2: 0] | -Exceptions that can be thrown by `admsmi_get_gpu_bdf_id` function: +Exceptions that can be thrown by `amdsmi_get_gpu_bdf_id` function: * `AmdSmiLibraryException` * `AmdSmiRetryException` @@ -1274,7 +1274,7 @@ try: print("No GPUs on machine") else: for device in devices: - bdfid = admsmi_get_gpu_bdf_id(device) + bdfid = amdsmi_get_gpu_bdf_id(device) print(bdfid) except AmdSmiException as e: print(e) @@ -3040,7 +3040,7 @@ except AmdSmiException as e: print(e) ``` -### admsmi_get_minmax_bandwith_between_processors +### amdsmi_get_minmax_bandwith_between_processors Description: Retreive minimal and maximal io link bandwidth between 2 GPUs. @@ -3056,7 +3056,7 @@ Field | Description `min_bandwidth` | minimal bandwidth for the connection `max_bandwidth` | maximal bandwidth for the connection -Exceptions that can be thrown by `admsmi_get_minmax_bandwith_between_processors` function: +Exceptions that can be thrown by `amdsmi_get_minmax_bandwith_between_processors` function: * `AmdSmiLibraryException` * `AmdSmiRetryException` @@ -3072,7 +3072,7 @@ try: else: processor_handle_src = devices[0] processor_handle_dest = devices[1] - bandwith = admsmi_get_minmax_bandwith_between_processors(processor_handle_src, processor_handle_dest) + bandwith = amdsmi_get_minmax_bandwith_between_processors(processor_handle_src, processor_handle_dest) print(bandwith['min_bandwidth']) print(bandwith['max_bandwidth']) except AmdSmiException as e: diff --git a/projects/amdsmi/py-interface/__init__.py b/projects/amdsmi/py-interface/__init__.py index e7c939a8e5..8344faacca 100644 --- a/projects/amdsmi/py-interface/__init__.py +++ b/projects/amdsmi/py-interface/__init__.py @@ -126,7 +126,7 @@ from .amdsmi_interface import amdsmi_gpu_xgmi_error_status from .amdsmi_interface import amdsmi_reset_gpu_xgmi_error # # PCIE information -from .amdsmi_interface import admsmi_get_gpu_bdf_id +from .amdsmi_interface import amdsmi_get_gpu_bdf_id from .amdsmi_interface import amdsmi_get_gpu_pci_bandwidth from .amdsmi_interface import amdsmi_get_gpu_pci_throughput from .amdsmi_interface import amdsmi_get_gpu_pci_replay_counter @@ -156,7 +156,7 @@ from .amdsmi_interface import amdsmi_get_lib_version # # Hardware topology query from .amdsmi_interface import amdsmi_topo_get_numa_node_number from .amdsmi_interface import amdsmi_topo_get_link_weight -from .amdsmi_interface import admsmi_get_minmax_bandwith_between_processors +from .amdsmi_interface import amdsmi_get_minmax_bandwith_between_processors from .amdsmi_interface import amdsmi_topo_get_link_type from .amdsmi_interface import amdsmi_is_P2P_accessible from .amdsmi_interface import amdsmi_get_xgmi_info diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index 6c4f5e996b..5366ebb67d 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -351,14 +351,14 @@ class AmdSmiEventReader: mask |= (1 << (int(event_type) - 1)) _check_res(amdsmi_wrapper.amdsmi_init_gpu_event_notification(processor_handle)) - _check_res(amdsmi_wrapper. amdsmi_set_gpu_event_notification_mask( + _check_res(amdsmi_wrapper.amdsmi_set_gpu_event_notification_mask( processor_handle, ctypes.c_uint64(mask))) def read(self, timestamp, num_elem=10): self.event_info = ( amdsmi_wrapper.amdsmi_evt_notification_data_t * num_elem)() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_event_notification( + amdsmi_wrapper.amdsmi_get_gpu_event_notification( ctypes.c_int(timestamp), ctypes.byref(ctypes.c_uint32(num_elem)), self.event_info, @@ -1222,7 +1222,7 @@ def amdsmi_topo_get_link_weight( return weight.value -def admsmi_get_minmax_bandwith_between_processors( +def amdsmi_get_minmax_bandwith_between_processors( processor_handle_src: amdsmi_wrapper.amdsmi_processor_handle, processor_handle_dst: amdsmi_wrapper.amdsmi_processor_handle, ): @@ -1240,7 +1240,7 @@ def admsmi_get_minmax_bandwith_between_processors( max_bandwidth = ctypes.c_uint64() _check_res( - amdsmi_wrapper. admsmi_get_minmax_bandwith_between_processors( + amdsmi_wrapper.amdsmi_get_minmax_bandwith_between_processors( processor_handle_src, processor_handle_dst, ctypes.byref(min_bandwidth), @@ -1423,7 +1423,7 @@ def amdsmi_get_gpu_available_counters( available = ctypes.c_uint32() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_available_counters( + amdsmi_wrapper.amdsmi_get_gpu_available_counters( processor_handle, event_group, ctypes.byref(available) ) ) @@ -1442,7 +1442,7 @@ def amdsmi_set_gpu_perf_level( if not isinstance(perf_level, AmdSmiDevPerfLevel): raise AmdSmiParameterException(perf_level, AmdSmiDevPerfLevel) - _check_res(amdsmi_wrapper. amdsmi_set_gpu_perf_level( + _check_res(amdsmi_wrapper.amdsmi_set_gpu_perf_level( processor_handle, perf_level)) @@ -1460,7 +1460,7 @@ def amdsmi_get_gpu_power_profile_presets( status = amdsmi_wrapper.amdsmi_power_profile_status_t() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_power_profile_presets( + amdsmi_wrapper.amdsmi_get_gpu_power_profile_presets( processor_handle, sensor_idx, ctypes.byref(status) ) ) @@ -1547,7 +1547,7 @@ def amdsmi_set_clk_freq( raise AmdSmiParameterException(freq_bitmask, int) freq_bitmask = ctypes.c_uint64(freq_bitmask) _check_res( - amdsmi_wrapper. amdsmi_set_clk_freq( + amdsmi_wrapper.amdsmi_set_clk_freq( processor_handle, clk_type, freq_bitmask ) ) @@ -1565,12 +1565,12 @@ def amdsmi_set_gpu_overdrive_level( overdrive_value = ctypes.c_uint32(overdrive_value) _check_res( - amdsmi_wrapper. amdsmi_set_gpu_overdrive_level( + amdsmi_wrapper.amdsmi_set_gpu_overdrive_level( processor_handle, overdrive_value) ) -def admsmi_get_gpu_bdf_id(processor_handle: amdsmi_wrapper.amdsmi_processor_handle): +def amdsmi_get_gpu_bdf_id(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 @@ -1578,7 +1578,7 @@ def admsmi_get_gpu_bdf_id(processor_handle: amdsmi_wrapper.amdsmi_processor_hand bdfid = ctypes.c_uint64() _check_res( - amdsmi_wrapper.admsmi_get_gpu_bdf_id( + amdsmi_wrapper.amdsmi_get_gpu_bdf_id( processor_handle, ctypes.byref(bdfid)) ) @@ -1596,7 +1596,7 @@ def amdsmi_set_gpu_pci_bandwidth( raise AmdSmiParameterException(bitmask, int) _check_res( - amdsmi_wrapper. amdsmi_set_gpu_pci_bandwidth( + amdsmi_wrapper.amdsmi_set_gpu_pci_bandwidth( processor_handle, ctypes.c_uint64(bitmask) ) ) @@ -1662,7 +1662,7 @@ def amdsmi_get_gpu_pci_replay_counter(processor_handle: amdsmi_wrapper.amdsmi_pr counter = ctypes.c_uint64() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_pci_replay_counter( + amdsmi_wrapper.amdsmi_get_gpu_pci_replay_counter( processor_handle, ctypes.byref(counter)) ) @@ -1700,7 +1700,7 @@ def amdsmi_set_power_cap( raise AmdSmiParameterException(cap, int) _check_res( - amdsmi_wrapper. amdsmi_set_power_cap( + amdsmi_wrapper.amdsmi_set_power_cap( processor_handle, ctypes.c_uint32(sensor_ind), ctypes.c_uint64(cap) ) ) @@ -1723,7 +1723,7 @@ def amdsmi_set_gpu_power_profile( raise AmdSmiParameterException(profile, AmdSmiPowerProfilePresetMasks) _check_res( - amdsmi_wrapper. amdsmi_set_gpu_power_profile( + amdsmi_wrapper.amdsmi_set_gpu_power_profile( processor_handle, ctypes.c_uint32(reserved), profile ) ) @@ -1823,7 +1823,7 @@ def amdsmi_set_gpu_od_clk_info( raise AmdSmiParameterException(clk_type, AmdSmiClkType) _check_res( - amdsmi_wrapper. amdsmi_set_gpu_od_clk_info( + amdsmi_wrapper.amdsmi_set_gpu_od_clk_info( processor_handle, level, ctypes.c_uint64(value), clk_type ) ) @@ -1871,7 +1871,7 @@ def amdsmi_set_gpu_od_volt_info( raise AmdSmiParameterException(volt_value, int) _check_res( - amdsmi_wrapper. amdsmi_set_gpu_od_volt_info( + amdsmi_wrapper.amdsmi_set_gpu_od_volt_info( processor_handle, ctypes.c_uint32(vpoint), ctypes.c_uint64(clk_value), @@ -1954,7 +1954,7 @@ def amdsmi_get_temp_metric( temp_value = ctypes.c_int64() _check_res( - amdsmi_wrapper. amdsmi_get_temp_metric( + amdsmi_wrapper.amdsmi_get_temp_metric( processor_handle, sensor_type, metric, ctypes.byref(temp_value) ) ) @@ -1978,7 +1978,7 @@ def amdsmi_get_gpu_volt_metric( voltage = ctypes.c_int64() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_volt_metric( + amdsmi_wrapper.amdsmi_get_gpu_volt_metric( processor_handle, sensor_type, metric, ctypes.byref(voltage) ) ) @@ -2101,7 +2101,7 @@ def amdsmi_get_clk_freq( freq = amdsmi_wrapper.amdsmi_frequencies_t() _check_res( - amdsmi_wrapper. amdsmi_get_clk_freq( + amdsmi_wrapper.amdsmi_get_clk_freq( processor_handle, clk_type, ctypes.byref(freq) ) ) @@ -2123,7 +2123,7 @@ def amdsmi_get_gpu_od_volt_info( freq_data = amdsmi_wrapper.amdsmi_od_volt_freq_data_t() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_od_volt_info( + amdsmi_wrapper.amdsmi_get_gpu_od_volt_info( processor_handle, ctypes.byref(freq_data) ) ) @@ -2160,7 +2160,7 @@ def amdsmi_get_gpu_metrics_info( gpu_metrics = amdsmi_wrapper.amdsmi_gpu_metrics_t() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_metrics_info( + amdsmi_wrapper.amdsmi_get_gpu_metrics_info( processor_handle, ctypes.byref(gpu_metrics) ) ) @@ -2216,7 +2216,7 @@ def amdsmi_get_gpu_od_volt_curve_regions( region_count = ctypes.c_uint32(num_regions) buffer = (amdsmi_wrapper.amdsmi_freq_volt_region_t * num_regions)() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_od_volt_curve_regions( + amdsmi_wrapper.amdsmi_get_gpu_od_volt_curve_regions( processor_handle, ctypes.byref(region_count), buffer ) ) @@ -2254,7 +2254,7 @@ def amdsmi_get_gpu_power_profile_presets( status = amdsmi_wrapper.amdsmi_power_profile_status_t() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_power_profile_presets( + amdsmi_wrapper.amdsmi_get_gpu_power_profile_presets( processor_handle, sensor_idx, ctypes.byref(status) ) ) @@ -2279,7 +2279,7 @@ def amdsmi_get_gpu_ecc_count( ec = amdsmi_wrapper.amdsmi_error_count_t() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_ecc_count( + amdsmi_wrapper.amdsmi_get_gpu_ecc_count( processor_handle, block, ctypes.byref(ec)) ) @@ -2299,7 +2299,7 @@ def amdsmi_get_gpu_ecc_enabled( blocks = ctypes.c_uint64(0) _check_res( - amdsmi_wrapper. amdsmi_get_gpu_ecc_enabled( + amdsmi_wrapper.amdsmi_get_gpu_ecc_enabled( processor_handle, ctypes.byref(blocks)) ) @@ -2319,7 +2319,7 @@ def amdsmi_get_gpu_ecc_status( state = amdsmi_wrapper.amdsmi_ras_err_state_t() _check_res( - amdsmi_wrapper. amdsmi_get_gpu_ecc_status( + amdsmi_wrapper.amdsmi_get_gpu_ecc_status( processor_handle, block, ctypes.byref(state) ) ) diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index 5c65e7899f..a6516994c7 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -1418,9 +1418,9 @@ amdsmi_get_gpu_subsystem_name.argtypes = [amdsmi_processor_handle, ctypes.POINTE amdsmi_get_gpu_pci_bandwidth = _libraries['libamd_smi.so'].amdsmi_get_gpu_pci_bandwidth amdsmi_get_gpu_pci_bandwidth.restype = amdsmi_status_t amdsmi_get_gpu_pci_bandwidth.argtypes = [amdsmi_processor_handle, ctypes.POINTER(struct_c__SA_amdsmi_pcie_bandwidth_t)] -admsmi_get_gpu_bdf_id = _libraries['libamd_smi.so'].admsmi_get_gpu_bdf_id -admsmi_get_gpu_bdf_id.restype = amdsmi_status_t -admsmi_get_gpu_bdf_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)] +amdsmi_get_gpu_bdf_id = _libraries['libamd_smi.so'].amdsmi_get_gpu_bdf_id +amdsmi_get_gpu_bdf_id.restype = amdsmi_status_t +amdsmi_get_gpu_bdf_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)] amdsmi_get_gpu_topo_numa_affinity = _libraries['libamd_smi.so'].amdsmi_get_gpu_topo_numa_affinity amdsmi_get_gpu_topo_numa_affinity.restype = amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32)] @@ -1586,9 +1586,9 @@ amdsmi_topo_get_numa_node_number.argtypes = [amdsmi_processor_handle, ctypes.POI amdsmi_topo_get_link_weight = _libraries['libamd_smi.so'].amdsmi_topo_get_link_weight amdsmi_topo_get_link_weight.restype = amdsmi_status_t amdsmi_topo_get_link_weight.argtypes = [amdsmi_processor_handle, amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)] -admsmi_get_minmax_bandwith_between_processors = _libraries['libamd_smi.so'].admsmi_get_minmax_bandwith_between_processors -admsmi_get_minmax_bandwith_between_processors.restype = amdsmi_status_t -admsmi_get_minmax_bandwith_between_processors.argtypes = [amdsmi_processor_handle, amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint64)] +amdsmi_get_minmax_bandwith_between_processors = _libraries['libamd_smi.so'].amdsmi_get_minmax_bandwith_between_processors +amdsmi_get_minmax_bandwith_between_processors.restype = amdsmi_status_t +amdsmi_get_minmax_bandwith_between_processors.argtypes = [amdsmi_processor_handle, amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint64)] amdsmi_topo_get_link_type = _libraries['libamd_smi.so'].amdsmi_topo_get_link_type amdsmi_topo_get_link_type.restype = amdsmi_status_t amdsmi_topo_get_link_type.argtypes = [amdsmi_processor_handle, amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(c__EA_AMDSMI_IO_LINK_TYPE)] @@ -1791,8 +1791,8 @@ __all__ = \ 'TEMPERATURE_TYPE_HBM_2', 'TEMPERATURE_TYPE_HBM_3', 'TEMPERATURE_TYPE_JUNCTION', 'TEMPERATURE_TYPE_PLX', 'TEMPERATURE_TYPE_VRAM', 'TEMPERATURE_TYPE__MAX', 'UNKNOWN', - 'admsmi_get_gpu_bdf_id', - 'admsmi_get_minmax_bandwith_between_processors', + 'amdsmi_get_gpu_bdf_id', + 'amdsmi_get_minmax_bandwith_between_processors', 'amd_metrics_table_header_t', 'amdsmi_asic_info_t', 'amdsmi_bdf_t', 'amdsmi_bit_field_t', 'amdsmi_board_info_t', 'amdsmi_clk_info_t', 'amdsmi_clk_type_t', diff --git a/projects/amdsmi/py-interface/rocm_smi_tool.py b/projects/amdsmi/py-interface/rocm_smi_tool.py index b478db80d8..5522b41e3b 100644 --- a/projects/amdsmi/py-interface/rocm_smi_tool.py +++ b/projects/amdsmi/py-interface/rocm_smi_tool.py @@ -563,7 +563,7 @@ def amdsmi_tool_event_notification_init(dev): def amdsmi_tool_event_notification_mask_set(dev, dic): mask = dic["mask"] - return smi_api.amdsmi_wrapper. amdsmi_set_gpu_event_notification_mask(dev, ctypes.c_uint64(mask)) + return smi_api.amdsmi_wrapper.amdsmi_set_gpu_event_notification_mask(dev, ctypes.c_uint64(mask)) def amdsmi_tool_event_notification_stop(dev): return smi_api.amdsmi_wrapper.amdsmi_stop_gpu_event_notification(dev) diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index 46b39ba5ff..94355f30bd 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -667,7 +667,7 @@ amdsmi_topo_get_link_weight(amdsmi_processor_handle processor_handle_src, amdsmi } amdsmi_status_t - admsmi_get_minmax_bandwith_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, + amdsmi_get_minmax_bandwith_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *min_bandwidth, uint64_t *max_bandwidth) { AMDSMI_CHECK_INIT(); @@ -1108,7 +1108,7 @@ amdsmi_status_t amdsmi_get_energy_count(amdsmi_processor_handle processor_handle power, counter_resolution, timestamp); } -amdsmi_status_t admsmi_get_gpu_bdf_id( +amdsmi_status_t amdsmi_get_gpu_bdf_id( amdsmi_processor_handle processor_handle, uint64_t *bdfid) { return rsmi_wrapper(rsmi_dev_pci_id_get, processor_handle, bdfid); 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 c4fea51a86..c22f127ac0 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 @@ -217,7 +217,7 @@ void TestIdInfoRead::Run(void) { ASSERT_EQ(err, AMDSMI_STATUS_INVAL); } - err = admsmi_get_gpu_bdf_id(processor_handles_[i], &val_ui64); + err = amdsmi_get_gpu_bdf_id(processor_handles_[i], &val_ui64); // Don't check for AMDSMI_STATUS_NOT_SUPPORTED since this should always be // supported. It is not based on a sysfs file. CHK_ERR_ASRT(err) @@ -226,7 +226,7 @@ void TestIdInfoRead::Run(void) { std::cout << " (" << std::dec << val_ui64 << ")" << std::endl; } // Verify api support checking functionality is working - err = admsmi_get_gpu_bdf_id(processor_handles_[i], nullptr); + err = amdsmi_get_gpu_bdf_id(processor_handles_[i], 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 8080bb3721..28b9f337f5 100755 --- a/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/mutual_exclusion.cc @@ -215,7 +215,7 @@ void TestMutualExclusion::Run(void) { CHECK_RET(ret, AMDSMI_STATUS_BUSY); ret = amdsmi_get_gpu_subsystem_id(processor_handles_[0], &dmy_ui16); CHECK_RET(ret, AMDSMI_STATUS_BUSY); - ret = admsmi_get_gpu_bdf_id(processor_handles_[0], &dmy_ui64); + ret = amdsmi_get_gpu_bdf_id(processor_handles_[0], &dmy_ui64); CHECK_RET(ret, AMDSMI_STATUS_BUSY); ret = amdsmi_get_gpu_pci_throughput(processor_handles_[0], &dmy_ui64, &dmy_ui64, &dmy_ui64); CHECK_RET(ret, AMDSMI_STATUS_BUSY); diff --git a/projects/amdsmi/tests/amd_smi_test/functional/sys_info_read.cc b/projects/amdsmi/tests/amd_smi_test/functional/sys_info_read.cc index c3bb800db6..2851618d8c 100755 --- a/projects/amdsmi/tests/amd_smi_test/functional/sys_info_read.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/sys_info_read.cc @@ -128,14 +128,14 @@ void TestSysInfoRead::Run(void) { } } - err = admsmi_get_gpu_bdf_id(processor_handles_[i], &val_ui64); + err = amdsmi_get_gpu_bdf_id(processor_handles_[i], &val_ui64); CHK_ERR_ASRT(err) IF_VERB(STANDARD) { std::cout << "\t**PCI ID (BDFID): 0x" << std::hex << val_ui64; std::cout << " (" << std::dec << val_ui64 << ")" << std::endl; } // Verify api support checking functionality is working - err = admsmi_get_gpu_bdf_id(processor_handles_[i], nullptr); + err = amdsmi_get_gpu_bdf_id(processor_handles_[i], nullptr); ASSERT_EQ(err, AMDSMI_STATUS_INVAL); err = amdsmi_get_gpu_topo_numa_affinity(processor_handles_[i], &val_ui32);