amdsmi_cli: Fix issues in cpu API "cpu_lclk_dpm_level"
- Fix issues in cpu API "cpu_lclk_dpm_level"
- Fix issue for invalid core id
- Update the error message for invalid devices
Change-Id: I71216ff72f89cfe0c86928ae3dce1f88eae91665
[ROCm/amdsmi commit: 256907989b]
Этот коммит содержится в:
коммит произвёл
Galantsev, Dmitrii
родитель
8bd95a26b4
Коммит
323cf14a9c
@@ -119,7 +119,7 @@ class AmdSmiDeviceNotFoundException(AmdSmiException):
|
||||
self.command = command
|
||||
self.output_format = outputformat
|
||||
|
||||
common_message = f"Can not find a GPU with the corresponding identifier: '{self.command}'"
|
||||
common_message = f"Can not find a device with the corresponding identifier: '{self.command}'"
|
||||
|
||||
self.json_message["error"] = common_message
|
||||
self.json_message["code"] = self.value
|
||||
|
||||
@@ -385,7 +385,7 @@ class AMDSMIHelpers():
|
||||
|
||||
selected_device_handles = []
|
||||
for core_selection in core_selections:
|
||||
valid_cpu_choice = False
|
||||
valid_core_choice = False
|
||||
for core_id, core_info in core_choices.items():
|
||||
device_handle = core_info['Device Handle']
|
||||
|
||||
|
||||
@@ -1246,8 +1246,8 @@ def amdsmi_get_cpu_socket_lclk_dpm_level(
|
||||
_check_res(amdsmi_wrapper.amdsmi_get_cpu_socket_lclk_dpm_level(processor_handle, nbio_id, dpm_level))
|
||||
|
||||
return {
|
||||
"nbio_max_dpm_level": nbio.max_dpm_level,
|
||||
"nbio_min_dpm_level": nbio.min_dpm_level
|
||||
"nbio_max_dpm_level": dpm_level.max_dpm_level,
|
||||
"nbio_min_dpm_level": dpm_level.min_dpm_level
|
||||
}
|
||||
|
||||
def amdsmi_set_cpu_pcie_link_rate(
|
||||
|
||||
Ссылка в новой задаче
Block a user