diff options
author | Yiyang Wu <xgreenlandforwyy@gmail.com> | 2024-05-18 16:19:48 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2024-05-19 03:30:57 +0800 |
commit | 39d67e8a99bb91fddb720319fd363cb698ab90dd (patch) | |
tree | 02d4c8b5a49e452b55474bd87732b8c86eaa3b77 /dev-util/rocprofiler | |
parent | dev-libs/libunique: drop 3.0.2-r1, EAPI6-- (diff) | |
download | gentoo-39d67e8a99bb91fddb720319fd363cb698ab90dd.tar.gz gentoo-39d67e8a99bb91fddb720319fd363cb698ab90dd.tar.bz2 gentoo-39d67e8a99bb91fddb720319fd363cb698ab90dd.zip |
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@gmail.com>
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-util/rocprofiler')
-rw-r--r-- | dev-util/rocprofiler/files/rocprofiler-5.3.3-fix-python3.12-warning.patch | 88 | ||||
-rw-r--r-- | dev-util/rocprofiler/metadata.xml | 2 | ||||
-rw-r--r-- | dev-util/rocprofiler/rocprofiler-5.3.3-r1.ebuild (renamed from dev-util/rocprofiler/rocprofiler-5.3.3.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 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() { |