From 7bf29acf350388f581ea510bc5ed700dd9578c57 Mon Sep 17 00:00:00 2001 From: "Bill(Shuzhou) Liu" Date: Fri, 14 Jan 2022 10:36:46 -0500 Subject: [PATCH 1/4] strip the library instead of link when build release When build the release, it will strip the library file instead of link. Change-Id: Ib2d4cea614e8938bdb2be0fd74f046680158d256 [ROCm/rocm_smi_lib commit: 77502bed2ac3c141961399c7dd19e67a69aa6ca2] --- projects/rocm-smi-lib/rocm_smi/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt b/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt index dff27c9f42..e6c49b87e9 100755 --- a/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt +++ b/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt @@ -99,7 +99,7 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL Release) if(${BUILD_SHARED_LIBS}) #stripping only for .so add_custom_command( TARGET ${ROCM_SMI_TARGET} - POST_BUILD COMMAND ${CMAKE_STRIP} lib${ROCM_SMI_TARGET}.so) + POST_BUILD COMMAND ${CMAKE_STRIP} lib${ROCM_SMI_TARGET}.so.${SO_VERSION_STRING}) endif() endif () From 9824aa1545aa5fcac2b4d96061d2d814614cf39b Mon Sep 17 00:00:00 2001 From: "Bill(Shuzhou) Liu" Date: Mon, 17 Jan 2022 09:03:34 -0500 Subject: [PATCH 2/4] Enable the linker build id generation for address sanitizer build The -Wl,--build-id option is added for address sanitizer build Change-Id: I0d75bc8e6169010c460e62e51708828e75de478e [ROCm/rocm_smi_lib commit: 7b69dde24f14ffcf0d75e3fe66441a1baf440044] --- projects/rocm-smi-lib/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/rocm-smi-lib/CMakeLists.txt b/projects/rocm-smi-lib/CMakeLists.txt index b779d4ca60..d83f10504b 100755 --- a/projects/rocm-smi-lib/CMakeLists.txt +++ b/projects/rocm-smi-lib/CMakeLists.txt @@ -74,6 +74,7 @@ set(CMAKE_CXX_FLAGS ## Address Sanitize Flag if (${ADDRESS_SANITIZER}) + set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g") set(CMAKE_EXE_LINKER_FLAGS -fsanitize=address) From 82667828505bac27c6706f541a5fdbf034fa26c2 Mon Sep 17 00:00:00 2001 From: Sreekant Somasekharan Date: Fri, 7 Jan 2022 23:04:26 -0500 Subject: [PATCH 3/4] Print ASD firmware version in hex instead of decimal format Change-Id: Idf113f63b79f2d2903ae795d272d232a43680516 [ROCm/rocm_smi_lib commit: cf2f0b05088515a6cbdbf49af4346109946c731e] --- projects/rocm-smi-lib/python_smi_tools/rocm_smi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py index 05344cefe7..6f51358b06 100755 --- a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py +++ b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py @@ -1517,8 +1517,8 @@ def showFwInfo(deviceList, fwType): fw_name = fw_name.upper() ret = rocmsmi.rsmi_dev_firmware_version_get(device, fw_block_names_l.index(fw_name), byref(fw_ver)) if rsmi_ret_ok(ret, device, fw_name): - # The VCN, VCE, UVD, and SOS firmware's value needs to be in hexadecimal - if fw_name in ['VCN', 'VCE', 'UVD', 'SOS']: + # The VCN, VCE, UVD, SOS and ASD firmware's value needs to be in hexadecimal + if fw_name in ['VCN', 'VCE', 'UVD', 'SOS', 'ASD']: printLog(device, '%s firmware version' % (fw_name), '\t0x%s' % (str(hex(fw_ver.value))[2:].zfill(8))) # The TA XGMI, TA RAS, and SMC firmware's hex value looks like 0x12345678 From 1a1e04b5a2f26350d7a85fc8fc71904e9241dbbd Mon Sep 17 00:00:00 2001 From: "Bill(Shuzhou) Liu" Date: Tue, 18 Jan 2022 10:53:20 -0500 Subject: [PATCH 4/4] Add license file to smi-lib package Install LICENSE.txt to share/doc/smi-lib Change-Id: Idcbb70db8808111203e8e4a4c3ab4d1e070ac79d [ROCm/rocm_smi_lib commit: 3356084074b2efc74931602ba9985c48b4df0420] --- projects/rocm-smi-lib/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/rocm-smi-lib/CMakeLists.txt b/projects/rocm-smi-lib/CMakeLists.txt index d83f10504b..c8138f44ea 100755 --- a/projects/rocm-smi-lib/CMakeLists.txt +++ b/projects/rocm-smi-lib/CMakeLists.txt @@ -14,6 +14,10 @@ endif() ## Include common cmake modules include(utils) +if (NOT DEFINED CPACK_RESOURCE_FILE_LICENSE) + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt") +endif() + set(ROCM_SMI "rocm_smi") set(ROCM_SMI_COMPONENT "lib${ROCM_SMI}") set(ROCM_SMI_TARGET "${ROCM_SMI}64") @@ -171,7 +175,8 @@ install(FILES install(EXPORT rocm_smiTargets DESTINATION "${ROCM_SMI}/lib/cmake" COMPONENT dev) - +#License file +install( FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/smi-lib RENAME LICENSE.txt) ########################### # Packaging directives