summaryrefslogtreecommitdiff
path: root/dev-util/rocprofiler
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/rocprofiler
parente860dfa5acdb67f8e2b8938b005dbaaaaf2c984a (diff)
gentoo auto-resync : 31:01:2023 - 21:02:55
Diffstat (limited to 'dev-util/rocprofiler')
-rw-r--r--dev-util/rocprofiler/Manifest7
-rw-r--r--dev-util/rocprofiler/files/rocprofiler-5.1.3-remove-Werror.patch12
-rw-r--r--dev-util/rocprofiler/files/rocprofiler-5.3.3-gentoo-location.patch102
-rw-r--r--dev-util/rocprofiler/files/rocprofiler-5.3.3-remove-aql-in-cmake.patch13
-rw-r--r--dev-util/rocprofiler/rocprofiler-5.1.3-r1.ebuild3
-rw-r--r--dev-util/rocprofiler/rocprofiler-5.3.3.ebuild56
6 files changed, 191 insertions, 2 deletions
diff --git a/dev-util/rocprofiler/Manifest b/dev-util/rocprofiler/Manifest
index 257ff2dafe59..39569b398aae 100644
--- a/dev-util/rocprofiler/Manifest
+++ b/dev-util/rocprofiler/Manifest
@@ -2,8 +2,13 @@ AUX rocprofiler-4.3.0-ldflag.patch 627 BLAKE2B 116e02e22f1ad0b3168dbc2aa76792a87
AUX rocprofiler-4.3.0-no-aqlprofile.patch 1708 BLAKE2B ab7054d368332f39fd4ddcb377610001011a279764fb921a2440245ed13ea123024e8c35b26398d3e007089687fc5ec734c6fce1fae58dd03963ad6fc0a02c84 SHA512 cd8c5f1d78e73b75c109d99f2d35fb9815d2360092669337941595698a3326c53266ea6a530faa599d954afaed19d8b41a73e4513ec832899eb17835134de5df
AUX rocprofiler-4.3.0-nostrip.patch 540 BLAKE2B 20592fe6ee33effc9feaca9ffcd6d48bef0a46bb7353c4e0b624cfb60b29a168ace763c86775c020ce162dca59886a68068485da19a2a14b35582a3ae33dfbe4 SHA512 a1d2a5d1606e4d2d249e51063f76b96dc460fb6ebe358029182bf9e4de88dd6879332cdff0ee7458b808a4dcc35fcbba3b43f0fc8c5dc2a0cffbbf2ddb05634c
AUX rocprofiler-5.0.2-gentoo-location.patch 2219 BLAKE2B 10237145d132be7b31b311b9f2ed69cb7494da312f980ffcf92eb89ed8a946d15e9312e77bd3997a578e6c33f3ef1efb896e73c597705bf461daf1f73cc77bfa SHA512 dfe21a0e43ecc94e15899e4f2a7ee28ae36d5b666ad6df66892b9d9befc9444111c817861b136aa8973cc426e0f30964909753360bf7fd7da31ffa05029457ba
+AUX rocprofiler-5.1.3-remove-Werror.patch 665 BLAKE2B d5a906d446e7f348c97ddd1359757c0dbf68bd501e4f60d6536702a154b489ce48c77da28621301cf410cff3d521c29cb0b0be9dc9e0ed7c232d9d3b9d2b1877 SHA512 914a9ab2a9efc539a13afd02b36812bbdd4452f78c7b890925c3a6a3d8ae5a1052506f7f4d2a344a085d2002296136f8f63459166551cee636e0eaf5d97cc38b
+AUX rocprofiler-5.3.3-gentoo-location.patch 4439 BLAKE2B aa97006a55cb088ddf4f09efa1ef6b866d1840207d6f7d8c36fe08b35885c8e3a979ba5a823abcd47069498a8b5dac7f2b9030c91da8733ce5815fe323d2bd50 SHA512 1f2e10597565cf2011f3319ff5abfeb6374cea9a1bbc672e7ad318f9b434750f3b69dc8ff1132fd44001fa51d54631abf6dc09678361bd97a2279762aa191d20
+AUX rocprofiler-5.3.3-remove-aql-in-cmake.patch 644 BLAKE2B 76b2c28d9ea542700f2a327e083b2499559b098117ee44c8d092e00e264573fdc64731cf0839ca459e2650773937019a65765077931befe04d47e8e83ffd8d83 SHA512 6713ff66427592f554e221047b94e5af82aafbf92f3466fe42e1bbd8bff706f4228e02be158d178f577ea37045ff28c946cced9c65083db42ba3b128a39a2623
DIST rocprofiler-5.0.2.tar.gz 1401732 BLAKE2B ae870bc50dbd39c11e24f77ccb41773df1107b76cb7a12e1cebc66f8d66ddba6ad3bd6f9fe61657b03b22ef35f88fb608cf6070178f6aab24fe7a1bdcac43a96 SHA512 244e2b827126b7299ec0510daa5e1245a4a5a877394419f8bc9113f443231f67fc935609cbde6eeb26bb138ab4e95e2a88829ffa79ecc8f9881b5a77b5910c02
DIST rocprofiler-5.1.3.tar.gz 1402172 BLAKE2B 16e9b127ede94a3f96056e84a2942b6c9f3aec90579fb12796ab8ba385160aa020e3dc77f7a475dadbc0a813a823ae733ca9560f6a09e55c4c82b13dd792dfa4 SHA512 6e9932a425eaaa2a1e1741280d7525c6360700f85edb3bcf4967fe9be4fed662bae0d2ba609701f0d9733769c340e93e32076024b27bab3303449c1d68d9e1ce
+DIST rocprofiler-5.3.3.tar.gz 1412740 BLAKE2B 29a63fc9df589787d18a28664002d35ec1b61e6b36f61cc1f2dc2dc14270d0aee4da594f735fceba71a7e29225bd0739b923a05bd36ec2a09a36e1ba95d8d971 SHA512 92b22272229c2c9a91983ded640a1b20f80538800f8e996dbf4e33e9f1f64a286a933f73b975e61c5b321883a11574c71ce91fd6ed7ddac32cd32da3bbea577c
EBUILD rocprofiler-5.0.2-r1.ebuild 1647 BLAKE2B 88a2eceedda30da6e82ad7063bdeb63f796b3b535f00e7c5e50036827fd51bd097c253d604b8756ce0ca4e170d5bda1878530d478d2e5e2288de7f208e720601 SHA512 b35f7af9b8782721de6f76b6d0ace3220faf6dfceebacd6dc4bec4e8f41ca2b6afe52352d802ee3641cdb2edf433e8026a0c5d419a94680b9d9061b713b087ad
-EBUILD rocprofiler-5.1.3-r1.ebuild 1606 BLAKE2B b42af07ba8ef17828298ffef677b76396dbcaec605b3a9d41aa048a280acdfb91115baaface50a79877f367e2c968e8f557bba8420028c8deada1c2e6a954dc3 SHA512 1b7b069d287f215e9bb8820352361a6ac962e642439be9c3b0847a0548a26ae2453c8421d7113694835ffb5e326cb52ee9a124382b9ed92f97884c5a8c514f41
+EBUILD rocprofiler-5.1.3-r1.ebuild 1654 BLAKE2B f5a12c1ee6b51e51af1328bfc4519b35f3c16fa237f16ae6d8612ef9a52e1876bd80409f9baabce0f8aebc239dbf81449cba6aee677877f4049febcb8385bb8f SHA512 1a82ff8ec38048f1b573880481f8e47c5fbf3612c6bd5790660770d4c1a7b501f272d7c3237bb274107e87b7a572f62d67d9c632fb1d9e0f45883132e3e7fa65
+EBUILD rocprofiler-5.3.3.ebuild 1438 BLAKE2B 482e77aeec369fde9f9f7dca7d236a1553f85ed4a5c7e1bb2768947fa3ed4e9969af3a996aeffc225f89e21911e0f54c2cfce6e74b4d8e31cb205d5ffc043219 SHA512 387b53eac4e82dd348cf9a9c70a9b6cd51ca70ca961df96079b731ef431aac98a025e5b4b719bc686af2697dddd36d61734c3357992f0278933981affaa10f32
MISC metadata.xml 493 BLAKE2B 79000a74b13a0d35e0bcdb8254471fde9027c498ca75e761a3f694690315149e711ae8f7b73ae9bc5aa462358784fac055b975149109829e00cb2acac73ef138 SHA512 3f49c336aee801fb73d26b9d43a52816ca15c75061bed885c1b1406929ae1a3b9b01ce6f3c71b17ca9e121dcbc73f525d5a843c526ea8d4b433642eeff89ccd5
diff --git a/dev-util/rocprofiler/files/rocprofiler-5.1.3-remove-Werror.patch b/dev-util/rocprofiler/files/rocprofiler-5.1.3-remove-Werror.patch
new file mode 100644
index 000000000000..a30d6d6d00a7
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-5.1.3-remove-Werror.patch
@@ -0,0 +1,12 @@
+Index: rocprofiler-rocm-5.1.3/cmake_modules/env.cmake
+===================================================================
+--- rocprofiler-rocm-5.1.3.orig/cmake_modules/env.cmake
++++ rocprofiler-rocm-5.1.3/cmake_modules/env.cmake
+@@ -38,7 +38,6 @@ add_definitions ( -DHSA_DEPRECATED= )
+ ## Linux Compiler options
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
+-set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden" )
diff --git a/dev-util/rocprofiler/files/rocprofiler-5.3.3-gentoo-location.patch b/dev-util/rocprofiler/files/rocprofiler-5.3.3-gentoo-location.patch
new file mode 100644
index 000000000000..48e6f6973ac8
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-5.3.3-gentoo-location.patch
@@ -0,0 +1,102 @@
+Index: rocprofiler-rocm-5.3.3/bin/rpl_run.sh
+===================================================================
+--- rocprofiler-rocm-5.3.3.orig/bin/rpl_run.sh
++++ rocprofiler-rocm-5.3.3/bin/rpl_run.sh
+@@ -29,11 +29,12 @@ RUN_DIR=`pwd`
+ TMP_DIR="/tmp"
+ DATA_DIR="rpl_data_${time_stamp}_$$"
+
+-RPL_PATH=$ROOT_DIR/lib
+-TLIB_PATH=$RPL_PATH/rocprofiler
+-TTLIB_PATH=$ROOT_DIR/lib/roctracer
+-ROCM_LIB_PATH=$ROOT_DIR/lib
+-PROF_BIN_DIR=$ROOT_DIR/libexec/rocprofiler
++RPL_PATH=$ROOT_DIR/@LIB_DIR@
++TLIB_PATH=$RPL_PATH
++TTLIB_PATH=$ROOT_DIR/@LIB_DIR@
++ROCM_LIB_PATH=$ROOT_DIR/@LIB_DIR@
++PROF_BIN_DIR=$ROOT_DIR/bin
++PROF_LIBEXEC_DIR=$ROOT_DIR/libexec/rocprofiler
+
+ if [ -z "$ROCP_PYTHON_VERSION" ] ; then
+ ROCP_PYTHON_VERSION=python3
+@@ -69,7 +70,7 @@ export ROCP_HSA_INTERCEPT=1
+ # Disabling internal ROC Profiler proxy queue (simple version supported for testing purposes)
+ unset ROCP_PROXY_QUEUE
+ # ROC Profiler metrics definition
+-export ROCP_METRICS=$TLIB_PATH/metrics.xml
++export ROCP_METRICS=$ROOT_DIR/share/rocprofiler/metrics.xml
+ # Disable AQL-profile read API
+ export AQLPROFILE_READ_API=0
+ # ROC Profiler package path
+@@ -103,7 +104,7 @@ usage() {
+ bin_name=`basename $0`
+ echo "ROCm Profiling Library (RPL) run script, a part of ROCprofiler library package."
+ echo "Full path: $BIN_DIR/$bin_name"
+- echo "Metrics definition: $TLIB_PATH/metrics.xml"
++ echo "Metrics definition: $ROOT_DIR/share/rocprofiler/metrics.xml"
+ echo ""
+ echo "Usage:"
+ echo " $bin_name [-h] [--list-basic] [--list-derived] [-i <input .txt/.xml file>] [-o <output CSV file>] <app command line>"
+@@ -211,7 +212,7 @@ fi
+ # setting ROCM_LIB_PATH
+ set_rocm_lib_path() {
+
+- for ROCM_LIB_PATH in "$ROOT_DIR/lib" "$ROOT_DIR/lib64" ; do
++ for ROCM_LIB_PATH in $TLIB_PATH ; do
+ if [ -d "$ROCM_LIB_PATH" ]; then
+ return 0
+ fi
+@@ -385,11 +386,11 @@ while [ 1 ] ; do
+ export ROCP_METRICS="$2"
+ elif [ "$1" = "--list-basic" ] ; then
+ export ROCP_INFO=b
+- HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$TLIB_PATH/rocprof-ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PROF_BIN_DIR/rocprof-ctrl"
+ exit 1
+ elif [ "$1" = "--list-derived" ] ; then
+ export ROCP_INFO=d
+- HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$TLIB_PATH/rocprof-ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PROF_BIN_DIR/rocprof-ctrl"
+ exit 1
+ elif [ "$1" = "--basenames" ] ; then
+ if [ "$2" = "on" ] ; then
+@@ -550,7 +551,7 @@ elif [ "$input_type" = "txt" -o "$input_
+ mkdir -p $RES_DIR
+ echo "RPL: output dir '$RES_DIR'"
+ if [ "$input_type" = "txt" ] ; then
+- $PROF_BIN_DIR/txt2xml.sh $INPUT_FILE $RES_DIR
++ $PROF_LIBEXEC_DIR/txt2xml.sh $INPUT_FILE $RES_DIR
+ else
+ echo "<metric></metric>" > $RES_DIR/input.xml
+ fi
+@@ -582,9 +583,9 @@ if [ -n "$csv_output" ] ; then
+ merge_output $OUTPUT_LIST
+ if [ "$GEN_STATS" = "1" ] ; then
+ db_output=$(echo $csv_output | sed "s/\.csv/.db/")
+- $ROCP_PYTHON_VERSION $PROF_BIN_DIR/tblextr.py $db_output $OUTPUT_LIST
++ $ROCP_PYTHON_VERSION $PROF_LIBEXEC_DIR/tblextr.py $db_output $OUTPUT_LIST
+ else
+- $ROCP_PYTHON_VERSION $PROF_BIN_DIR/tblextr.py $csv_output $OUTPUT_LIST
++ $ROCP_PYTHON_VERSION $PROF_LIBEXEC_DIR/tblextr.py $csv_output $OUTPUT_LIST
+ fi
+ if [ "$?" -ne 0 ] ; then
+ echo "Profiling data corrupted: '$OUTPUT_LIST'" | tee "$ROCPROFILER_SESS/error"
+Index: rocprofiler-rocm-5.3.3/CMakeLists.txt
+===================================================================
+--- rocprofiler-rocm-5.3.3.orig/CMakeLists.txt
++++ rocprofiler-rocm-5.3.3/CMakeLists.txt
+@@ -159,10 +159,10 @@ install ( FILES
+ install ( FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/test/tool/metrics.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/test/tool/gfx_metrics.xml
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${DEST_NAME} )
++ DESTINATION ${CMAKE_INSTALL_DATADIR}/${DEST_NAME} )
+ # librocprof-tool.so
+-install ( FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so DESTINATION ${CMAKE_INSTALL_LIBDIR}/${DEST_NAME} )
+-install ( FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl DESTINATION ${CMAKE_INSTALL_LIBDIR}/${DEST_NAME}
++install ( FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so DESTINATION ${CMAKE_INSTALL_LIBDIR} )
++install ( FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl DESTINATION ${CMAKE_INSTALL_BINDIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
+
+ # File reorg Backward compatibility
diff --git a/dev-util/rocprofiler/files/rocprofiler-5.3.3-remove-aql-in-cmake.patch b/dev-util/rocprofiler/files/rocprofiler-5.3.3-remove-aql-in-cmake.patch
new file mode 100644
index 000000000000..19619f9606f5
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-5.3.3-remove-aql-in-cmake.patch
@@ -0,0 +1,13 @@
+Index: rocprofiler-rocm-5.3.3/cmake_modules/env.cmake
+===================================================================
+--- rocprofiler-rocm-5.3.3.orig/cmake_modules/env.cmake
++++ rocprofiler-rocm-5.3.3/cmake_modules/env.cmake
+@@ -119,8 +119,3 @@ message ( "---------GPU_TARGETS: ${GPU_T
+ if ( "${ROCM_ROOT_DIR}" STREQUAL "" )
+ message ( FATAL_ERROR "ROCM_ROOT_DIR is not found." )
+ endif ()
+-
+-find_library ( FIND_AQL_PROFILE_LIB "libhsa-amd-aqlprofile64.so" HINTS ${CMAKE_INSTALL_PREFIX} PATHS ${ROCM_ROOT_DIR})
+-if ( NOT FIND_AQL_PROFILE_LIB )
+- message ( FATAL_ERROR "AQL_PROFILE not installed. Please install AQL_PROFILE" )
+-endif()
diff --git a/dev-util/rocprofiler/rocprofiler-5.1.3-r1.ebuild b/dev-util/rocprofiler/rocprofiler-5.1.3-r1.ebuild
index ded4edd1ce8e..e63978351e11 100644
--- a/dev-util/rocprofiler/rocprofiler-5.1.3-r1.ebuild
+++ b/dev-util/rocprofiler/rocprofiler-5.1.3-r1.ebuild
@@ -28,7 +28,8 @@ BDEPEND="
PATCHES=( "${FILESDIR}/${PN}-4.3.0-nostrip.patch"
"${FILESDIR}/${PN}-4.3.0-no-aqlprofile.patch"
- "${FILESDIR}/${PN}-5.0.2-gentoo-location.patch" )
+ "${FILESDIR}/${PN}-5.0.2-gentoo-location.patch"
+ "${FILESDIR}/${PN}-5.1.3-remove-Werror.patch" )
python_check_deps() {
python_has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
diff --git a/dev-util/rocprofiler/rocprofiler-5.3.3.ebuild b/dev-util/rocprofiler/rocprofiler-5.3.3.ebuild
new file mode 100644
index 000000000000..2c18d7475a6f
--- /dev/null
+++ b/dev-util/rocprofiler/rocprofiler-5.3.3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit cmake python-any-r1
+
+DESCRIPTION="Callback/Activity Library for Performance tracing AMD GPU's"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/rocprofiler.git"
+SRC_URI="https://github.com/ROCm-Developer-Tools/${PN}/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-rocm-${PV}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+RDEPEND="dev-libs/rocr-runtime:${SLOT}
+ dev-util/roctracer:${SLOT}
+ "
+DEPEND="${RDEPEND}"
+BDEPEND="
+ $(python_gen_any_dep '
+ dev-python/CppHeaderParser[${PYTHON_USEDEP}]
+ ')
+"
+
+PATCHES=( "${FILESDIR}/${PN}-4.3.0-nostrip.patch"
+ "${FILESDIR}/${PN}-4.3.0-no-aqlprofile.patch"
+ "${FILESDIR}/${PN}-5.1.3-remove-Werror.patch"
+ "${FILESDIR}/${PN}-5.3.3-gentoo-location.patch"
+ "${FILESDIR}/${PN}-5.3.3-remove-aql-in-cmake.patch" )
+
+python_check_deps() {
+ python_has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed -e "s,@LIB_DIR@,$(get_libdir),g" -i bin/rpl_run.sh || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_SKIP_RPATH=On
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/include/hsa"
+ -DPROF_API_HEADER_PATH="${EPREFIX}"/usr/include/roctracer/ext
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
+ -DUSE_PROF_API=1
+ )
+
+ cmake_src_configure
+}