summaryrefslogtreecommitdiff
path: root/dev-util/roctracer
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-31 21:02:55 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-31 21:02:55 +0000
commitd36c5f9e59f92a021c987989cd79d44460e0da42 (patch)
tree2504c88d1f287ac3a71ebc56e5d19f34a2c1b9a4 /dev-util/roctracer
parente860dfa5acdb67f8e2b8938b005dbaaaaf2c984a (diff)
gentoo auto-resync : 31:01:2023 - 21:02:55
Diffstat (limited to 'dev-util/roctracer')
-rw-r--r--dev-util/roctracer/Manifest7
-rw-r--r--dev-util/roctracer/files/roctracer-5.3.3-do-not-install-test-files.patch37
-rw-r--r--dev-util/roctracer/files/roctracer-5.3.3-flat-lib-layout.patch34
-rw-r--r--dev-util/roctracer/files/roctracer-5.3.3-rocm-path.patch12
-rw-r--r--dev-util/roctracer/metadata.xml4
-rw-r--r--dev-util/roctracer/roctracer-5.3.3.ebuild64
6 files changed, 157 insertions, 1 deletions
diff --git a/dev-util/roctracer/Manifest b/dev-util/roctracer/Manifest
index 5b2110e14ddb..b4c4b05c142b 100644
--- a/dev-util/roctracer/Manifest
+++ b/dev-util/roctracer/Manifest
@@ -6,11 +6,16 @@ AUX roctracer-5.0.2-Werror.patch 922 BLAKE2B 5644e5450de7372ee1ad6d8158a50e006f1
AUX roctracer-5.0.2-headers.patch 2452 BLAKE2B b5e34ddef1e61277d01b771b59e345c3ace07ff90f7e53c0bc50d0ebb6a13e07480173ac72b216a3fb54c3af2df5c1277fdc62db7f3e028213f71a889fa725c5 SHA512 073b45703bf37c5df1ed44843b17e08d8ada0373dce5f29a21cdea1d6d7fb73563501461a2b0c33f65c70e2c99d036523d012c7787b399a785f0ded89ad60f66
AUX roctracer-5.0.2-strip-license.patch 681 BLAKE2B b7c78ca54fb208e1d943d9f217a8d40911a98823ff1b4c58441c87fdf60297200b4d02e5fbe685fea331c3d8f87c395291c19ac2621aa90c9fb1308071e176ba SHA512 56aae25b4c24d0f9a361c10007d0e3d90960191b08e254a0f6ffef9a36fb8d17270f8bed36c36ea866da137297ab96de4e211e8c06ace7ed7444e821f0589322
AUX roctracer-5.1.3-no-aqlprofile.patch 1902 BLAKE2B 7ac98d5ad052e29313bd038b963763d4dba63c44bc261bd3119a911dfe6fbef99d73f58bf04f9c74a769d37299707c5e04a280db9343a3dbb5d0ab086a0106de SHA512 908f888e6384f3ee734b10553fc8cafb0e302031e21ed3763754e69fe146dbfb0204977c50db698f6f43a50c1a07685e8b86b5e7339ef65ff0634476b8177ee5
+AUX roctracer-5.3.3-do-not-install-test-files.patch 1948 BLAKE2B 1eeb7443b4cb4c6947a61ee1b4f9f42bef996cd9623e6864d273de438af8f0d21bd2465e5ad1b62e266d9b0a86b5afdf5a267d79018cbfbc356ed8e2205a2136 SHA512 aa1e556ddd5f070bdc0ca8b47b243dbdbd965de8f98d02964a13897d3cb273fdef08373f12113c9f1645c3333be212092505fd7087f5ab292aedc1365372a021
+AUX roctracer-5.3.3-flat-lib-layout.patch 1842 BLAKE2B dc7f2832e2bd4e04bad75ccd22e8e2e32353cec745521e8baf4d98772d0994efa08289e5563eb3191d78a2fa4deb1681551e582d08e9608b98fe72f599146a2f SHA512 967eab41a909a7369791bd0946ef4304473e2f763d2e4f497f5b7ddba3b81b9eb18ea72a815b2211bcb82ec87eebe817daf1788f7d44f8c4494a06c77be9d902
+AUX roctracer-5.3.3-rocm-path.patch 788 BLAKE2B ef0c9025bfb126e437f73149962c04661a5a5c33ee0c36e18854fa93bac591905cdc23e17fc2faf07659c5828de9361139e618752de3818b3b134e3536cd0c4b SHA512 f639b040871a43e23e7bf57a2214bf255032e3a5f9a20e08eae160bb0d371fb26fa147aefce20577935e40274779dbb150d445e044a22c7aeedc4e10b9865350
DIST hsa-class-f8b3870.tar.gz 37432 BLAKE2B c2a09e4a4c3708e8db432378874c63b9cefefb567ad19a9c17181ed2b60f38d0591a618f72b11f606eb44efc5e170adaf72f0ec1b93cde628ca2230a62e2d6de SHA512 f371a955bf59b7e0af07261981a6e68562fad0753d3f39d1e220034c17501abf839ed2fd88fbf376d659970395c8795a82c0560c7ed8d3b87c11c79864f5f612
DIST rocm-tracer-5.0.2.tar.gz 474669 BLAKE2B b350111590140e1282338e4f134caf6228677c49361ceb9bc7ba0da8709346daa4fd014644c04adff0e903dba6014a84edd2eb3a5c132a8f91b479e4d5b085e5 SHA512 3fc1449cc9c9bf83e5233a7a0e83c0e3fa9da225d5ee4427b7d6fa15e3580497e1b9fbcd63892e4a99df01582aecd3ccfd66d2a19af2d8c25949ee705894ea44
DIST rocm-tracer-5.1.3.tar.gz 511617 BLAKE2B 4142979b3b7d649798a7ac0b2a04b42aa7fbcbf82f2cf51b0e5363ec0da538046d6e59283d0ce1bfd341317bf24ac2f694d5c8a7d1f132f9b21caea5caf7eda3 SHA512 e73b0c921ffbdcac571d8b0825de39bd8a4fd5f2720ecdd0c189951db85efb607a0b1cd7a9bb02b3dbf329b277cb5e197525216a8e8927eea4e6ce290b7e7c7b
+DIST rocm-tracer-5.3.3.tar.gz 353041 BLAKE2B b7614707ae3af2f5a46d058dacadfb0ef3b980963ac49face66a80c8396e66cf13e0430ab41737ba15e163f5da03697376b13238ea1decfe7ee4a7f31c7664a5 SHA512 95a202f76f6b68a35942750233bd09d372a9be843150d7ec02824da13c6b9a7c8da7a752ac69f66776e7ccfb6176473745dc46a7baadfe77c99c0596fbc2ffeb
DIST rocprofiler-5.0.2.tar.gz 1401732 BLAKE2B ae870bc50dbd39c11e24f77ccb41773df1107b76cb7a12e1cebc66f8d66ddba6ad3bd6f9fe61657b03b22ef35f88fb608cf6070178f6aab24fe7a1bdcac43a96 SHA512 244e2b827126b7299ec0510daa5e1245a4a5a877394419f8bc9113f443231f67fc935609cbde6eeb26bb138ab4e95e2a88829ffa79ecc8f9881b5a77b5910c02
DIST rocprofiler-5.1.3.tar.gz 1402172 BLAKE2B 16e9b127ede94a3f96056e84a2942b6c9f3aec90579fb12796ab8ba385160aa020e3dc77f7a475dadbc0a813a823ae733ca9560f6a09e55c4c82b13dd792dfa4 SHA512 6e9932a425eaaa2a1e1741280d7525c6360700f85edb3bcf4967fe9be4fed662bae0d2ba609701f0d9733769c340e93e32076024b27bab3303449c1d68d9e1ce
EBUILD roctracer-5.0.2-r1.ebuild 2499 BLAKE2B 7fa663089248e00ec52dcc6ad569d0b204f9ef42f3259d36f32afc69b19a8b5adb5fda7893298abd7ebaba6bd96a69aeac25d394438edcbe97ebbeba5551f363 SHA512 47c829294b09b942329b1c4c4aa57da495aa5d649d57865109555c0685c5cb71d83b27c9105eafc9cf533633a70c456f4330699afcf1eeea87857a1617729ce6
EBUILD roctracer-5.1.3-r1.ebuild 2414 BLAKE2B ba248280604a8403f8f37bb1795fe71b446badbb14ca5deb110de39103c014ee14965ed378718b881e0b4fddafe021da3a46de83720eb5ed09d816f92a309fcc SHA512 65d672add20f247160d94ea366f676d774ce3b9cae3d05c73a71f47768b308137da5e74fe846d2d4510421b9a5b06b378458d2d5359b01a65b3e5882c9375977
-MISC metadata.xml 603 BLAKE2B b81a956c8e1b3d4bb6363919f82389ec7030baf7cd949e2ee8704543c515335acc8e497743dffeca426cefc5a89210e75b85c90f5dbc482f54f257e52f5fc77d SHA512 dcad8256b50fbed9b24458d845330756081aaef4c864ca753c074c6299a9dc0234e9dbe421e12e28548887d5ce8a07c06fc54d6942e4902d63964fb229cc734b
+EBUILD roctracer-5.3.3.ebuild 1604 BLAKE2B c04d6690b406193e0f4dd46619c349f053679c5b8c66e06b0a208eecb0c43a4f0bfabd9b12b5a653729af401b34b023d7ab77364809fde661f78ab6b33c40a06 SHA512 8b281ed89f8bcd01cb876cd68fcb18f4e5b43f841f6715c7d13c739cf5a58a9aaaaf454325af2a131479ec6995c6a3b70d35cb08e4611a4c27bdfb488c6f451b
+MISC metadata.xml 735 BLAKE2B 8ea832bbaee7b5e3494866e22c9b20a30545e8025938ad8c2357649a29a310b3abbc2f9e05259bffb9e412def64c37422b1c2eb15660fe2e3c2522f1399025e2 SHA512 edcf3165086c99763702c10dc3b04a2522f66ebf2c2f66578075fea4a14c89295e1a36a9d84ad43bc5407e8d0285b3826f0ee99e717a6e2c8baa7b1acb7ac6ae
diff --git a/dev-util/roctracer/files/roctracer-5.3.3-do-not-install-test-files.patch b/dev-util/roctracer/files/roctracer-5.3.3-do-not-install-test-files.patch
new file mode 100644
index 000000000000..ac3e53c1f405
--- /dev/null
+++ b/dev-util/roctracer/files/roctracer-5.3.3-do-not-install-test-files.patch
@@ -0,0 +1,37 @@
+Remove all install commands for test
+===================================================================
+--- roctracer-rocm-5.3.3.orig/test/CMakeLists.txt
++++ roctracer-rocm-5.3.3/test/CMakeLists.txt
+@@ -87,7 +87,6 @@ function(generate_hsaco TARGET_ID INPUT_
+ DEPENDS ${INPUT_FILE} clang
+ COMMENT "Building ${OUTPUT_FILE}..."
+ VERBATIM)
+- install(FILES ${PROJECT_BINARY_DIR}/${OUTPUT_FILE} DESTINATION test/${PROJECT_NAME} COMPONENT tests)
+ set(HSACO_TARGET_LIST ${HSACO_TARGET_LIST} ${PROJECT_BINARY_DIR}/${OUTPUT_FILE} PARENT_SCOPE)
+ endfunction(generate_hsaco)
+
+@@ -150,24 +149,10 @@ add_dependencies(mytest dlopen)
+ ## Copy the golden traces and test scripts
+ configure_file(run.sh ${PROJECT_BINARY_DIR} COPYONLY)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink run.sh ${PROJECT_BINARY_DIR}/run_ci.sh)
+-install(PROGRAMS ${PROJECT_BINARY_DIR}/run.sh DESTINATION test/${PROJECT_NAME} COMPONENT tests)
+
+ configure_file(${PROJECT_SOURCE_DIR}/script/check_trace.py ${PROJECT_BINARY_DIR}/test/check_trace.py COPYONLY)
+-install(PROGRAMS ${PROJECT_BINARY_DIR}/test/check_trace.py DESTINATION test/${PROJECT_NAME}/test COMPONENT tests)
+
+ file(GLOB files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "golden_traces/tests_trace_cmp_levels.txt" "golden_traces/*_trace.txt")
+ foreach(file ${files})
+ configure_file(${file} ${PROJECT_BINARY_DIR}/test/${file} COPYONLY)
+ endforeach()
+-install(DIRECTORY ${PROJECT_BINARY_DIR}/test/golden_traces DESTINATION test/${PROJECT_NAME}/test COMPONENT tests)
+-
+-# install all executables
+-set(all_executables)
+-get_property(all_targets DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY BUILDSYSTEM_TARGETS)
+-foreach(target IN LISTS all_targets)
+- get_target_property(target_type ${target} TYPE)
+- if (target_type STREQUAL "EXECUTABLE")
+- list(APPEND all_executables ${target})
+- endif()
+-endforeach()
+-install(TARGETS ${all_executables} DESTINATION test/${PROJECT_NAME}/test COMPONENT tests)
diff --git a/dev-util/roctracer/files/roctracer-5.3.3-flat-lib-layout.patch b/dev-util/roctracer/files/roctracer-5.3.3-flat-lib-layout.patch
new file mode 100644
index 000000000000..46c8d1a168b8
--- /dev/null
+++ b/dev-util/roctracer/files/roctracer-5.3.3-flat-lib-layout.patch
@@ -0,0 +1,34 @@
+Install libs directly into /usr/lib64
+===================================================================
+Index: roctracer-rocm-5.3.3/src/CMakeLists.txt
+===================================================================
+--- roctracer-rocm-5.3.3.orig/src/CMakeLists.txt
++++ roctracer-rocm-5.3.3/src/CMakeLists.txt
+@@ -215,12 +215,12 @@ target_include_directories(roctracer_too
+ target_link_libraries(roctracer_tool util roctracer hsa-runtime64::hsa-runtime64 stdc++fs Threads::Threads atomic dl)
+ target_link_options(roctracer_tool PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/tracer_tool/exportmap -Wl,--no-undefined)
+
+-install(TARGETS roctracer_tool LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT runtime)
++install(TARGETS roctracer_tool LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime)
+
+ add_library(hip_stats SHARED hip_stats/hip_stats.cpp)
+ target_compile_definitions(hip_stats PRIVATE __HIP_PLATFORM_AMD__)
+ target_link_libraries(hip_stats roctracer stdc++fs)
+-install(TARGETS hip_stats LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT runtime)
++install(TARGETS hip_stats LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime)
+
+ endif()
+
+Index: roctracer-rocm-5.3.3/plugin/file/CMakeLists.txt
+===================================================================
+--- roctracer-rocm-5.3.3.orig/plugin/file/CMakeLists.txt
++++ roctracer-rocm-5.3.3/plugin/file/CMakeLists.txt
+@@ -38,5 +38,5 @@ target_link_options(file_plugin PRIVATE
+ target_link_libraries(file_plugin PRIVATE util roctracer hsa-runtime64::hsa-runtime64 stdc++fs)
+
+ install(TARGETS file_plugin LIBRARY
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}
+- COMPONENT runtime)
+\ No newline at end of file
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ COMPONENT runtime)
diff --git a/dev-util/roctracer/files/roctracer-5.3.3-rocm-path.patch b/dev-util/roctracer/files/roctracer-5.3.3-rocm-path.patch
new file mode 100644
index 000000000000..d8cc792b4dbb
--- /dev/null
+++ b/dev-util/roctracer/files/roctracer-5.3.3-rocm-path.patch
@@ -0,0 +1,12 @@
+Append flags for clang to recognize device lib path
+===================================================================
+--- roctracer-rocm-5.3.3.orig/test/CMakeLists.txt
++++ roctracer-rocm-5.3.3/test/CMakeLists.txt
+@@ -80,6 +80,7 @@ add_dependencies(mytest codeobj_test)
+ function(generate_hsaco TARGET_ID INPUT_FILE OUTPUT_FILE)
+ separate_arguments(CLANG_ARG_LIST UNIX_COMMAND
+ "-O2 -x cl -Xclang -finclude-default-header -cl-denorms-are-zero -cl-std=CL2.0 -Wl,--build-id=sha1
++ --rocm-path=@GENTOO_PORTAGE_EPREFIX@/usr --rocm-device-lib-path=@GENTOO_PORTAGE_EPREFIX@/usr/lib/amdgcn/bitcode
+ -target amdgcn-amd-amdhsa -mcpu=${TARGET_ID} -o ${OUTPUT_FILE} ${INPUT_FILE}")
+ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/${OUTPUT_FILE}
+ COMMAND clang ${CLANG_ARG_LIST}
diff --git a/dev-util/roctracer/metadata.xml b/dev-util/roctracer/metadata.xml
index 899809591942..1d728a2f4ec4 100644
--- a/dev-util/roctracer/metadata.xml
+++ b/dev-util/roctracer/metadata.xml
@@ -10,6 +10,10 @@
<name>Craig Andrews</name>
</maintainer>
<maintainer type="person" proxied="yes">
+ <email>xgreenlandforwyy@gmail.com</email>
+ <name>Yiyang Wu</name>
+ </maintainer>
+ <maintainer type="person" proxied="yes">
<email>gentoo@holzke.net</email>
<name>Wilfried Holzke</name>
</maintainer>
diff --git a/dev-util/roctracer/roctracer-5.3.3.ebuild b/dev-util/roctracer/roctracer-5.3.3.ebuild
new file mode 100644
index 000000000000..a053427379df
--- /dev/null
+++ b/dev-util/roctracer/roctracer-5.3.3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+ROCM_VERSION=${PV}
+
+inherit cmake prefix python-any-r1 rocm
+
+DESCRIPTION="Callback/Activity Library for Performance tracing AMD GPU's"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/roctracer.git"
+SRC_URI="https://github.com/ROCm-Developer-Tools/roctracer/archive/rocm-${PV}.tar.gz -> rocm-tracer-${PV}.tar.gz"
+S="${WORKDIR}/roctracer-rocm-${PV}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-libs/rocr-runtime:${SLOT}
+ dev-util/hip:${SLOT}"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ $(python_gen_any_dep '
+ dev-python/CppHeaderParser[${PYTHON_USEDEP}]
+ dev-python/ply[${PYTHON_USEDEP}]
+ ')
+"
+
+PATCHES=( "${FILESDIR}"/roctracer-5.3.3-flat-lib-layout.patch
+ "${FILESDIR}"/roctracer-5.3.3-do-not-install-test-files.patch )
+
+python_check_deps() {
+ python_has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]" \
+ "dev-python/ply[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ hprefixify script/*.py
+ eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.3.3-rocm-path.patch)
+}
+
+src_configure() {
+ export ROCM_PATH="$(hipconfig -p)"
+ local mycmakeargs=(
+ -DCMAKE_MODULE_PATH="${EPREFIX}/usr/lib64/cmake/hip"
+ -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ check_amdgpu
+ cd "${BUILD_DIR}" || die
+ # if LD_LIBRARY_PATH not set, dlopen cannot find correct lib
+ LD_LIBRARY_PATH="${EPREFIX}"/usr/lib64 bash run.sh || die
+}