[SWDEV-499995] amdsmi updated for esmi library changes (#266)
CMakelist updated to latest esmi tag esmi_pkg_ver-4.2, which has fixes for esmi warnings during amdsmi build, amdsmi_get_cpu_current_xgmi_bw updated as per change in corresponding esmi library API Signed-off-by: Deepak Mewar <deepak.mewar@amd.com>
Dieser Commit ist enthalten in:
+1
-1
@@ -114,7 +114,7 @@ set(ROCM_INC_DIR "${PROJECT_SOURCE_DIR}/rocm_smi/include/rocm_smi")
|
||||
set(SHR_MUTEX_DIR "${PROJECT_SOURCE_DIR}/third_party/shared_mutex")
|
||||
if(ENABLE_ESMI_LIB)
|
||||
# Supported esmi library version tag
|
||||
set(current_esmi_tag "esmi_pkg_ver-4.1.2")
|
||||
set(current_esmi_tag "esmi_pkg_ver-4.2")
|
||||
|
||||
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/esmi_ib_library/src)
|
||||
# TODO: use ExternalProject_Add instead or a submodule
|
||||
|
||||
@@ -5383,16 +5383,23 @@ amdsmi_status_t amdsmi_get_cpu_current_xgmi_bw(amdsmi_processor_handle processor
|
||||
amdsmi_status_t status;
|
||||
uint32_t bw;
|
||||
struct link_id_bw_type io_link;
|
||||
uint8_t sock_ind;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (processor_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
amdsmi_status_t r = amdsmi_get_processor_info(processor_handle, SIZE, proc_id);
|
||||
if (r != AMDSMI_STATUS_SUCCESS)
|
||||
return r;
|
||||
|
||||
sock_ind = (uint8_t)std::stoi(proc_id, NULL, 0);
|
||||
|
||||
io_link.link_name = link.link_name;
|
||||
io_link.bw_type= static_cast<io_bw_encoding>(link.bw_type);
|
||||
|
||||
status = static_cast<amdsmi_status_t>(esmi_current_xgmi_bw_get(io_link, &bw));
|
||||
status = static_cast<amdsmi_status_t>(esmi_current_xgmi_bw_get(sock_ind, io_link, &bw));
|
||||
if (status != AMDSMI_STATUS_SUCCESS)
|
||||
return amdsmi_errno_to_esmi_status(status);
|
||||
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren