diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 11c5230de4..0a1a1852ed 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -2313,7 +2313,7 @@ amdsmi_status_t amdsmi_dev_get_gpu_metrics_info(amdsmi_processor_handle process * * @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail */ -amdsmi_status_t amdsmi_dev_set_clk_range(amdsmi_processor_handle processor_handle, uint64_t minclkvalue, +amdsmi_status_t amdsmi_set_gpu_clk_range(amdsmi_processor_handle processor_handle, uint64_t minclkvalue, uint64_t maxclkvalue, amdsmi_clk_type_t clkType); diff --git a/projects/amdsmi/py-interface/README.md b/projects/amdsmi/py-interface/README.md index 3ab27093bb..8ec23e1da9 100644 --- a/projects/amdsmi/py-interface/README.md +++ b/projects/amdsmi/py-interface/README.md @@ -1283,7 +1283,7 @@ except AmdSmiException as e: ``` -## amdsmi_dev_set_clk_range +## amdsmi_set_gpu_clk_range Description: This function sets the clock range information Input parameters: @@ -1294,7 +1294,7 @@ Input parameters: Output: None -Exceptions that can be thrown by `amdsmi_dev_set_clk_range` function: +Exceptions that can be thrown by `amdsmi_set_gpu_clk_range` function: * `AmdSmiLibraryException` * `AmdSmiRetryException` * `AmdSmiParameterException` @@ -1307,7 +1307,7 @@ try: print("No GPUs on machine") else: for device in devices: - amdsmi_dev_set_clk_range(device, 0, 1000, AmdSmiClkType.AMDSMI_CLK_TYPE_SYS) + amdsmi_set_gpu_clk_range(device, 0, 1000, AmdSmiClkType.AMDSMI_CLK_TYPE_SYS) except AmdSmiException as e: print(e) ``` diff --git a/projects/amdsmi/py-interface/__init__.py b/projects/amdsmi/py-interface/__init__.py index 3d3c3e73e7..3162f11f4a 100644 --- a/projects/amdsmi/py-interface/__init__.py +++ b/projects/amdsmi/py-interface/__init__.py @@ -82,7 +82,7 @@ from .amdsmi_interface import amdsmi_get_func_iter_value from .amdsmi_interface import amdsmi_set_gpu_pci_bandwidth from .amdsmi_interface import amdsmi_set_power_cap from .amdsmi_interface import amdsmi_set_gpu_power_profile -from .amdsmi_interface import amdsmi_dev_set_clk_range +from .amdsmi_interface import amdsmi_set_gpu_clk_range from .amdsmi_interface import amdsmi_dev_set_od_clk_info from .amdsmi_interface import amdsmi_dev_set_od_volt_info from .amdsmi_interface import amdsmi_dev_set_perf_level_v1 diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index 650cd660bc..a0f17dab85 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -1899,7 +1899,7 @@ def amdsmi_get_energy_count(processor_handle: amdsmi_wrapper.amdsmi_processor_ha } -def amdsmi_dev_set_clk_range( +def amdsmi_set_gpu_clk_range( processor_handle: amdsmi_wrapper.amdsmi_processor_handle, min_clk_value: int, max_clk_value: int, @@ -1920,7 +1920,7 @@ def amdsmi_dev_set_clk_range( raise AmdSmiParameterException(clk_type, AmdSmiClkType) _check_res( - amdsmi_wrapper.amdsmi_dev_set_clk_range( + amdsmi_wrapper.amdsmi_set_gpu_clk_range( processor_handle, ctypes.c_uint64(min_clk_value), ctypes.c_uint64(max_clk_value), diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index d1e1a09c42..20c522a83e 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -1541,9 +1541,9 @@ amdsmi_dev_get_od_volt_info.argtypes = [amdsmi_processor_handle, ctypes.POINTER( amdsmi_dev_get_gpu_metrics_info = _libraries['libamd_smi.so'].amdsmi_dev_get_gpu_metrics_info amdsmi_dev_get_gpu_metrics_info.restype = amdsmi_status_t amdsmi_dev_get_gpu_metrics_info.argtypes = [amdsmi_processor_handle, ctypes.POINTER(struct_c__SA_amdsmi_gpu_metrics_t)] -amdsmi_dev_set_clk_range = _libraries['libamd_smi.so'].amdsmi_dev_set_clk_range -amdsmi_dev_set_clk_range.restype = amdsmi_status_t -amdsmi_dev_set_clk_range.argtypes = [amdsmi_processor_handle, uint64_t, uint64_t, amdsmi_clk_type_t] +amdsmi_set_gpu_clk_range = _libraries['libamd_smi.so'].amdsmi_set_gpu_clk_range +amdsmi_set_gpu_clk_range.restype = amdsmi_status_t +amdsmi_set_gpu_clk_range.argtypes = [amdsmi_processor_handle, uint64_t, uint64_t, amdsmi_clk_type_t] amdsmi_dev_set_od_clk_info = _libraries['libamd_smi.so'].amdsmi_dev_set_od_clk_info amdsmi_dev_set_od_clk_info.restype = amdsmi_status_t amdsmi_dev_set_od_clk_info.argtypes = [amdsmi_processor_handle, amdsmi_freq_ind_t, uint64_t, amdsmi_clk_type_t] @@ -1875,7 +1875,7 @@ __all__ = \ 'amdsmi_dev_perf_level_t', 'amdsmi_dev_perf_level_t__enumvalues', 'amdsmi_reset_gpu_fan', 'amdsmi_dev_reset_gpu', 'amdsmi_dev_reset_xgmi_error', 'amdsmi_dev_set_clk_freq', - 'amdsmi_dev_set_clk_range', 'amdsmi_set_gpu_fan_speed', + 'amdsmi_set_gpu_clk_range', 'amdsmi_set_gpu_fan_speed', 'amdsmi_dev_set_od_clk_info', 'amdsmi_dev_set_od_volt_info', 'amdsmi_dev_set_overdrive_level', 'amdsmi_dev_set_overdrive_level_v1', diff --git a/projects/amdsmi/py-interface/rocm_smi_tool.py b/projects/amdsmi/py-interface/rocm_smi_tool.py index 4681501516..b38b7c341b 100644 --- a/projects/amdsmi/py-interface/rocm_smi_tool.py +++ b/projects/amdsmi/py-interface/rocm_smi_tool.py @@ -348,7 +348,7 @@ class Formatter: | """ + self.style.text("59 Get counter available counters. Api: amdsmi_counter_get_available_counters ") + """ | | """ + self.style.text("60 Get counter control. Api: amdsmi_control_counter ") + """ | | """ + self.style.text("61 Get counter read. Api: amdsmi_read_counter ") + """ | - | """ + self.style.text("62 Set dev clk range. Api: amdsmi_dev_set_clk_range ") + """ | + | """ + self.style.text("62 Set dev clk range. Api: amdsmi_set_gpu_clk_range ") + """ | | """ + self.style.text("63 Get dev counter group supported. Api: amdsmi_dev_counter_group_supported ") + """ | | """ + self.style.text("64 Reset dev fan. Api: amdsmi_reset_gpu_fan ") + """ | | """ + self.style.text("65 Set dev fan speed. Api: amdsmi_set_gpu_fan_speed ") + """ | @@ -620,7 +620,7 @@ def amdsmi_tool_dev_clk_range_set(dev, dic): max_clk = dic["max_clk"] for clock_type in smi_api.AmdSmiClkType: try: - value = smi_api.amdsmi_dev_set_clk_range(dev, min_clk, max_clk, clock_type) + value = smi_api.amdsmi_set_gpu_clk_range(dev, min_clk, max_clk, clock_type) result.update({clock_type.name: value}) except smi_api.AmdSmiException as e: print("{}:\t{}".format(clock_type.name, e)) diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index ec3c88f36c..2e31c2930e 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -1338,7 +1338,7 @@ amdsmi_status_t amdsmi_dev_set_od_volt_info(amdsmi_processor_handle processor_h vpoint, clkvalue, voltvalue); } -amdsmi_status_t amdsmi_dev_set_clk_range(amdsmi_processor_handle processor_handle, +amdsmi_status_t amdsmi_set_gpu_clk_range(amdsmi_processor_handle processor_handle, uint64_t minclkvalue, uint64_t maxclkvalue, amdsmi_clk_type_t clkType) {