* [gentoo-commits] repo/gentoo:master commit in: dev-util/rocprofiler/, dev-util/rocprofiler/files/
@ 2022-06-13 12:00 Benda XU
0 siblings, 0 replies; 5+ messages in thread
From: Benda XU @ 2022-06-13 12:00 UTC (permalink / raw
To: gentoo-commits
commit: dc49ab61dfce7423b1cd908788a6630aa53b64e3
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Tue May 10 14:45:42 2022 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 12:00:49 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc49ab61
dev-util/rocprofiler: initial import
Closes: https://github.com/gentoo/gentoo/pull/25536
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
dev-util/rocprofiler/Manifest | 2 +
.../files/rocprofiler-4.3.0-fix-gcc11.patch | 13 ++++
.../files/rocprofiler-4.3.0-gentoo-location.patch | 71 ++++++++++++++++++++++
.../files/rocprofiler-5.0.2-gentoo-location.patch | 59 ++++++++++++++++++
dev-util/rocprofiler/metadata.xml | 15 +++++
dev-util/rocprofiler/rocprofiler-4.3.0.ebuild | 58 ++++++++++++++++++
dev-util/rocprofiler/rocprofiler-5.0.2.ebuild | 57 +++++++++++++++++
7 files changed, 275 insertions(+)
diff --git a/dev-util/rocprofiler/Manifest b/dev-util/rocprofiler/Manifest
new file mode 100644
index 000000000000..ad88feaed619
--- /dev/null
+++ b/dev-util/rocprofiler/Manifest
@@ -0,0 +1,2 @@
+DIST rocprofiler-4.3.0.tar.gz 1402250 BLAKE2B 3826c3b26b0d5838ab3475614c2ecd2265e177fe40b8a90abb491746513bd50841e5ceb34d1fcb4bcb2fbe8a6854b9715d0670d38f08775e5e14cd855f15629b SHA512 e327146604459f2f827ab943a21d0eaa0ee41cf6770ab94dd019d461cf6438e70a48139ce67ec1553d0f450fa5bb233a7ed39438e8bf39b33218d53e2c270d3b
+DIST rocprofiler-5.0.2.tar.gz 1401732 BLAKE2B ae870bc50dbd39c11e24f77ccb41773df1107b76cb7a12e1cebc66f8d66ddba6ad3bd6f9fe61657b03b22ef35f88fb608cf6070178f6aab24fe7a1bdcac43a96 SHA512 244e2b827126b7299ec0510daa5e1245a4a5a877394419f8bc9113f443231f67fc935609cbde6eeb26bb138ab4e95e2a88829ffa79ecc8f9881b5a77b5910c02
diff --git a/dev-util/rocprofiler/files/rocprofiler-4.3.0-fix-gcc11.patch b/dev-util/rocprofiler/files/rocprofiler-4.3.0-fix-gcc11.patch
new file mode 100644
index 000000000000..0aec99627a4a
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-4.3.0-fix-gcc11.patch
@@ -0,0 +1,13 @@
+Index: rocprofiler-rocm-4.3.0/test/ctrl/test_kernel.h
+===================================================================
+--- rocprofiler-rocm-4.3.0.orig/test/ctrl/test_kernel.h
++++ rocprofiler-rocm-4.3.0/test/ctrl/test_kernel.h
+@@ -23,7 +23,7 @@ THE SOFTWARE.
+ #ifndef TEST_CTRL_TEST_KERNEL_H_
+ #define TEST_CTRL_TEST_KERNEL_H_
+
+-#include <string.h>
++#include <string>
+ #include <stdint.h>
+ #include <map>
+
diff --git a/dev-util/rocprofiler/files/rocprofiler-4.3.0-gentoo-location.patch b/dev-util/rocprofiler/files/rocprofiler-4.3.0-gentoo-location.patch
new file mode 100644
index 000000000000..b6d8454dfedd
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-4.3.0-gentoo-location.patch
@@ -0,0 +1,71 @@
+Index: rocprofiler-rocm-4.3.0/bin/rpl_run.sh
+===================================================================
+--- rocprofiler-rocm-4.3.0.orig/bin/rpl_run.sh
++++ rocprofiler-rocm-4.3.0/bin/rpl_run.sh
+@@ -25,18 +25,18 @@
+ time_stamp=`date +%y%m%d_%H%M%S`
+ BIN_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
+ PKG_DIR=$(dirname $BIN_DIR)
+-ROOT_DIR=$(dirname $PKG_DIR)
+-TT_DIR=$ROOT_DIR/roctracer
++ROOT_DIR=$PKG_DIR
++TT_DIR=$ROOT_DIR
+ RUN_DIR=`pwd`
+ TMP_DIR="/tmp"
+ DATA_DIR="rpl_data_${time_stamp}_$$"
+
+-RPL_PATH=$PKG_DIR/lib
+-TLIB_PATH=$PKG_DIR/tool
+-TTLIB_PATH=$TT_DIR/tool
+-ROCM_LIB_PATH=$ROOT_DIR/lib
++RPL_PATH=$PKG_DIR/@LIB_DIR@
++TLIB_PATH=$PKG_DIR/@LIB_DIR@
++TTLIB_PATH=$TT_DIR/@LIB_DIR@
++ROCM_LIB_PATH=$ROOT_DIR/@LIB_DIR@
+
+-GFX=`/opt/rocm/bin/rocm_agent_enumerator | tail -1`
++GFX=`rocm_agent_enumerator | tail -1`
+
+ SPM_COUNTERS_FILE="spm_counters.txt"
+
+@@ -75,7 +75,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=$PKG_DIR/lib/metrics.xml
++export ROCP_METRICS=$PKG_DIR/share/rocprofiler/metrics.xml
+ # Disable AQL-profile read API
+ export AQLPROFILE_READ_API=0
+ # ROC Profiler package path
+@@ -109,7 +109,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: $PKG_DIR/lib/metrics.xml"
++ echo "Metrics definition: $PKG_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>"
+@@ -270,7 +270,7 @@ run() {
+ fi
+ if [ "$KFD_TRACE" = 1 ] ; then
+ API_TRACE=${API_TRACE}":kfd"
+- MY_LD_PRELOAD="$TT_DIR/lib/libkfdwrapper64.so $ROCM_LIB_PATH/libhsakmt.so.1 $MY_LD_PRELOAD"
++ MY_LD_PRELOAD="$TTLIB_PATH/libkfdwrapper64.so $ROCM_LIB_PATH/libhsakmt.so.1 $MY_LD_PRELOAD"
+ fi
+ if [ "$HIP_TRACE" = 1 ] ; then
+ API_TRACE=${API_TRACE}":hip"
+@@ -380,11 +380,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 "$PKG_DIR/tool/ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/bin/ctrl"
+ exit 1
+ elif [ "$1" = "--list-derived" ] ; then
+ export ROCP_INFO=d
+- HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/tool/ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/bin/ctrl"
+ exit 1
+ elif [ "$1" = "--basenames" ] ; then
+ if [ "$2" = "on" ] ; then
diff --git a/dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch b/dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch
new file mode 100644
index 000000000000..0605675e41c6
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch
@@ -0,0 +1,59 @@
+Index: rocprofiler-rocm-5.0.2/bin/rpl_run.sh
+===================================================================
+--- rocprofiler-rocm-5.0.2.orig/bin/rpl_run.sh
++++ rocprofiler-rocm-5.0.2/bin/rpl_run.sh
+@@ -25,16 +25,16 @@
+ time_stamp=`date +%y%m%d_%H%M%S`
+ BIN_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
+ PKG_DIR=$(dirname $BIN_DIR)
+-ROOT_DIR=$(dirname $PKG_DIR)
+-TT_DIR=$ROOT_DIR/roctracer
++ROOT_DIR=$PKG_DIR
++TT_DIR=ROOT_DIR
+ RUN_DIR=`pwd`
+ TMP_DIR="/tmp"
+ DATA_DIR="rpl_data_${time_stamp}_$$"
+
+-RPL_PATH=$PKG_DIR/lib
+-TLIB_PATH=$PKG_DIR/tool
+-TTLIB_PATH=$TT_DIR/tool
+-ROCM_LIB_PATH=$ROOT_DIR/lib
++RPL_PATH=$PKG_DIR/@LIB_DIR@
++TLIB_PATH=$PKG_DIR/@LIB_DIR@
++TTLIB_PATH=$TT_DIR/@LIB_DIR@
++ROCM_LIB_PATH=$ROOT_DIR/@LIB_DIR@
+
+ if [ -z "$ROCP_PYTHON_VERSION" ] ; then
+ ROCP_PYTHON_VERSION=python3
+@@ -70,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=$PKG_DIR/lib/metrics.xml
++export ROCP_METRICS=$PKG_DIR/share/rocprofiler/metrics.xml
+ # Disable AQL-profile read API
+ export AQLPROFILE_READ_API=0
+ # ROC Profiler package path
+@@ -104,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: $PKG_DIR/lib/metrics.xml"
++ echo "Metrics definition: $PKG_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>"
+@@ -374,11 +374,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 "$PKG_DIR/tool/ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/bin/ctrl"
+ exit 1
+ elif [ "$1" = "--list-derived" ] ; then
+ export ROCP_INFO=d
+- HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/tool/ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/bin/ctrl"
+ exit 1
+ elif [ "$1" = "--basenames" ] ; then
+ if [ "$2" = "on" ] ; then
diff --git a/dev-util/rocprofiler/metadata.xml b/dev-util/rocprofiler/metadata.xml
new file mode 100644
index 000000000000..922afe7981b0
--- /dev/null
+++ b/dev-util/rocprofiler/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="person" proxied="yes">
+ <email>xgreenlandforwyy@gmail.com</email>
+ <name>Yiyang Wu</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ROCm-Developer-Tools/rocprofiler</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-util/rocprofiler/rocprofiler-4.3.0.ebuild b/dev-util/rocprofiler/rocprofiler-4.3.0.ebuild
new file mode 100644
index 000000000000..28e57bde66a4
--- /dev/null
+++ b/dev-util/rocprofiler/rocprofiler-4.3.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake python-any-r1
+
+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/${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}/${P}-fix-gcc11.patch"
+ "${FILESDIR}/${PN}-4.3.0-gentoo-location.patch" )
+
+python_check_deps() {
+ has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ sed -e "s,\${DEST_NAME}/lib,$(get_libdir),g" \
+ -e "s,\${DEST_NAME}/include,include/\${DEST_NAME},g" \
+ -e "s,\${DEST_NAME}/bin,bin,g" \
+ -e "/ctrl DESTINATION/s,\${DEST_NAME}/tool,bin,g" \
+ -e "/CPACK_RESOURCE_FILE_LICENSE/d" \
+ -e "/libtool.so DESTINATION/s,\${DEST_NAME}/tool,$(get_libdir),g" -i CMakeLists.txt || die
+
+ cmake_src_prepare
+
+ sed -e "s,@LIB_DIR@,$(get_libdir),g" -i bin/rpl_run.sh || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/include/hsa"
+ -DPROF_API_HEADER_PATH="${EPREFIX}"/usr/include/roctracer/ext
+ -DUSE_PROF_API=1
+ )
+
+ cmake_src_configure
+}
diff --git a/dev-util/rocprofiler/rocprofiler-5.0.2.ebuild b/dev-util/rocprofiler/rocprofiler-5.0.2.ebuild
new file mode 100644
index 000000000000..ff321726622e
--- /dev/null
+++ b/dev-util/rocprofiler/rocprofiler-5.0.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake python-any-r1
+
+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/${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}-5.0.2-gentoo-location.patch" )
+
+python_check_deps() {
+ has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ sed -e "s,\${DEST_NAME}/lib,$(get_libdir),g" \
+ -e "s,\${DEST_NAME}/include,include/\${DEST_NAME},g" \
+ -e "s,\${DEST_NAME}/bin,bin,g" \
+ -e "/ctrl DESTINATION/s,\${DEST_NAME}/tool,bin,g" \
+ -e "/CPACK_RESOURCE_FILE_LICENSE/d" \
+ -e "/libtool.so DESTINATION/s,\${DEST_NAME}/tool,$(get_libdir),g" -i CMakeLists.txt || die
+
+ cmake_src_prepare
+
+ sed -e "s,@LIB_DIR@,$(get_libdir),g" -i bin/rpl_run.sh || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/include/hsa"
+ -DPROF_API_HEADER_PATH="${EPREFIX}"/usr/include/roctracer/ext
+ -DUSE_PROF_API=1
+ )
+
+ cmake_src_configure
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/rocprofiler/, dev-util/rocprofiler/files/
@ 2022-08-06 14:23 Benda XU
0 siblings, 0 replies; 5+ messages in thread
From: Benda XU @ 2022-08-06 14:23 UTC (permalink / raw
To: gentoo-commits
commit: e1d053dbfe4fa017dff9bb79e6e0fc794fc105f0
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sat Aug 6 08:14:32 2022 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sat Aug 6 14:20:14 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1d053db
dev-util/rocprofiler: Skip loading proprietary AQLProfile lib
This should be in d4034da0890695292c0c2d24aba60446bcf8a465 as the commit
message suggests, but missed there.
Closes: https://github.com/gentoo/gentoo/pull/26755
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
.../files/rocprofiler-4.3.0-no-aqlprofile.patch | 35 ++++++++++++++++++++++
dev-util/rocprofiler/rocprofiler-4.3.0.ebuild | 1 +
dev-util/rocprofiler/rocprofiler-5.0.2.ebuild | 1 +
3 files changed, 37 insertions(+)
diff --git a/dev-util/rocprofiler/files/rocprofiler-4.3.0-no-aqlprofile.patch b/dev-util/rocprofiler/files/rocprofiler-4.3.0-no-aqlprofile.patch
new file mode 100644
index 000000000000..12480d0baa0a
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-4.3.0-no-aqlprofile.patch
@@ -0,0 +1,35 @@
+Skip loading proprietary AQLProfile lib
+--- a/src/util/hsa_rsrc_factory.cpp 2021-06-28 23:09:44.000000000 +0800
++++ b/src/util/hsa_rsrc_factory.cpp 2022-05-11 10:48:23.431989766 +0800
+@@ -138,14 +138,6 @@ HsaRsrcFactory::HsaRsrcFactory(bool init
+ if (cpu_pool_ == NULL) CHECK_STATUS("CPU memory pool is not found", HSA_STATUS_ERROR);
+ if (kern_arg_pool_ == NULL) CHECK_STATUS("Kern-arg memory pool is not found", HSA_STATUS_ERROR);
+
+- // Get AqlProfile API table
+- aqlprofile_api_ = {0};
+-#ifdef ROCP_LD_AQLPROFILE
+- status = LoadAqlProfileLib(&aqlprofile_api_);
+-#else
+- status = hsa_api_.hsa_system_get_major_extension_table(HSA_EXTENSION_AMD_AQLPROFILE, hsa_ven_amd_aqlprofile_VERSION_MAJOR, sizeof(aqlprofile_api_), &aqlprofile_api_);
+-#endif
+- CHECK_STATUS("aqlprofile API table load failed", status);
+
+ // Get Loader API table
+ loader_api_ = {0};
+--- a/test/util/hsa_rsrc_factory.cpp 2021-06-28 23:09:44.000000000 +0800
++++ b/test/util/hsa_rsrc_factory.cpp 2022-05-11 10:50:44.571990702 +0800
+@@ -135,14 +135,6 @@ HsaRsrcFactory::HsaRsrcFactory(bool init
+ if (cpu_pool_ == NULL) CHECK_STATUS("CPU memory pool is not found", HSA_STATUS_ERROR);
+ if (kern_arg_pool_ == NULL) CHECK_STATUS("Kern-arg memory pool is not found", HSA_STATUS_ERROR);
+
+- // Get AqlProfile API table
+- aqlprofile_api_ = {0};
+-#ifdef ROCP_LD_AQLPROFILE
+- status = LoadAqlProfileLib(&aqlprofile_api_);
+-#else
+- status = hsa_api_.hsa_system_get_major_extension_table(HSA_EXTENSION_AMD_AQLPROFILE, hsa_ven_amd_aqlprofile_VERSION_MAJOR, sizeof(aqlprofile_api_), &aqlprofile_api_);
+-#endif
+- CHECK_STATUS("aqlprofile API table load failed", status);
+
+ // Get Loader API table
+ loader_api_ = {0};
diff --git a/dev-util/rocprofiler/rocprofiler-4.3.0.ebuild b/dev-util/rocprofiler/rocprofiler-4.3.0.ebuild
index 630f4754fc8f..33982694c17f 100644
--- a/dev-util/rocprofiler/rocprofiler-4.3.0.ebuild
+++ b/dev-util/rocprofiler/rocprofiler-4.3.0.ebuild
@@ -28,6 +28,7 @@ BDEPEND="
PATCHES=( "${FILESDIR}/${P}-fix-gcc11.patch"
"${FILESDIR}/${PN}-4.3.0-nostrip.patch"
+ "${FILESDIR}/${PN}-4.3.0-no-aqlprofile.patch"
"${FILESDIR}/${PN}-4.3.0-ldflag.patch"
"${FILESDIR}/${PN}-4.3.0-gentoo-location.patch" )
diff --git a/dev-util/rocprofiler/rocprofiler-5.0.2.ebuild b/dev-util/rocprofiler/rocprofiler-5.0.2.ebuild
index 7e8f0346636d..23d1b9cc746c 100644
--- a/dev-util/rocprofiler/rocprofiler-5.0.2.ebuild
+++ b/dev-util/rocprofiler/rocprofiler-5.0.2.ebuild
@@ -28,6 +28,7 @@ BDEPEND="
PATCHES=( "${FILESDIR}/${PN}-4.3.0-nostrip.patch"
"${FILESDIR}/${PN}-4.3.0-ldflag.patch"
+ "${FILESDIR}/${PN}-4.3.0-no-aqlprofile.patch"
"${FILESDIR}/${PN}-5.0.2-gentoo-location.patch" )
python_check_deps() {
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/rocprofiler/, dev-util/rocprofiler/files/
@ 2023-01-31 14:18 Benda XU
0 siblings, 0 replies; 5+ messages in thread
From: Benda XU @ 2023-01-31 14:18 UTC (permalink / raw
To: gentoo-commits
commit: a3b31b1d6dec842523387619507a7e910c2f6636
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Fri Jan 27 15:03:46 2023 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Tue Jan 31 14:18:32 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3b31b1d
dev-util/rocprofiler: add 5.3.3
Closes: https://github.com/gentoo/gentoo/pull/29303
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
dev-util/rocprofiler/Manifest | 1 +
.../files/rocprofiler-5.3.3-gentoo-location.patch | 102 +++++++++++++++++++++
.../rocprofiler-5.3.3-remove-aql-in-cmake.patch | 13 +++
dev-util/rocprofiler/rocprofiler-5.3.3.ebuild | 56 +++++++++++
4 files changed, 172 insertions(+)
diff --git a/dev-util/rocprofiler/Manifest b/dev-util/rocprofiler/Manifest
index 23a43f49ce08..358e4dfc5cd5 100644
--- a/dev-util/rocprofiler/Manifest
+++ b/dev-util/rocprofiler/Manifest
@@ -1,2 +1,3 @@
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
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.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
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/rocprofiler/, dev-util/rocprofiler/files/
@ 2023-02-01 9:53 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2023-02-01 9:53 UTC (permalink / raw
To: gentoo-commits
commit: b2d5fd153c30f7ef44db78b1005142704c9ee981
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 22:21:25 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Feb 1 09:52:48 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2d5fd15
dev-util/rocprofiler: drop 5.0.2-r1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
dev-util/rocprofiler/Manifest | 1 -
.../files/rocprofiler-4.3.0-ldflag.patch | 13 -----
dev-util/rocprofiler/rocprofiler-5.0.2-r1.ebuild | 60 ----------------------
3 files changed, 74 deletions(-)
diff --git a/dev-util/rocprofiler/Manifest b/dev-util/rocprofiler/Manifest
index 358e4dfc5cd5..b2cbc7154ef5 100644
--- a/dev-util/rocprofiler/Manifest
+++ b/dev-util/rocprofiler/Manifest
@@ -1,3 +1,2 @@
-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
diff --git a/dev-util/rocprofiler/files/rocprofiler-4.3.0-ldflag.patch b/dev-util/rocprofiler/files/rocprofiler-4.3.0-ldflag.patch
deleted file mode 100644
index dc097a568ca4..000000000000
--- a/dev-util/rocprofiler/files/rocprofiler-4.3.0-ldflag.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: rocprofiler-rocm-5.0.2/cmake_modules/env.cmake
-===================================================================
---- rocprofiler-rocm-5.0.2.orig/cmake_modules/env.cmake
-+++ rocprofiler-rocm-5.0.2/cmake_modules/env.cmake
-@@ -51,7 +51,7 @@ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS
- #set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=int-in-bool-context" )
- set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
-
--set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bdynamic -Wl,-z,noexecstack" )
-+set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bdynamic -Wl,-z,noexecstack" )
-
- set ( CMAKE_SKIP_BUILD_RPATH TRUE )
-
diff --git a/dev-util/rocprofiler/rocprofiler-5.0.2-r1.ebuild b/dev-util/rocprofiler/rocprofiler-5.0.2-r1.ebuild
deleted file mode 100644
index 0a578fec2151..000000000000
--- a/dev-util/rocprofiler/rocprofiler-5.0.2-r1.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..10} )
-
-inherit cmake python-any-r1
-
-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/${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-${PV}-r1:${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-ldflag.patch"
- "${FILESDIR}/${PN}-4.3.0-no-aqlprofile.patch"
- "${FILESDIR}/${PN}-5.0.2-gentoo-location.patch" )
-
-python_check_deps() {
- python_has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
-}
-
-src_prepare() {
- sed -e "s,\${DEST_NAME}/lib,$(get_libdir),g" \
- -e "s,\${DEST_NAME}/include,include/\${DEST_NAME},g" \
- -e "s,\${DEST_NAME}/bin,bin,g" \
- -e "/ctrl DESTINATION/s,\${DEST_NAME}/tool,bin,g" \
- -e "/CPACK_RESOURCE_FILE_LICENSE/d" \
- -e "/libtool.so DESTINATION/s,\${DEST_NAME}/tool,$(get_libdir),g" -i CMakeLists.txt || die
-
- cmake_src_prepare
-
- sed -e "s,@LIB_DIR@,$(get_libdir),g" -i bin/rpl_run.sh || die
-}
-
-src_configure() {
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
- -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/include/hsa"
- -DPROF_API_HEADER_PATH="${EPREFIX}"/usr/include/roctracer/ext
- -DUSE_PROF_API=1
- )
-
- cmake_src_configure
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/rocprofiler/, dev-util/rocprofiler/files/
@ 2024-05-18 19:34 Benda XU
0 siblings, 0 replies; 5+ messages in thread
From: Benda XU @ 2024-05-18 19:34 UTC (permalink / raw
To: gentoo-commits
commit: 39d67e8a99bb91fddb720319fd363cb698ab90dd
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sat May 18 08:19:48 2024 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sat May 18 19:30:57 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39d67e8a
dev-util/rocprofiler: relax SLOT dependencies
Tested some simple use case for rocprofiler-5.3.3 on
rocr-runtime/roctracer 5.7.1 and 6.1, no compatibility issues found.
Also fix python 3.12 syntax warning.
Update upstream url as well.
Closes: https://github.com/gentoo/gentoo/pull/36729
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
.../rocprofiler-5.3.3-fix-python3.12-warning.patch | 88 ++++++++++++++++++++++
dev-util/rocprofiler/metadata.xml | 2 +-
...er-5.3.3.ebuild => rocprofiler-5.3.3-r1.ebuild} | 13 ++--
3 files changed, 96 insertions(+), 7 deletions(-)
diff --git a/dev-util/rocprofiler/files/rocprofiler-5.3.3-fix-python3.12-warning.patch b/dev-util/rocprofiler/files/rocprofiler-5.3.3-fix-python3.12-warning.patch
new file mode 100644
index 000000000000..315ae6b880d9
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-5.3.3-fix-python3.12-warning.patch
@@ -0,0 +1,88 @@
+From c503cea17d6619d95c026fcf661333b3a587936b Mon Sep 17 00:00:00 2001
+From: Yiyang Wu <xgreenlandforwyy@gmail.com>
+Date: Sat, 18 May 2024 16:14:43 +0800
+Subject: [PATCH] Fix python3.12 SyntaxWarning: invalid escape sequence
+
+---
+ bin/mem_manager.py | 4 ++--
+ bin/tblextr.py | 18 +++++++++---------
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/bin/mem_manager.py b/bin/mem_manager.py
+index b5bed79..10ca971 100755
+--- a/bin/mem_manager.py
++++ b/bin/mem_manager.py
+@@ -91,7 +91,7 @@ class MemManager:
+ event = rec_vals[2] # 'Name'
+ procid = rec_vals[3] # 'pid'
+ recordid = rec_vals[5] # 'Index'
+- size_ptrn = re.compile(DELIM + 'Size=(\d+)' + DELIM)
++ size_ptrn = re.compile(DELIM + r'Size=(\d+)' + DELIM)
+ filled_ptrn = re.compile('BW=')
+ # query syncronous memcopy API record
+ key = (recordid, procid, 0)
+@@ -129,7 +129,7 @@ class MemManager:
+ event = rec_vals[4] # 'Name'
+ procid = rec_vals[5] # 'pid'
+ recordid = rec_vals[7] # 'Index'
+- size_ptrn = re.compile(DELIM + 'Size=(\d+)' + DELIM)
++ size_ptrn = re.compile(DELIM + r'Size=(\d+)' + DELIM)
+
+ # query syncronous memcopy API record
+ key = (recordid, procid, 0)
+diff --git a/bin/tblextr.py b/bin/tblextr.py
+index 9f4abb4..81d0851 100755
+--- a/bin/tblextr.py
++++ b/bin/tblextr.py
+@@ -112,14 +112,14 @@ def parse_res(infile):
+ if not os.path.isfile(infile): return
+ inp = open(infile, 'r')
+
+- beg_pattern = re.compile("^dispatch\[(\d*)\], (.*) kernel-name\(\"([^\"]*)\"\)")
+- prop_pattern = re.compile("([\w-]+)\((\w+)\)");
+- ts_pattern = re.compile(", time\((\d*),(\d*),(\d*),(\d*)\)")
++ beg_pattern = re.compile(r"^dispatch\[(\d*)\], (.*) kernel-name\(\"([^\"]*)\"\)")
++ prop_pattern = re.compile(r"([\w-]+)\((\w+)\)");
++ ts_pattern = re.compile(r", time\((\d*),(\d*),(\d*),(\d*)\)")
+ # var pattern below matches a variable name and a variable value from a one
+ # line text in the format of for example "WRITE_SIZE (0.2500000000)" or
+ # "GRBM_GUI_ACTIVE (27867)" or "TA_TA_BUSY[0]"
+- var_pattern = re.compile("^\s*([a-zA-Z0-9_]+(?:\[\d+\])?)\s+\((\d+(?:\.\d+)?)\)")
+- pid_pattern = re.compile("pid\((\d*)\)")
++ var_pattern = re.compile(r"^\s*([a-zA-Z0-9_]+(?:\[\d+\])?)\s+\((\d+(?:\.\d+)?)\)")
++ pid_pattern = re.compile(r"pid\((\d*)\)")
+
+ dispatch_number = 0
+ var_table_pid = 0
+@@ -340,7 +340,7 @@ def fill_ext_db(table_name, db, indir, trace_name, api_pid):
+ #############################################################
+ # arguments manipulation routines
+ def get_field(args, field):
+- ptrn1_field = re.compile(r'^.* ' + field + '\(');
++ ptrn1_field = re.compile(r'^.* ' + field + r'\(');
+ ptrn2_field = re.compile(r'\) .*$');
+ ptrn3_field = re.compile(r'\)\)$');
+ (field_name, n) = ptrn1_field.subn('', args, count=1);
+@@ -351,7 +351,7 @@ def get_field(args, field):
+ return (field_name, n)
+
+ def set_field(args, field, val):
+- return re.subn(field + '\(\w+\)([ \)])', field + '(' + str(val) + ')\\1', args, count=1)
++ return re.subn(field + r'\(\w+\)([ \)])', field + '(' + str(val) + ')\\1', args, count=1)
+
+ hsa_patch_data = {}
+ ops_patch_data = {}
+@@ -384,8 +384,8 @@ def fill_api_db(table_name, db, indir, api_name, api_pid, dep_pid, dep_list, dep
+ hip_sync_dev_event_ptrn = re.compile(r'hipDeviceSynchronize')
+ wait_event_ptrn = re.compile(r'WaitEvent|hipStreamSynchronize|hipDeviceSynchronize')
+ hip_stream_wait_write_ptrn = re.compile(r'hipStreamWaitValue64|hipStreamWriteValue64|hipStreamWaitValue32|hipStreamWriteValue32')
+- prop_pattern = re.compile("([\w-]+)\((\w+)\)");
+- beg_pattern = re.compile("^dispatch\[(\d*)\], (.*) kernel-name\(\"([^\"]*)\"\)")
++ prop_pattern = re.compile(r"([\w-]+)\((\w+)\)");
++ beg_pattern = re.compile(r"^dispatch\[(\d*)\], (.*) kernel-name\(\"([^\"]*)\"\)")
+ hip_strm_cr_event_ptrn = re.compile(r'hipStreamCreate')
+ hsa_mcopy_ptrn = re.compile(r'hsa_amd_memory_async_copy')
+ ptrn_fixformat = re.compile(r'(\d+:\d+ \d+:\d+ \w+)\(\s*(.*)\)$')
+--
+2.44.0
+
diff --git a/dev-util/rocprofiler/metadata.xml b/dev-util/rocprofiler/metadata.xml
index 922afe7981b0..4742f26158a4 100644
--- a/dev-util/rocprofiler/metadata.xml
+++ b/dev-util/rocprofiler/metadata.xml
@@ -10,6 +10,6 @@
<name>Yiyang Wu</name>
</maintainer>
<upstream>
- <remote-id type="github">ROCm-Developer-Tools/rocprofiler</remote-id>
+ <remote-id type="github">ROCm/rocprofiler</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-util/rocprofiler/rocprofiler-5.3.3.ebuild b/dev-util/rocprofiler/rocprofiler-5.3.3-r1.ebuild
similarity index 78%
rename from dev-util/rocprofiler/rocprofiler-5.3.3.ebuild
rename to dev-util/rocprofiler/rocprofiler-5.3.3-r1.ebuild
index 2c18d7475a6f..428554f757ab 100644
--- a/dev-util/rocprofiler/rocprofiler-5.3.3.ebuild
+++ b/dev-util/rocprofiler/rocprofiler-5.3.3-r1.ebuild
@@ -1,23 +1,23 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
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"
+HOMEPAGE="https://github.com/ROCm/rocprofiler"
+SRC_URI="https://github.com/ROCm/${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}
+RDEPEND="dev-libs/rocr-runtime
+ dev-util/roctracer
"
DEPEND="${RDEPEND}"
BDEPEND="
@@ -30,6 +30,7 @@ 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-fix-python3.12-warning.patch"
"${FILESDIR}/${PN}-5.3.3-remove-aql-in-cmake.patch" )
python_check_deps() {
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-18 19:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-01 9:53 [gentoo-commits] repo/gentoo:master commit in: dev-util/rocprofiler/, dev-util/rocprofiler/files/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2024-05-18 19:34 Benda XU
2023-01-31 14:18 Benda XU
2022-08-06 14:23 Benda XU
2022-06-13 12:00 Benda XU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox