From 35d20bcb8091b6f47b75da06d4bb5636d1c02b5b Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Wed, 13 Sep 2023 16:16:33 -0500 Subject: [PATCH] Spell check bandwith to bandwidth Change-Id: Icfb3b2398fe0590dbab6e531c8ec1cdceebe658d Signed-off-by: Maisam Arif [ROCm/amdsmi commit: 42b030def34614345770e2123fe4f1f7f3b666a7] --- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 4 ++-- projects/amdsmi/include/amd_smi/amdsmi.h | 2 +- projects/amdsmi/py-interface/README.md | 10 +++++----- projects/amdsmi/py-interface/__init__.py | 2 +- projects/amdsmi/py-interface/amdsmi_interface.py | 4 ++-- projects/amdsmi/py-interface/amdsmi_wrapper.py | 8 ++++---- projects/amdsmi/src/amd_smi/amd_smi.cc | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 44fa5e77c9..d1d36b8be7 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -1479,8 +1479,8 @@ class AMDSMICommands(): src_gpu_link_type[dest_gpu_key] = e.get_error_info() try: - 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'] + min_bw = amdsmi_interface.amdsmi_get_minmax_bandwidth_between_processors(src_gpu, dest_gpu)['min_bandwidth'] + max_bw = amdsmi_interface.amdsmi_get_minmax_bandwidth_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 7732454495..78a240a2d5 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -3229,7 +3229,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 - amdsmi_get_minmax_bandwith_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, + amdsmi_get_minmax_bandwidth_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 a1c59339e0..608dc4fffb 100644 --- a/projects/amdsmi/py-interface/README.md +++ b/projects/amdsmi/py-interface/README.md @@ -3001,7 +3001,7 @@ except AmdSmiException as e: print(e) ``` -### amdsmi_get_minmax_bandwith_between_processors +### amdsmi_get_minmax_bandwidth_between_processors Description: Retreive minimal and maximal io link bandwidth between 2 GPUs. @@ -3017,7 +3017,7 @@ Field | Description `min_bandwidth` | minimal bandwidth for the connection `max_bandwidth` | maximal bandwidth for the connection -Exceptions that can be thrown by `amdsmi_get_minmax_bandwith_between_processors` function: +Exceptions that can be thrown by `amdsmi_get_minmax_bandwidth_between_processors` function: * `AmdSmiLibraryException` * `AmdSmiRetryException` @@ -3033,9 +3033,9 @@ try: else: processor_handle_src = devices[0] processor_handle_dest = devices[1] - bandwith = amdsmi_get_minmax_bandwith_between_processors(processor_handle_src, processor_handle_dest) - print(bandwith['min_bandwidth']) - print(bandwith['max_bandwidth']) + bandwidth = amdsmi_get_minmax_bandwidth_between_processors(processor_handle_src, processor_handle_dest) + print(bandwidth['min_bandwidth']) + print(bandwidth['max_bandwidth']) except AmdSmiException as e: print(e) ``` diff --git a/projects/amdsmi/py-interface/__init__.py b/projects/amdsmi/py-interface/__init__.py index 61243ab046..948ba45073 100644 --- a/projects/amdsmi/py-interface/__init__.py +++ b/projects/amdsmi/py-interface/__init__.py @@ -153,7 +153,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 amdsmi_get_minmax_bandwith_between_processors +from .amdsmi_interface import amdsmi_get_minmax_bandwidth_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 46b3307f4a..80cde19c3a 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -1199,7 +1199,7 @@ def amdsmi_topo_get_link_weight( return weight.value -def amdsmi_get_minmax_bandwith_between_processors( +def amdsmi_get_minmax_bandwidth_between_processors( processor_handle_src: amdsmi_wrapper.amdsmi_processor_handle, processor_handle_dst: amdsmi_wrapper.amdsmi_processor_handle, ): @@ -1217,7 +1217,7 @@ def amdsmi_get_minmax_bandwith_between_processors( max_bandwidth = ctypes.c_uint64() _check_res( - amdsmi_wrapper.amdsmi_get_minmax_bandwith_between_processors( + amdsmi_wrapper.amdsmi_get_minmax_bandwidth_between_processors( processor_handle_src, processor_handle_dst, ctypes.byref(min_bandwidth), diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index bfb3c395bd..03a5ed6a3d 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -1580,9 +1580,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)] -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_get_minmax_bandwidth_between_processors = _libraries['libamd_smi.so'].amdsmi_get_minmax_bandwidth_between_processors +amdsmi_get_minmax_bandwidth_between_processors.restype = amdsmi_status_t +amdsmi_get_minmax_bandwidth_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(AMDSMI_IO_LINK_TYPE)] @@ -1830,7 +1830,7 @@ __all__ = \ 'amdsmi_get_gpu_vendor_name', 'amdsmi_get_gpu_volt_metric', 'amdsmi_get_gpu_vram_usage', 'amdsmi_get_gpu_vram_vendor', 'amdsmi_get_lib_version', - 'amdsmi_get_minmax_bandwith_between_processors', + 'amdsmi_get_minmax_bandwidth_between_processors', 'amdsmi_get_pcie_link_caps', 'amdsmi_get_pcie_link_status', 'amdsmi_get_power_cap_info', 'amdsmi_get_power_info', 'amdsmi_get_processor_handle_from_bdf', diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index fcfb91fb15..21f359c252 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -895,7 +895,7 @@ amdsmi_topo_get_link_weight(amdsmi_processor_handle processor_handle_src, amdsmi } amdsmi_status_t - amdsmi_get_minmax_bandwith_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, + amdsmi_get_minmax_bandwidth_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();