diff options
Diffstat (limited to 'dev-util/rocprofiler')
6 files changed, 103 insertions, 4 deletions
diff --git a/dev-util/rocprofiler/Manifest b/dev-util/rocprofiler/Manifest index a254fb800f50..55e7e960d1bc 100644 --- a/dev-util/rocprofiler/Manifest +++ b/dev-util/rocprofiler/Manifest @@ -1,10 +1,13 @@ AUX rocprofiler-4.3.0-fix-gcc11.patch 410 BLAKE2B 04516f2da7ed09de30243bb05241489deb9ee23e94ef5014dede9c9d54869d24a8467699cdc7e7fa5840c98102b386555c40ab77c4fe1d9679d2bdf17fb7855f SHA512 170963d5a52b5b42924f39d0dc9b2c6c8e4ae468b97cf453a28d6a1be8f2b5bf49f73de80a40cd98b837038f53bbd4002f9ed83864129c36682f317b376da83c AUX rocprofiler-4.3.0-gentoo-location.patch 2651 BLAKE2B 296c84acb0887ef0792698636ca521d749fb81e283e0e42a9799f2af002a7f5397eb9051ee2711b3d78a34b9061db3be420e7de07fc1c0ee478c2b6402cecfa5 SHA512 a55c83584fb40a0a342125ae88689eea7857e6663759e5d5664a9c618afeea74662d551e9cab78ec03859d4503d67ea0f6b26143a8bea05d213f6426112ffb18 AUX rocprofiler-4.3.0-ldflag.patch 627 BLAKE2B 116e02e22f1ad0b3168dbc2aa76792a8797b1e6fe4c77f876af6c6e964936d2c2687972dd68c2057623197d8ddc1e9b318767f5e3818b7e35a03ce433b821080 SHA512 393e6334d2f13a6f8a0708c45233b1211b074969873ff1faaf5e58b667be57602b7a885f737f9309699fee9ab859d6ce28f5760e2b42556d9d8320957f68dca0 +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 2218 BLAKE2B 1f7a2279ee98be6ca5f225e4a034c661f992a61010d43096e63174a38b9bdb02726d7dfd32d8cbf2b9f328c25edd030f9db8d6cc1043ecf28f908aba94173f97 SHA512 83de59a2650349d9ce3ca761a67d0cb5e3c8f5b1c64eef75637ddd7fbba2cc869c5ce6665966bd033df9f5dbbf99677de6b433ef4398814acdcefaf6687c79df +AUX rocprofiler-5.0.2-gentoo-location.patch 2219 BLAKE2B 10237145d132be7b31b311b9f2ed69cb7494da312f980ffcf92eb89ed8a946d15e9312e77bd3997a578e6c33f3ef1efb896e73c597705bf461daf1f73cc77bfa SHA512 dfe21a0e43ecc94e15899e4f2a7ee28ae36d5b666ad6df66892b9d9befc9444111c817861b136aa8973cc426e0f30964909753360bf7fd7da31ffa05029457ba DIST rocprofiler-4.3.0.tar.gz 1402250 BLAKE2B 3826c3b26b0d5838ab3475614c2ecd2265e177fe40b8a90abb491746513bd50841e5ceb34d1fcb4bcb2fbe8a6854b9715d0670d38f08775e5e14cd855f15629b SHA512 e327146604459f2f827ab943a21d0eaa0ee41cf6770ab94dd019d461cf6438e70a48139ce67ec1553d0f450fa5bb233a7ed39438e8bf39b33218d53e2c270d3b DIST rocprofiler-5.0.2.tar.gz 1401732 BLAKE2B ae870bc50dbd39c11e24f77ccb41773df1107b76cb7a12e1cebc66f8d66ddba6ad3bd6f9fe61657b03b22ef35f88fb608cf6070178f6aab24fe7a1bdcac43a96 SHA512 244e2b827126b7299ec0510daa5e1245a4a5a877394419f8bc9113f443231f67fc935609cbde6eeb26bb138ab4e95e2a88829ffa79ecc8f9881b5a77b5910c02 -EBUILD rocprofiler-4.3.0.ebuild 1618 BLAKE2B ca44d2232838b018f8ee27faa0d04d9a25709c6649e73fd90b64381075295e0b38a0a19ce8cedaaae5eff3224d5b79a8854927078db54cff5a7b785b15370ba9 SHA512 10ff1ee45e0b60a8c7476b9d5ee7cc5a0393ed2a6c044dea9676903841d106e5c199aeca4e2581f38cebe62735f719fc5f4b91982692dac6b5c0f5efe412d4ce -EBUILD rocprofiler-5.0.2.ebuild 1581 BLAKE2B 0cae17e1bc9e5156cc61e51f2dcd0852798126546597d46f45497f56f8c0f20419bbf8a06ee5d422a7201ea04fd0d7739427d83a0423e47bac0f37486fcf3a90 SHA512 cb3186151bfbf782bf60e6b59d9806c77557966f9a8d41e569b6b5985c56468218dc0417d801889ab853f13de368e3156567a12f39945c77aca7ed6bbec2b7ff +DIST rocprofiler-5.1.3.tar.gz 1402172 BLAKE2B 16e9b127ede94a3f96056e84a2942b6c9f3aec90579fb12796ab8ba385160aa020e3dc77f7a475dadbc0a813a823ae733ca9560f6a09e55c4c82b13dd792dfa4 SHA512 6e9932a425eaaa2a1e1741280d7525c6360700f85edb3bcf4967fe9be4fed662bae0d2ba609701f0d9733769c340e93e32076024b27bab3303449c1d68d9e1ce +EBUILD rocprofiler-4.3.0.ebuild 1666 BLAKE2B abaaa17b92498d7db90a8361163ab16ad34ee4809af3c167b0c1c0ff08be4cd48eddd76c1045c9ca1fb94105f8f23b72c07309afc19a2db10a9240d854268876 SHA512 a02efb1ad47cdb4559fcc86380174e24c48239e2e1cedc454770a199b1bc4be9ba9808ae73f55c264089901e2171216df6087a690774a4b782704be8c3cb0cb0 +EBUILD rocprofiler-5.0.2.ebuild 1629 BLAKE2B 0c9738996f10c94cdb9bd295cde87e9361c6cf212d4d06aaedd89b6df07ebe0be414ed815780960f240d77408dcaba3bf3571bff40e50fd5856b0830708c718c SHA512 bf700e4967b2568dbee630f6dc8765b1022268c843b27eb944bc759f11d45b0e89433f8f17eab1346956309b76932966e30f803c6991666d4ab71a2a1bb22b3d +EBUILD rocprofiler-5.1.3.ebuild 1588 BLAKE2B bbd8e7a21ce4bf5883d72cfafaf7df0353b4a2551fd2cbd6883895bac5e8631ddcb6433f0500af844e04db2df581519b0a25b71acc6dac6a70db9361a5c0c98a SHA512 5ee3608db53523a3397125416f50de8dfb95a93cc4a0e0250a1e6066012b88ab23e28b4b4c2265dd08c09270cbc7cf1521084ed169a33f07180b6ebb3dcdfbba MISC metadata.xml 493 BLAKE2B 79000a74b13a0d35e0bcdb8254471fde9027c498ca75e761a3f694690315149e711ae8f7b73ae9bc5aa462358784fac055b975149109829e00cb2acac73ef138 SHA512 3f49c336aee801fb73d26b9d43a52816ca15c75061bed885c1b1406929ae1a3b9b01ce6f3c71b17ca9e121dcbc73f525d5a843c526ea8d4b433642eeff89ccd5 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/files/rocprofiler-5.0.2-gentoo-location.patch b/dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch index 0605675e41c6..56cc79211ff0 100644 --- a/dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch +++ b/dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch @@ -9,7 +9,7 @@ Index: rocprofiler-rocm-5.0.2/bin/rpl_run.sh -ROOT_DIR=$(dirname $PKG_DIR) -TT_DIR=$ROOT_DIR/roctracer +ROOT_DIR=$PKG_DIR -+TT_DIR=ROOT_DIR ++TT_DIR=$ROOT_DIR RUN_DIR=`pwd` TMP_DIR="/tmp" DATA_DIR="rpl_data_${time_stamp}_$$" 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() { diff --git a/dev-util/rocprofiler/rocprofiler-5.1.3.ebuild b/dev-util/rocprofiler/rocprofiler-5.1.3.ebuild new file mode 100644 index 000000000000..e58a6e4b99d3 --- /dev/null +++ b/dev-util/rocprofiler/rocprofiler-5.1.3.ebuild @@ -0,0 +1,59 @@ +# 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}/${PN}-4.3.0-nostrip.patch" + "${FILESDIR}/${PN}-4.3.0-no-aqlprofile.patch" + "${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 +} |