From f1c3fbf226c82b157a88f3b063cba1d66092fed7 Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Thu, 14 Nov 2024 17:35:29 -0600 Subject: [PATCH 1/2] Updated CLI exceptions Signed-off-by: Maisam Arif Change-Id: I5c68eed7719c093727afa434e25ba2560dde894a --- amdsmi_cli/amdsmi_cli_exceptions.py | 13 +++++++++++++ include/amd_smi/amdsmi.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/amdsmi_cli/amdsmi_cli_exceptions.py b/amdsmi_cli/amdsmi_cli_exceptions.py index 506e43f530..cc4846489c 100644 --- a/amdsmi_cli/amdsmi_cli_exceptions.py +++ b/amdsmi_cli/amdsmi_cli_exceptions.py @@ -55,7 +55,20 @@ AMDSMI_ERROR_MESSAGES = { 41: "Insufficient size for operation", 42: "Unexpected size of data was read", 43: "The data read or provided was unexpected", + 44: "System has different cpu than AMD", + 45: "Energy driver not found", + 46: "MSR driver not found", + 47: "HSMP driver not found", + 48: "HSMP not supported", + 49: "HSMP message/feature not supported", + 50: "HSMP message timed out", + 51: "No Energy and HSMP driver present", + 52: "File or directory not found", + 53: "Parsed argument is invalid", 54: "AMDGPU restart error", + 55: "Setting is not available", + 0xFFFFFFFE: "AMD-SMI Library error did not map to a status code", + 0xFFFFFFFF: "Unknown error" } def _get_error_message(error_code): diff --git a/include/amd_smi/amdsmi.h b/include/amd_smi/amdsmi.h index 98ed7b385b..77223c197a 100644 --- a/include/amd_smi/amdsmi.h +++ b/include/amd_smi/amdsmi.h @@ -269,7 +269,7 @@ typedef enum { AMDSMI_STATUS_NO_HSMP_DRV = 47, //!< HSMP driver not found AMDSMI_STATUS_NO_HSMP_SUP = 48, //!< HSMP not supported AMDSMI_STATUS_NO_HSMP_MSG_SUP = 49, //!< HSMP message/feature not supported - AMDSMI_STATUS_HSMP_TIMEOUT = 50, //!< HSMP message is timedout + AMDSMI_STATUS_HSMP_TIMEOUT = 50, //!< HSMP message timed out AMDSMI_STATUS_NO_DRV = 51, //!< No Energy and HSMP driver present AMDSMI_STATUS_FILE_NOT_FOUND = 52, //!< file or directory not found AMDSMI_STATUS_ARG_PTR_NULL = 53, //!< Parsed argument is invalid From b7789d46995ef2832b6771e371d8601f53e396d6 Mon Sep 17 00:00:00 2001 From: Adam Pryor Date: Fri, 15 Nov 2024 10:51:37 -0500 Subject: [PATCH 2/2] Revert "[SWDEV-446215] Update cmake to put test libs in proper lib dir" This reverts commit 6e01df00ca3b6cb1f4bc156529dfd9ecd0d078de. Reason for revert: Because the gtest of amdsmi is different to other components so it was installed in a share/amdsmi/lib folder. It cannot be installed in a common folder such as /usr/local/bin or /usr/bin because all other components try to search those folder first. This is breaking ROCmValidationSuite and other tools. Per Wang, Yanyao this should be reverted. Change-Id: Id61bc6056fe41800e738616f39293e9b8762a377 --- tests/amd_smi_test/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/amd_smi_test/CMakeLists.txt b/tests/amd_smi_test/CMakeLists.txt index c80b7648dc..6433986a9a 100644 --- a/tests/amd_smi_test/CMakeLists.txt +++ b/tests/amd_smi_test/CMakeLists.txt @@ -4,7 +4,7 @@ option(INSTALL_GTEST "Install GTest (only useful if GTest is not already install # Help tests find libraries at runtime set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--enable-new-dtags") set(CMAKE_INSTALL_RPATH - "\$ORIGIN:\$ORIGIN/../../../lib:CPACK_PACKAGING_INSTALL_PREFIX/lib" + "\$ORIGIN:\$ORIGIN/../../../lib" CACHE STRING "RUNPATH for tests. Helps find libgtest.so and libamd_smi.so") # Download and compile googletest @@ -76,6 +76,6 @@ install( # Install googletest libraries with tests install(TARGETS gtest gtest_main - DESTINATION ${CPACK_PACKAGING_INSTALL_PREFIX}/lib + DESTINATION ${SHARE_INSTALL_PREFIX}/tests COMPONENT ${TESTS_COMPONENT})