diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-06-27 07:59:40 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-06-27 07:59:40 +0100 |
commit | d2ed973482fdd800013658e83a61709b29e0a80f (patch) | |
tree | 57ea7666a57b5a05a4c8866e4915e90b4a6e7c94 /dev-util | |
parent | 9f6a82a85d400d6ae7de04c43cee88dbc6bc4da0 (diff) |
gentoo auto-resync : 27:06:2024 - 07:59:39
Diffstat (limited to 'dev-util')
71 files changed, 2723 insertions, 487 deletions
diff --git a/dev-util/Manifest.gz b/dev-util/Manifest.gz Binary files differindex f08d0ea6a0af..2b9d0c897235 100644 --- a/dev-util/Manifest.gz +++ b/dev-util/Manifest.gz diff --git a/dev-util/Tensile/Manifest b/dev-util/Tensile/Manifest index 1c4c02b31a58..43b80f0a5ba4 100644 --- a/dev-util/Tensile/Manifest +++ b/dev-util/Tensile/Manifest @@ -10,12 +10,16 @@ AUX Tensile-5.4.2-use-ninja.patch 1164 BLAKE2B 41d6dbb68fa41b53d230afd06af95acb0 AUX Tensile-5.7.1-expand-isa-compatibility.patch 1632 BLAKE2B 807df38c99852b58801cb84bccf8cdd28b5575a460130e4463b483fb875f7adfb1d7902a47ca7e9f8735285bfaf3aa1a422595e57ec616faf2af423892301384 SHA512 3cf82928780532d32dfd0680a0ea8d8b990055186795ddc6d93a85941eeb9f0968979fe33fc4155f79413c54b8809d52eb3327624d51c187bfb8cd8bfef66bd4 AUX Tensile-5.7.1-fix-msgpack-dependency.patch 1069 BLAKE2B 888447b0e8d3b2314c104b7cbf85fecc7645e681fdd91e325197f016274f3f7bd5c6f0e9a84c84a17ee31611c661a15a5fbf203814a932bfe5bda731af1ee766 SHA512 39198a95351584b1693c714cbe571012e8ad49aafda4c68ba2fe252685314d40213d6c23bae39834cc98207a58fe5881aae08e6bdedfbab63b9e2acf26ee79dc AUX Tensile-5.7.1-gentoopath.patch 2284 BLAKE2B 36f55d7eefe595395c108671d55a07cb8bd4d8d8c21944edb53465e32076d99cd23c38709993408694d54022c2e9362dd2c1943423b99e4829d2d5a663c1aec7 SHA512 5f5f96ce2ffa7b9e18a2ad82ebaa419537586356602de0feddf5884de3ecbf358d19cc2f59f2c6d883e18de9c029a901143d98ed2c48bb70fee3d7d8501f622e +AUX Tensile-6.0.2-expand-isa-compatibility.patch 1355 BLAKE2B daf73107efc31a4585c44627de3d2de8f6ba390da1ea47aea0f87613e11ca0c6332b2e8b9935d67c1c10b80bb373c33eff3d4d73f33500d7eea2c00a7bb02c86 SHA512 5e624082eac08f940cb01d4c33664c34eb0d79ec6a66ffe82700c6e4edc931c95ed5e990d2cfbfa66497c35a85a63620c06ad0dd3202476211bf723327b52545 +AUX Tensile-6.1.1-fix-msgpack-dependency.patch 1221 BLAKE2B 8b3b1f2b94f0a5dfb5e4f4e973410a536c2d3bb306b7d0669fdf2d47d85ce54e2f34eb009843b99234f8bfdd42f20eb940c52db23a8099169d949bb4e3decf1b SHA512 02ca22defae159f13da6e717a94e2708c476012ed370ab46df54f529ae31079b5700afeed7b68a0f63a1d763edfb9ea2898b4ccc98de4fcf540e161aa06c3fbf AUX Tensile-change-cmake-name-for-msgpack-cxx-6-release.patch 422 BLAKE2B 791a8041667c29f2cd06d036e6f54530fc88ac4afff9bd2f3f5dd6ab3a6daa6b52ba7459c156e12dae02bd918f740d1e1d22bd6bc7e26bd14269a5ffd877aa13 SHA512 a738be31fd735bf3d8ff17d844771e6113f9868c1d73f1eecd75e1ecfb5d04c743c9463a1e599712b9bc0d7877d8d90fa38fbc7a266add8b61e7fb575693eb4f DIST Tensile-5.0.2-PR1419.patch.gz 43754 BLAKE2B 3b1d7333ed0115f77816806e7735e25d897dbae3f7a40ece61d655c8f016d9d1c804b586b4e0e75661e20c517f5937a61d5ead25a545f0ce2e4a178bcbb3e7be SHA512 0154d8e14d335f4ecd86e5db335289f8662cede7e5d4b93bf6c56d8e48c1d7d0457271c078c9abbbca1f4aa91f028f6ce6a89efb783ba0207d0f39fd5de8a42c DIST rocm-Tensile-5.1.3.tar.gz 14357517 BLAKE2B 7c5881cc2b1d25db39f54a99f9f0a08395a5f7a58deebe74d9868e8f7044db5ae2f3907196adf16dc6abeba0f1f47f5cce5c8900891276daff8e4ad614cf3b94 SHA512 4405cb6de65c1da1fd93910fc901402a24e996ff04eccadf483c25d8eb518e03ea9bbf00e372dd5fe377696e71c39355603095f3c5fc1e26d311ed15d8e3b734 DIST rocm-Tensile-5.4.2.tar.gz 14413805 BLAKE2B ca1c13785164439f6fe83f16b36b7a0b06a63b70b9f0741d77b0fff98f38d1e1c7e9a54ef61897e6eb0a4eaf52ec9e5f14f42a7e6fd657f26306afa3de0c74a2 SHA512 d99736a202c7353979e732941199b4b20e53ff2b6c19a7175609440a840aa5624bc53a8013c435f31ac37933527771521ff02137c1c8fd53c5317eca8533be80 DIST rocm-Tensile-5.7.1.tar.gz 12396002 BLAKE2B ec2c2bc3f07fe22abd800b642c998ea80b9e4e2d0d28c4763d574dbd2fcb14c735223ddc7571d4ab3a48f0bd819cc835c16df9882049c5bf56f25ef729e6d654 SHA512 8f356f36cfec74ee9b000d1180cf52077dc5c595e5c5a40792fc3eb13f3139980c7440f9bc912218f946cf8137e2481d23fe39f110511c1bb55fe85a933ffd36 +DIST rocm-Tensile-6.1.1.tar.gz 12675289 BLAKE2B dfe3698d7dda14d5b20a6fe1ef6535ac9737ac330b71678a3a94e939adc2350e2dcf33e58c711ee90dae543efba59fe210bfa39fc69b63910ec4537db3f209bf SHA512 cf8b014b1ff7cd5d45236b8a9a6f5604b02e34a9245a163c672847b535d565151bf7e3a5127601681e80e6fe26964a0e544594044efe2fe68e39b0f1128f96e2 EBUILD Tensile-5.1.3-r3.ebuild 2811 BLAKE2B 77f941574f7586da7f8122c126ede4288004ca1a31860e12bdb22d340c7e9b017871bc362e698f8b797c3699965babd332742ff2832314aeef96324ea06142c6 SHA512 0275dfcec4c5b417444a5ebbff9eb1e896db69ca735ff082aa863e1aa6da12ea4b227d59d8794bf1d512d6a965d9ce1768418db830c2f27a3baf528f3f60b687 EBUILD Tensile-5.4.2-r2.ebuild 3348 BLAKE2B e92698536854d4157a2b408b781cdec49e0c9caedacca8ee5902d976867ec8712d721adacb9973178cffe96de4d5de44cbcf70bb58494958663e9dc4c101452e SHA512 985b6dbac41eeae088247a11adb387043afff952ea7f1e87a24eb94f81f18970ad9360bbf0a683bee26234afaf698da108e75a39eeda7ccb386ec9607c0359a8 -EBUILD Tensile-5.7.1-r2.ebuild 3496 BLAKE2B 5dce5371520fd9f491b69f147a845baa42d212c07e2ff7f71f1f5a33cdc4290e888fcc1e79f19115841316161f601c335f3fc7b123b2e219fbb2cebe4c065fec SHA512 93007f1ca76a0a9961f11cff3c3eaedd62591d7063e334b2002f61770fbf9abeecc836b59331128dfc69780456ae89f3fa54f85c561f1289150207f0d243e856 +EBUILD Tensile-5.7.1-r2.ebuild 3534 BLAKE2B eb31593d71f596d1f2c23f453fba30e8c723da3095291e46e3290e47e044e510cf57235b0b9ddafe79189b59efd1df928f2f8a7f6cc535865170740b91b94f74 SHA512 d576777ac8e31dfc7930efa2e9b16dca9c9eeca921b92cf299f8c42ab10c41463c88f6b928659b0e4056fda38e7aa5daccec3ab1996b30dbe997ee693391f79a +EBUILD Tensile-6.1.1.ebuild 3554 BLAKE2B 721027444a768c8e4d4330acc7fea8ee85882af8a45d8576cdf2f03c68bd1e241e0f750819f32855370e3a7b11a433f83f272f0b4f30c33e39d7a0eb67b872fd SHA512 207e7a8f659c6aff1be8d5202fb99ac2ca09023247e5e5ff0827fd001bb95aaf4ab7eb12b97e5b44fb676827fa6e407093ad9eea46f41ff7766867a774ee6469 MISC metadata.xml 478 BLAKE2B 4931f453630761d3272371d09065c23cd9fea6e9a80f3b78a07e672e5d2e891c2ad7661883e1cb1f41e89fb2cd725a7189937c7b3cc7fc39b23ef0caaf0b3ce7 SHA512 d57284ff50913d95f092a5b8e4e566d0d6668b56afadfeb2e7003f2af6ed2106f14df82be880b2ea71dec29b614c5cb286a085098fbe8eed16e8bd3588149be6 diff --git a/dev-util/Tensile/Tensile-5.7.1-r2.ebuild b/dev-util/Tensile/Tensile-5.7.1-r2.ebuild index 94b4aac75b1b..64902c86549c 100644 --- a/dev-util/Tensile/Tensile-5.7.1-r2.ebuild +++ b/dev-util/Tensile/Tensile-5.7.1-r2.ebuild @@ -38,6 +38,7 @@ BDEPEND=" dev-python/pytest-forked[${PYTHON_USEDEP}] dev-python/pytest-xdist[${PYTHON_USEDEP}] dev-python/filelock[${PYTHON_USEDEP}] + dev-python/joblib[${PYTHON_USEDEP}] ) " diff --git a/dev-util/Tensile/Tensile-6.1.1.ebuild b/dev-util/Tensile/Tensile-6.1.1.ebuild new file mode 100644 index 000000000000..c8debc3456c3 --- /dev/null +++ b/dev-util/Tensile/Tensile-6.1.1.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +DISTUTILS_USE_PEP517=setuptools +ROCM_VERSION=${PV} +LLVM_COMPAT=( 18 ) + +inherit cmake distutils-r1 llvm-r1 prefix rocm + +DESCRIPTION="Stretching GPU performance for GEMMs and tensor contractions" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/Tensile" +SRC_URI="https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-${PV}.tar.gz -> rocm-Tensile-${PV}.tar.gz" +S="${WORKDIR}/${PN}-rocm-${PV}" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" +IUSE="client test" +REQUIRED_USE="client? ( ${ROCM_REQUIRED_USE} )" + +RESTRICT="!test? ( test )" + +RDEPEND="${PYTHON_DEPS} + client? ( dev-libs/boost ) + >=dev-cpp/msgpack-cxx-6.0.0 + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/msgpack[${PYTHON_USEDEP}] + dev-python/joblib[${PYTHON_USEDEP}] + =dev-util/hip-6* + >=dev-util/rocm-smi-4.3.0 + $(llvm_gen_dep ' + sys-devel/clang:${LLVM_SLOT} + ') +" +DEPEND="${RDEPEND}" +BDEPEND=" + test? ( + dev-python/pytest-forked[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + dev-python/filelock[${PYTHON_USEDEP}] + dev-python/joblib[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${PN}-4.3.0-output-commands.patch + "${FILESDIR}"/${PN}-5.4.2-fix-arch-parse.patch + "${FILESDIR}"/${PN}-5.4.2-use-ninja.patch + "${FILESDIR}"/${PN}-6.1.1-fix-msgpack-dependency.patch + "${FILESDIR}"/${PN}-6.0.2-expand-isa-compatibility.patch +) + +CMAKE_USE_DIR="${S}/${PN}/Source" + +src_prepare() { + distutils-r1_src_prepare + sed -e "s,\@LLVM_PATH\@,$(get_llvm_prefix),g" \ + "${FILESDIR}"/${PN}-5.7.1-gentoopath.patch > "${S}"/gentoopath.patch || die + eapply $(prefixify_ro "${S}"/gentoopath.patch) + + pushd ${PN} || die + + sed -e "/ROCM_SMI_ROOT/s,lib,$(get_libdir)," \ + -i Source/cmake/FindROCmSMI.cmake || die + sed -r -e "/TENSILE_USE_LLVM/s/ON/OFF/" \ + -i Source/CMakeLists.txt || die + + # ${Tensile_ROOT}/bin does not exists; call command directly + sed -e "s,\${Tensile_ROOT}/bin/,,g" -i cmake/TensileConfig.cmake || die + + local Tensile_share_dir="\"${EPREFIX}/usr/share/${PN}\"" + sed -e "/HipClangVersion/s/0.0.0/$(hipconfig -v)/" -i Common.py || die + + sed -e "s,os.path.dirname(os.path.realpath(__file__)),${Tensile_share_dir},g" \ + -i ReplacementKernels.py Common.py ${PN}.py || die + + sed -e "s|os\.path\.dirname.*$|\"${EPREFIX}/usr/share/Tensile/Source\", end='')|" -i __init__.py || die + + popd || die + + sed -e "/package_data/d" -e "/data_files/d" -i setup.py || die + use client && PATCHES= cmake_src_prepare # do not apply patches again in cmake_src_prepare +} + +src_configure() { + distutils-r1_src_configure + if use client; then + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON + -DTENSILE_USE_MSGPACK=ON + -DTENSILE_USE_LLVM=ON + -DTensile_LIBRARY_FORMAT=msgpack + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + ) + CXX=hipcc cmake_src_configure + fi +} + +src_compile() { + distutils-r1_src_compile + use client && cmake_src_compile +} + +python_install() { + distutils-r1_python_install + + python_moduleinto Tensile + pushd Tensile || die + python_domodule Components + python_newexe Utilities/merge.py ${PN}-merge +} + +src_install() { + distutils-r1_src_install + + pushd ${PN} || die + insinto /usr/share/${PN} + doins -r Configs Perf Source CustomKernels + insinto /usr/$(get_libdir)/cmake/${PN} + doins cmake/*.cmake + + if use client; then + pushd "${BUILD_DIR}" || die + dobin client/tensile_client + fi +} + +# Test suite fails to start without this +python_test() { + export ROCM_PATH="${EPREFIX}/usr" + epytest +} diff --git a/dev-util/Tensile/files/Tensile-6.0.2-expand-isa-compatibility.patch b/dev-util/Tensile/files/Tensile-6.0.2-expand-isa-compatibility.patch new file mode 100644 index 000000000000..7a72d833bba0 --- /dev/null +++ b/dev-util/Tensile/files/Tensile-6.0.2-expand-isa-compatibility.patch @@ -0,0 +1,34 @@ +diff --git a/Tensile/Source/lib/source/hip/HipHardware.cpp b/Tensile/Source/lib/source/hip/HipHardware.cpp +index ffa4f0f..f894366 100644 +--- a/Tensile/Source/lib/source/hip/HipHardware.cpp ++++ b/Tensile/Source/lib/source/hip/HipHardware.cpp +@@ -24,6 +24,8 @@ + * + *******************************************************************************/ + ++#include <cstring> ++ + #include <Tensile/AMDGPU.hpp> + #include <Tensile/hip/HipHardware.hpp> + #include <Tensile/hip/HipUtils.hpp> +@@ -55,6 +57,20 @@ namespace Tensile + { + hipDeviceProp_t prop; + HIP_CHECK_EXC(hipGetDeviceProperties(&prop, deviceId)); ++ // coerce to compatible arch ++ int gcnArch = strncmp(prop.gcnArchName, "gfx", 3) == 0 ? std::stoi(prop.gcnArchName + 3) : 0; ++ switch(gcnArch) ++ { ++ case 902: case 909: case 912: ++ std::strcpy(prop.gcnArchName, "gfx900"); ++ break; ++ case 1013: ++ std::strcpy(prop.gcnArchName, "gfx1010"); ++ break; ++ case 1031: case 1032: case 1033: case 1034: case 1035: case 1036: ++ std::strcpy(prop.gcnArchName, "gfx1030"); ++ break; ++ } + #if HIP_VERSION >= 50220730 + int hip_version; + HIP_CHECK_EXC(hipRuntimeGetVersion(&hip_version)); diff --git a/dev-util/Tensile/files/Tensile-6.1.1-fix-msgpack-dependency.patch b/dev-util/Tensile/files/Tensile-6.1.1-fix-msgpack-dependency.patch new file mode 100644 index 000000000000..7a3b1884c074 --- /dev/null +++ b/dev-util/Tensile/files/Tensile-6.1.1-fix-msgpack-dependency.patch @@ -0,0 +1,31 @@ +Gentoo uses "msgpack-cxx" as library name and adds important +MSGPACK_NO_BOOST compile definition when msgpack-cxx us installed with USE=-boost +--- a/Tensile/Source/lib/CMakeLists.txt ++++ b/Tensile/Source/lib/CMakeLists.txt +@@ -98,24 +98,9 @@ if(TENSILE_USE_LLVM OR TENSILE_USE_MSGPACK) + endif() + + if(TENSILE_USE_MSGPACK) +- find_package(msgpack REQUIRED NAMES msgpack msgpack-cxx msgpack-c) ++ find_package(msgpack-cxx REQUIRED) + target_compile_definitions(TensileHost PUBLIC -DTENSILE_MSGPACK=1) +- +- if(TARGET msgpackc-cxx) +- get_target_property(msgpack_inc msgpackc-cxx INTERFACE_INCLUDE_DIRECTORIES) +- elseif(TARGET msgpackc) +- get_target_property(msgpack_inc msgpackc INTERFACE_INCLUDE_DIRECTORIES) +- elseif(TARGET msgpack-cxx) +- get_target_property(msgpack_inc msgpack-cxx INTERFACE_INCLUDE_DIRECTORIES) +- endif() +- +- if(DEFINED msgpack_inc) +- # include C++ headers manually +- # External header includes included as system files +- target_include_directories(TensileHost +- SYSTEM PRIVATE $<BUILD_INTERFACE:${msgpack_inc}> +- ) +- endif() ++ target_link_libraries(TensileHost PRIVATE msgpack-cxx) + endif() + + if(TENSILE_USE_LLVM) diff --git a/dev-util/gcovr/Manifest b/dev-util/gcovr/Manifest index 60a7cddd5a2d..68e37543a4c9 100644 --- a/dev-util/gcovr/Manifest +++ b/dev-util/gcovr/Manifest @@ -1,5 +1,6 @@ DIST gcovr-6.0.tar.gz 1054940 BLAKE2B 1947950d06926cf48d456e6bc389db46cfe4c7ed0395da1ebdb75aa1ea4b85f3cea536d77a4ddca5621885daaaf54462160592a5a384247f12ad3ed5c299b0b7 SHA512 3b4d30417b5000d2d28bc156dc9db43ba62cf8756aa5a9619391457d0042dc8eaf1743c5defdaabffb6b423bf2fcf8172b3e6c8795419758abc1acf4853de4bb DIST gcovr-7.2.gh.tar.gz 2800014 BLAKE2B e334688f129868d9affe0fa5c5280eb7dd4c57825bec31f32d529c579f622e7c60985f8aad506bd714ebe00c47fd61b673ad2352e51a0fd8175777bb6a1c93e7 SHA512 fc4acbfeef48866c5c8884681375069c7308a86aaefe5b36e631240a96dcdc7c56b3e8d0c221f66dbbe29302b549c5c9b9c5e01bbf4103165b085ae33c369f55 EBUILD gcovr-6.0.ebuild 975 BLAKE2B 1d7c2fedfdbfa0757f009cf588e68068e9400693d19327af86af41097d490b8e06659782673f8cc2bf6c96d10bd3b497dfbfccc5327a5a40152d142ed8bd3568 SHA512 1cb95bdad3671f38aa06aa3a1a40fdd3542fb01f149df1c9da7bd52a1163f963e6ba05f3b84d91fe50d172f571629e8947819d954e9913ed74aab23001a83630 +EBUILD gcovr-7.2-r1.ebuild 7884 BLAKE2B f62e7ddc59cf5cd3a51c802705b04ee6f07eca5887123a7b6f02a9c205198e609e9e00f7f5f8cfa5c3f2d9d22bddcdf774c8b205e376e006d2d89b79f8e4bc05 SHA512 89c21679b5e5b4b5edc6c41064ed05d944e6941f860a4e0528a739378e808238e68cf1314f5add46e7ed67fe25334396d1ec8fad9d7ba9362c7549343973caad EBUILD gcovr-7.2.ebuild 7848 BLAKE2B 46b6dbea5b05553d9dcc38510583eff704f19ef9a04620fe2c9577ebaa40e23c7fc2c95959163c5fb0413048766dba5b192cc7a5ca057a2d81284ce05b306a3f SHA512 4c806ef11538031293653c481ad431b9cdfeace4347a8d57cfde4b2fb09282ad51b8482c3344a8f8a1a536689ba7bd223f204454ce4500bab3bafcb26bd57f6f MISC metadata.xml 326 BLAKE2B 0ff392fe3a804fc6d8ea83de983357676a8155dee2fbb5204baf0ead2800210ea30a0171398c71dc60b1d9423a6fd65c0a9032d4511caa459c9b4d4f70ee4132 SHA512 5f5a49bfbbd3d3b77314f7de0c5981a3e700b42733d1c4f6868a7c25d12bb6227ebd254925cbbb6a5d73bf8a0b9f99115d396009d55797e39b53dc43a1a79107 diff --git a/dev-util/gcovr/gcovr-7.2-r1.ebuild b/dev-util/gcovr/gcovr-7.2-r1.ebuild new file mode 100644 index 000000000000..1d820d592f3c --- /dev/null +++ b/dev-util/gcovr/gcovr-7.2-r1.ebuild @@ -0,0 +1,260 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) + +inherit toolchain-funcs distutils-r1 + +DESCRIPTION="A Python script for summarizing gcov data" +HOMEPAGE="https://github.com/gcovr/gcovr" +SRC_URI="https://github.com/gcovr/gcovr/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~loong ~x86" + +RDEPEND=" + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/colorlog[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + dev-python/tomli[${PYTHON_USEDEP}] + ' 3.10) +" +BDEPEND=" + test? ( + dev-python/pytest-timeout[${PYTHON_USEDEP}] + dev-python/yaxmldiff[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +python_test() { + local -x PATH="${TEST_DIR}/scripts:${PATH}" \ + PYTHONPATH="${TEST_DIR}/lib" + + # these tests assume gcc-8, and fail with newer gcc versions + local -a test_build_deselect=( + "add_coverages-coveralls" + "add_coverages-html" + "add_coverages-html" + "bad++char-coveralls" + "bad++char-html" + "calls-html" + "cmake_oos-coveralls" + "cmake_oos-html" + "cmake_oos_ninja-coveralls" + "cmake_oos_ninja-html" + "coexisting_object_directories-from_build_dir-cobertura" + "coexisting_object_directories-from_build_dir-html" + "coexisting_object_directories-from_build_dir-without_object_dir-cobertura" + "coexisting_object_directories-from_build_dir-without_object_dir-html" + "coexisting_object_directories-from_build_dir-without_object_dir-sonarqube" + "coexisting_object_directories-from_build_dir-without_object_dir-txt" + "coexisting_object_directories-from_build_dir-without_search_dir-cobertura" + "coexisting_object_directories-from_build_dir-without_search_dir-html" + "coexisting_object_directories-from_build_dir-without_search_dir-sonarqube" + "coexisting_object_directories-from_build_dir-without_search_dir-txt" + "coexisting_object_directories-from_root_dir-cobertura" + "coexisting_object_directories-from_root_dir-html" + "coexisting_object_directories-from_root_dir-without_object_dir-cobertura" + "coexisting_object_directories-from_root_dir-without_object_dir-html" + "coexisting_object_directories-from_root_dir-without_object_dir-sonarqube" + "coexisting_object_directories-from_root_dir-without_object_dir-txt" + "coexisting_object_directories-from_root_dir-without_search_dir-cobertura" + "coexisting_object_directories-from_root_dir-without_search_dir-html" + "coexisting_object_directories-from_root_dir-without_search_dir-sonarqube" + "coexisting_object_directories-from_root_dir-without_search_dir-txt" + "config-output-html" + "config-toml-html" + "config-toml-txt" + "decisions-html" + "decisions-json" + "decisions-neg-delta-html" + "different-function-lines-separate-coveralls" + "different-function-lines-separate-html" + "different-function-lines-use-0-coveralls" + "different-function-lines-use-0-html" + "different-function-lines-use-max-coveralls" + "different-function-lines-use-max-html" + "different-function-lines-use-min-coveralls" + "different-function-lines-use-min-html" + "dot-coveralls" + "dot-html" + "excl-branch-coveralls" + "excl-branch-html" + "excl-line-branch-coveralls" + "excl-line-branch-html" + "excl-line-coveralls" + "excl-line-custom-coveralls" + "excl-line-custom-html" + "excl-line-html" + "exclude-directories-relative-coveralls" + "exclude-directories-relative-html" + "exclude-lines-by-pattern-coveralls" + "exclude-lines-by-pattern-html" + "exclude-relative-coveralls" + "exclude-relative-from-unfiltered-tracefile-html" + "exclude-relative-html" + "exclude-throw-branches-cobertura" + "exclude-throw-branches-coveralls" + "exclude-throw-branches-html" + "exclude-throw-branches-jacoco" + "exclude-throw-branches-json" + "exclude-throw-branches-lcov" + "exclude-throw-branches-sonarqube" + "exclude-throw-branches-txt" + "filter-absolute-coveralls" + "filter-absolute-from-unfiltered-tracefile-html" + "filter-absolute-html" + "filter-relative-coveralls" + "filter-relative-from-unfiltered-tracefile-html" + "filter-relative-html" + "filter-relative-lib-coveralls" + "filter-relative-lib-from-unfiltered-tracefile-html" + "filter-relative-lib-html" + "html-css-html" + "html-default-html" + "html-encoding-cp1252-html" + "html-encoding-iso-8859-15-html" + "html-high-100-html" + "html-high-75-html" + "html-line-branch-html" + "html-medium-100-high-100-html" + "html-medium-50-html" + "html-nested-filter-html" + "html-nested-nonsort-html" + "html-nested-sort-casefold-html" + "html-nested-sort-percentage-html" + "html-nested-sort-uncovered-html" + "html-source-encoding-cp1252-html" + "html-source-encoding-utf8-html" + "html-tab-size-2-html" + "html-template-dir-html" + "html-themes-github-html" + "html-themes-html" + "html-title-html" + "linked-coveralls" + "linked-html" + "nested-coveralls" + "nested-html" + "nested2-coveralls" + "nested2-coveralls" + "nested2-html" + "nested2-html" + "nested2-use-existing-coveralls" + "nested2-use-existing-html" + "nested3-coveralls" + "no-markers-html" + "nobranch-coveralls" + "nobranch-html" + "noncode-coveralls" + "noncode-html" + "oos-coveralls" + "oos-html" + "oos2-coveralls" + "oos2-html" + "rounding-html" + "shadow-coveralls" + "shadow-html" + "shared_lib-coveralls" + "shared_lib-html" + "simple1-coveralls" + "simple1-dir-coveralls" + "simple1-dir-html" + "simple1-html" + "simple1-stdout-coveralls" + "simple1-stdout-html" + "sort-percentage-html" + "sort-uncovered-html" + "source_from_pipe-cobertura" + "source_from_pipe-coveralls" + "source_from_pipe-html" + "source_from_pipe-lcov" + "subfolder-includes-html" + "threaded-coveralls" + "threaded-html" + "update-data-coveralls" + "update-data-html" + "use-existing-coveralls" + "use-existing-html" + "wspace-coveralls" + "wspace-html" + ) + + local cc cc_ver + cc="$(tc-get-compiler-type)" + case "${cc}" in + gcc) + cc_ver="$(gcc-major-version)" + + # a bunch of tests are broken on gcc-14 + # https://bugs.gentoo.org/930680 + if [[ $(gcc-major-version) -ge 14 ]]; then + test_build_deselect+=( + "calls-json" + "decisions-neg-delta-json" + "different-function-lines-separate-lcov" + "different-function-lines-use-0-lcov" + "different-function-lines-use-max-lcov" + "different-function-lines-use-min-lcov" + "dot-lcov" + "excl-branch-lcov" + "excl-line-json" + "excl-line-lcov" + "excl-line-branch-lcov" + "excl-line-custom-lcov" + "exclude-directories-relative-lcov" + "exclude-lines-by-pattern-lcov" + "exclude-relative-lcov" + "exclude-relative-from-unfiltered-tracefile-lcov" + "filter-absolute-lcov" + "filter-absolute-from-unfiltered-tracefile-lcov" + "filter-relative-lcov" + "filter-relative-from-unfiltered-tracefile-lcov" + "filter-relative-lib-lcov" + "filter-relative-lib-from-unfiltered-tracefile-lcov" + "linked-lcov" + "nested-lcov" + "nested2-lcov" + "nested3-lcov" + "no-markers-json" + "no-markers-lcov" + "noncode-json" + "noncode-lcov" + "oos-lcov" + "oos2-lcov" + "shadow-json" + "simple1-txt" + "simple1-json" + "simple1-dir-json" + "simple1-stdout-json" + "simple1-stdout-lcov" + "threaded-lcov" + "update-data-lcov" + "wspace-lcov" + ) + fi + ;; + clang) cc_ver="$(clang-major-version)";; + # placeholder since tests need CC_REFERENCE to be string-number + *) cc_ver=1;; + esac + + readarray -t EPYTEST_DESELECT < <(printf 'gcovr/tests/test_gcovr.py::test_build[%s]\n' "${test_build_deselect[@]}") + + EPYTEST_DESELECT+=( + # tests that don't work in the ebuild environment + gcovr/tests/test_args.py::test_html_template_dir + gcovr/tests/test_args.py::test_multiple_output_formats_to_stdout + gcovr/tests/test_args.py::test_multiple_output_formats_to_stdout_1 + ) + local -x CC_REFERENCE="${cc}-${cc_ver}" + + epytest gcovr +} diff --git a/dev-util/gitlab-runner/Manifest b/dev-util/gitlab-runner/Manifest index 5d839516fe75..eb110361e8b3 100644 --- a/dev-util/gitlab-runner/Manifest +++ b/dev-util/gitlab-runner/Manifest @@ -2,13 +2,13 @@ AUX gitlab-runner.confd 688 BLAKE2B 1e99cdca8949a1a085e126c9aa2f23cf15d081087d02 AUX gitlab-runner.initd 1174 BLAKE2B 53b897abb3bc358839843faf56b52d99412c2a08e2e69e1b8258bab907a0da10dedeafd95e6c4e505fd7e8e4d2344dc07b1e693a130fe0d6a3730bf619ee2e75 SHA512 eae2668c5a98a9e111573a2ea193266252e46e073fafd2c101d3a93e65cb9705f78ceab173ca4d3e1c806443345e7f66b7b97c8b644188cf9f86dc4c087d401f AUX gitlab-runner.service 419 BLAKE2B f1a9217eb97d03036eac67569ec6ce6ed91dc2182b20357cf8d17ee0eee01b8d094854b1c76942e0515c2a5923f4d3a1ed044c60b89d8a29c354955f9f666160 SHA512 10cbe1cc0a0b7bb9decde5780bc20caf73892759532df5fc42a7c3b55e141b26957a2986656ac1eb79ce15fd95ee01a184893c22d0dd1ce9117932d0e55ae1b4 AUX gitlab-runner.tmpfile 54 BLAKE2B 4b2849b9c72998409efce207a336dce42d6e9104e72e0071266e03509841bbb5f39ad8e560beb696eee780bfe82efdec5b877120b5606c524d5cd002095e52c4 SHA512 2b5cccd83c8113a8c58011ced9ff5720a5aeaedb8f819c2a71c8fff3b1683ad87b54fa3da67b7e5f91ab35659d2adf5cf792d93ff293eee39924fbb5b9db2d4b -DIST gitlab-runner-16.10.0-deps.tar.xz 87356404 BLAKE2B 87616f6544efcfddf854ccf8892ab955f44d11fa6f7ec3a5d0c2d32f165adf985011997e701b325e7eedfb4532547dbb94e08df3118d591550d511c09a9cc957 SHA512 6f800f4f965767898a21c9e4c7b0fc5f07ae089910f98ae96189b2501434f3de8a51ac6326e4df2234f3524bce4b15e4b05b183473988e717d2067d022e6c67f -DIST gitlab-runner-16.10.0.tar.bz2 1373754 BLAKE2B ca0d39a4c04cc37afc48d9346266d075da6f4c3f62891d871a6d21e357de62067ea34e1dbffa34a410e2fb0656742eb46bcd3e555a56a20d6429b2c590e96fda SHA512 445cc39bd4d4b5ecf092fb4850b4224c0312b5b6a5aafdfb44ead5c590cf6ff38d759f765b1a97bd3beae73b5dd733daba53a33d3cb5d1f1346af28d39509b7c DIST gitlab-runner-16.11.1-deps.tar.xz 86847148 BLAKE2B 68520b6ae8a0250ffe134e1bd19360e142c51ec012df026212f80f8c4f23e8bce633451606502cf0af6762489564ff71c4fab5aafc04513695f161d929fa3ec2 SHA512 695f23266ebd82ed6bcf22da6eb41fd69404d929dbc55cc0e2d1f8e01f476d5343d88b9f07198447af2030b48db085ae382e7f627eb685e1c19f99ddaf55b483 DIST gitlab-runner-16.11.1.tar.bz2 1377748 BLAKE2B c2dd939c30f1eccedaaa8d941abceea258a445d4b6c4518231cdc7e1ebc34d61912c5f1fd9e338d482a6ced547e8174dde6938b746334b215c50ee83ba1b8781 SHA512 80ac885a6d04f97c85222e87b4a3aabfa949caa060eae538d873c6b5172cb3de8234f36a9db3daaa5df132de1ac18d6f5c6a5a267cd4448dd87e98bdd393cf25 DIST gitlab-runner-17.0.0-deps.tar.xz 86841028 BLAKE2B c7952e6028869264ed6d728043074ef5318230db18ea06a5ab740262693f22bd3111c5ad99ca2da2ca57079e3389b5a87a9994635f98fe6670f87df97e158956 SHA512 1c705bacc8eb896b23dee06ed4258c22cb0ba96073725761f2e138d4687efab4a1866e76203c1f7694c8d71995e18ad96d7da333fe88c24aa3454ac5caf4dc63 DIST gitlab-runner-17.0.0.tar.bz2 1370211 BLAKE2B 756972b3d28d0a90ab517ecd014ccba42255dfaeb09b5e755f7395c064705273193d9a4efcbf2f1dfa8d54a9c1ed2192dcd5d3258c70aa514056df725f37322f SHA512 2cc67aa8ca43583bc60ca4d752423760b612f1a741203b0a7f0cd2fc77c292bd3a4c31f252c353a28d112d753ca920c1e8f9a401e79ac90c4eeeaf1d588ee09c -EBUILD gitlab-runner-16.10.0.ebuild 1679 BLAKE2B 79973607477559ab1bf0f1e621f0d2ecc4f903e4e1ac257e58976d7674c2e0d1ba315a29414ae1b8e0d3c2ce0bdcc8cf44c783f0ff003366db754bee23d5ad0c SHA512 af71349167f6d59f130eb66ad3db71ba8447e622e1a6fbb863e33adeb74a6364b3e6a53c2f1889d397ff75bf6adbf77d4bb7e4ca88784abd9bbe9240bb0ce8de +DIST gitlab-runner-17.1.0-deps.tar.xz 86656984 BLAKE2B 7766a3764d8ba17e3943f16a63e2af9705a23080bed23f30c813f07c4ce71057665682d6221790ff767848fefe258ffb796866d1a4e2a693faea1edd55945a30 SHA512 d2b8df673f8ab6a0380bbf3604d71fd963894f5bf55ba91c8755f827654b8b1fd394401c2654a78684dab022ac6f356befbfd862282a1a503422553ce8bd76fc +DIST gitlab-runner-17.1.0.tar.bz2 1372603 BLAKE2B 1600fbc4ec5eb2b7190424f9f2877e1938bad33b683fefd750e541f72e6d9ee4bf05c1c65de030c9022211333bbfce768bbd96ab750c46153c491d301ec63c6f SHA512 1904bac24b5f9b7bdbd18c7a7c32e875bbfb1017c34441e83a9970624a48c8bbeb3a59f926303ae3a2a28586107f29a5849bee0f17acb8dfdb6e2f7ae904c3b9 EBUILD gitlab-runner-16.11.1.ebuild 1679 BLAKE2B d9fbff218a9af7402f7d83a4f0275acb2d8fc5c3fce8828aaa776ed7fda8fec66fefa5fa613a6e4dccb660f32e1fa25797c8ad69ce3b5308dcff2bd705de9696 SHA512 d4c2e722e50db0c1002cf5e63ff7a02e93cfb57a1789f8f5ed7a9cd11f414ef7e844b7ada9c3bdcac029b330d6dc9165135dfe3bb624b8b477c60bdea98f050b EBUILD gitlab-runner-17.0.0.ebuild 1679 BLAKE2B 9cd429724c397140ee34f06890920489b52efe36bbfbe1eb3b19047ba7497f203a5e29ba4b1bb18d2b48884ec1d1f73c7448aee101d826015aff61b2e8b6db28 SHA512 7255219f6c96eac59ceb45c3546ac2c5f4e538ff1180046c732574f5319dd535037d82a6eb46f7209a294e8a1e90bcd053d4563b1ba7cc4ae6e48c4ac8533bf1 +EBUILD gitlab-runner-17.1.0.ebuild 1679 BLAKE2B 74da717c9d1578e3a4626c88072e490d48223f97b7e1305d758d1f45dd32615caed6f68b5651297ffffe2452aab2fc047e4810a6c0cb8226f36030d224133c33 SHA512 45a7a33c9e15839ea06153f87313110c77550e02caba751b81ec23f2b776eec3f50a4c0fdf76579f54f512ed649551473e72917c823a92b93565e4b959d0515b MISC metadata.xml 338 BLAKE2B dfdcaaee18d3e5492674d3b4055002201342fa4d5b713f88240753002de2bde6244469fe42fe514cb82544d15deacd235cd031dcf71d661a24b26f422c67c392 SHA512 b12a8270df4f07c6b4359150a3b7341d3913a93598153824ec758384758e69667a89de20066735ccc24aea7af07b5c1bdd444fca3193be5402bce5154f90ec79 diff --git a/dev-util/gitlab-runner/gitlab-runner-16.10.0.ebuild b/dev-util/gitlab-runner/gitlab-runner-17.1.0.ebuild index cf259193f257..e7ae3dd55714 100644 --- a/dev-util/gitlab-runner/gitlab-runner-16.10.0.ebuild +++ b/dev-util/gitlab-runner/gitlab-runner-17.1.0.ebuild @@ -5,7 +5,7 @@ EAPI=8 inherit go-module systemd tmpfiles # make sure this gets updated for every bump -GIT_COMMIT=81ab07f6 +GIT_COMMIT=fe451d5a DESCRIPTION="The official GitLab Runner, written in Go" HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-runner" diff --git a/dev-util/gource/Manifest b/dev-util/gource/Manifest index fb1377efe577..7c9d50e61a6c 100644 --- a/dev-util/gource/Manifest +++ b/dev-util/gource/Manifest @@ -1,6 +1,8 @@ AUX gource-0.53-boost-1.85.patch 1033 BLAKE2B 4dfcd1fcdf9e7a5d092136742c6fbafbe7014fda377a5a4a1c10ca2d59829aff59a4d7dd08f896a3614cb285d6df89527ec2b22fad59aad99ea4b87928c81c02 SHA512 cebeab8de0799765f92368976bf6c3ba01bb5000d73b95a69f526020dd17ab03683d845509bcdb76c95a85472a0ab8cb8445fea04a7acbc52352330ef69da521 DIST gource-0.53.tar.gz 900932 BLAKE2B 7f2822b11b5eaeb5345ade1326702109dff120d3ef8c523a2425a84b54d357a29cfe23a9c4a253b287d570e74943cb67bb80753c6c698f9f60739735cb41769b SHA512 e4190eb581d9998808d1bb4f18ba5a3ae22bacf643b9a150c7d1607e97fca2eab720592aefdcc6a47f92adb4a8df17db48bb941a67ee3d23a10f300754f473be DIST gource-0.54.tar.gz 900831 BLAKE2B be0fafa35457532b3cdc5d007ae5935189b60efc415ecd0979b25e4437d39570db90c4ac1883cc6baf7e0d25eeb9c98c2f8b6ec855ef63a874d223af09caa5d9 SHA512 a9fd2ff7c51931a543d4ab6dc85dd4b2c187ecca1be630006bb60ac2507180ccf40561e37f50493e052c839d9f5f896ae8f113fb65844c2fa9bde33fcd6b53e8 +DIST gource-0.55.tar.gz 900907 BLAKE2B c2836045e3c556d94ea433d52b6386de08290ad1f6287ab7dbfa6b632cbcd2f557d0365542de108925eeec237086883491ac90ee3439740969c16fda9894b197 SHA512 6df687441fc04e9bdfcf3620ed6b8a8fc1ac5774d21f51afdb0d518339ea1518914db77c90fb457ada899653c491a3b45c340665c3efa28bddeac65eeb334488 EBUILD gource-0.53.ebuild 1272 BLAKE2B 8c1bd0bcb16ce9765d6d3a022808cc710fd178060932ba0bbcb065752ac2c8e274309ff6f5a73ef6683cd78ab9b5b794bb24d05fff9e8009b7d3b5f1f5ecc6a0 SHA512 df36fe84722ad7716efa5c1c8392004da4890a16b378c572d51601b62e2987dc644110bbb2615a578fb5b1df77c929ac26e1967c5bf2dc826048f728f026aaed EBUILD gource-0.54.ebuild 1266 BLAKE2B 6d55a9356ebf6deaca999328d399f60cc3abacaeb4bee9f48266a68ce89966f94cb79d233a0a3f24626c19bed65550d3dca30d83003b70701c001a76e6083329 SHA512 adb5410ca1cb09204bcb75c7ddf048e63df1c92930c67a49e7cf0c3c69fa013958a66358114096b742e883ca8efbe90df35bdf2839105f8a3c58e3ed6b9f6152 +EBUILD gource-0.55.ebuild 1173 BLAKE2B dec5f414ac1801d54e110c04737bb4980097bbbadfd485b5b42a68ff8b4fd4ed4f3d7d1a19a757d1d78619c78175d2024dfed24d7a9b287f338a9ee7d687d4bb SHA512 0d34dcc058889bf23dac097fc60051d32c00bdb8c501b8afb20282231466526c56c55d921d0f644195ffa5ada1fd1b02df18785ea6c56a0c583ec0b39ebaf5ce MISC metadata.xml 300 BLAKE2B 23f7c7b46ea61159b545277ae554947169d30f4065c6c405ef99ae5e78481e0af297ef6cc4dcc1b196d7cef9f9d9a7709c240aa642f89243fe14a703a859b8ed SHA512 298f789fe6e827ce647c45ea23d5cde8df085a31f378997d37d081dae9b768c6fe79fa68dad0a4c4110d5b95f59a834d35e8757f8cef5b9806003acd38ae244f diff --git a/dev-util/gource/gource-0.55.ebuild b/dev-util/gource/gource-0.55.ebuild new file mode 100644 index 000000000000..2f6e8a06c68a --- /dev/null +++ b/dev-util/gource/gource-0.55.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic + +DESCRIPTION="A software version control visualization tool" +HOMEPAGE="https://gource.io/" +SRC_URI="https://github.com/acaudwell/Gource/releases/download/${P}/${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +COMMON_DEPEND=" + dev-libs/boost:= + >=media-libs/glew-1.5:0= + >=media-libs/libpng-1.2:0= + media-libs/libsdl2[video,opengl,X] + media-libs/sdl2-image[jpeg,png] + dev-libs/libpcre2:= + dev-libs/tinyxml + media-libs/libglvnd[X] + media-libs/freetype:2 + virtual/glu:0 +" +RDEPEND="${COMMON_DEPEND} + media-fonts/freefont +" +DEPEND="${COMMON_DEPEND} + >=media-libs/glm-0.9.3 +" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + sed -e "/data\/gource.1/s/^/#/" -i Makefile.am || die + eautoreconf +} + +src_configure() { + # fix bug #386525 + # this enables gource to be compiled against dev-libs/tinyxml[stl] + if has_version dev-libs/tinyxml[stl]; then + append-cppflags -DTIXML_USE_STL; + fi + + econf \ + --enable-ttf-font-dir=/usr/share/fonts/freefont/ \ + --with-tinyxml +} + +src_install() { + default + doman data/gource.1 +} diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest index d2bd67b92f8b..9579ca8ea457 100644 --- a/dev-util/hip/Manifest +++ b/dev-util/hip/Manifest @@ -1,14 +1,10 @@ -AUX 0001-SWDEV-316128-HIP-surface-API-support.patch 1156 BLAKE2B 52ff9a2389533ac213055ff8c1d4359cbd490f64699233a6c97dbb54ea8216d94039b016b9dcdde7a304662b9ca5c444ac889a6491e847b0a701e0b0cc0e4b59 SHA512 0c210ac60929a951ce1210b1f76e2e6966cc411834a350e6d01d1eb20cb862056cec881a00978cdbe5bfc61e53128c1cd09c6138cca9469213a6bbf425b8686d -AUX 0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch 2734 BLAKE2B 5580ae24e854a42837979a1f6e688eb7edcfeee554577f41611941aa69d5a0bf3f1eb1916c4c7b2ba0389fc16efc31b229a9b21dbec3bfcf0cccad20241191a7 SHA512 156f650559fdeb625c15a8b94320f0b422b04b883f84a5e74ef03293420292be25c118df67bba1ae11fca6a1ac7429b0254aa32b963f7e09a7d8d923589009fd -AUX 0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch 7304 BLAKE2B 3fca9d44f706250438f1c3f5d44142e1fa3040336eb9ab8b9e7fc54b9473e11957962a9a93cdb3b6980228fffe1a3fd5dab3f8c972340a83723858c12790c1f8 SHA512 7e54d22b0a0924c79d0b31764586891401d1a39f37380d3809e23a60075baacc55468930c30fa5a8ce64083b274701dbc190f67244822191873ae4f831a7fc33 -AUX 0002-SWDEV-355608-Remove-clang-include-path-2996.patch 1866 BLAKE2B 89e377104b0bc383f69c10f894ff28cb8282eeaf042fcb27b03a64b78959c147ef6cd4291aef47a25b616ea2b801363d7a382df4d924ba94fcea7e9ffa1b26f6 SHA512 7f73d7a66adc959ef4dd0dc3540b6db472a3650926f315f4c79761a45e619432107898dc58cb15958be4b36823029ccf91e599760a23fd886429789de586db3b -AUX 0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch 8063 BLAKE2B c0b7b83682c13bb21e6a152b8c4c2b003024fd2dfc4f5f59e8b91b3d933bbfa888549c1a4471a29a225400f3d900d47023c3394111d41a3ecf52a48647db1694 SHA512 972a249daf692ce847884821a1205608d9ee2941793c474cb36f435eff2ad52dc7cb4f1a3a48a4037df3d62a6e47db84c86014933c94b4bb9bf7b7b12f31cce1 AUX hip-4.2.0-cancel-hcc-header-removal.patch 820 BLAKE2B 544f93864fafe38a0ac2456f6301f8076ea24061bd4fe9a5501a366cca6d46edbb50eaac6c71acb3534579cdd9fa5518a687ac7e6d265926db53f0820fdec0f2 SHA512 3e37b761148cc31f78d6beb6bdff4b472fe4171a496b8f76ecbe82900f1483df690f846e0473ae700127482bcc3787af16bcd6217506e1e9dd1ad019408725a5 AUX hip-4.2.0-config-cmake-in.patch 588 BLAKE2B 98081d4caa593756c966b8eff9e3a306ba4d9799abaaccb9bdab40db3e32dd769b07b3c428a22787231e8819e62cd50a33f549f2d1de32f9528036f1abf400cb SHA512 803aae515ee8e2694e5ba1cf6b5d66c98a9e0abf422479c7f599e8bfa38b027062a40e3e9806fa0057fa89a00d019c93d22f1c1ad78f68f1ac3f9bea5ebd93be AUX hip-5.0.1-DisableTest.patch 1689 BLAKE2B dd25393370a594abd3cb6fe8abab6481c2c544edb3f84c7b6481501fd5c2cd33970245cb38d148c5218915a67a8c1d24fde14a5a5c47ed809c613ec78b6d25c7 SHA512 6932af7662b067766b6566f858dba9606818757070b642778d559b83052097ee2ecedb1ae0184ab000c7b068b5413201bb5521e0aa3bf090df369139f292306e AUX hip-5.0.1-hip_vector_types.patch 312 BLAKE2B fb5a61a73e741e2456c031adc9c2e96fdccb5b88a3d99e6b4d31a9b53897f6ccbb41c9535296b55512055f0581a394289bae31036d3b7c07a8081e88708b9a19 SHA512 2ab41b46baf0f8adcb82f55b7ebfcfa3097159b7317d2609b490c0406ba47728c37531c03b0a4e474d760776cf7b614e32ccab45c769ce2fb8e54fcdffa61f5a AUX hip-5.0.2-correct-ldflag.patch 1117 BLAKE2B 8d11bc278660fb7e14585822a462de96ebca78bf5cec026c8097fa2b9eef87f3d4fd21641d0cfe77f217067bc161b6ece94eb55de71611f106243c8bd41b157c SHA512 1d4b46f941f5b3115705a416822b2a7c034ca6611a7706bc126902e5130239dcf84624f35624f9c7b952314c1d76fcba3f17e40ceb2574b4b37bddada073f808 AUX hip-5.0.2-set-build-id.patch 741 BLAKE2B 9d4668ab770fd1ebc93a19a3ddc2916e8feb69a95e54ceb5955c4a162733b8899d43f906c86b0b994add22ab46969ff18aad03035e6285a6492bc9c1405bce38 SHA512 714b2f8e791f0e30a7af567e430e2bba38473725e0d96e42de0c97a2ba939fd83b2f233eebf03cb8a6a82d10c46cfa5ea869af97f35c02da38924250a19e660a +AUX hip-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch 1156 BLAKE2B 52ff9a2389533ac213055ff8c1d4359cbd490f64699233a6c97dbb54ea8216d94039b016b9dcdde7a304662b9ca5c444ac889a6491e847b0a701e0b0cc0e4b59 SHA512 0c210ac60929a951ce1210b1f76e2e6966cc411834a350e6d01d1eb20cb862056cec881a00978cdbe5bfc61e53128c1cd09c6138cca9469213a6bbf425b8686d AUX hip-5.1.3-clang-include-path.patch 564 BLAKE2B 8cdfbd9eba9c5e642a8e85aa269b0e369ef11a90c30771e0b1ef21d1ff1bfbb6d9f27cc03693b22b39347d939a11994ffbe4dd2f9edc5583811fff273c304307 SHA512 e6d8dda10155a6d269435f37bf8d4fa25b503861450d474cc01c21ea582857caa9ed26ca04e513b12708ae60348cd32296aaf39c805ee3f925e7d6590cae658c AUX hip-5.1.3-correct-sample-install-location.patch 537 BLAKE2B 924010e903cf7a27591930f5533bc41591ea7821b1f5f73bbbe5d5659a78a712699bb3be94ec5e473a0a5e0d11140850f7bb8e00f7775688adaa79deb7f2597f SHA512 91d89d403eef7ba460e648f5415f654601147920a81f650c40928733d5dbb8a99ebc00530052bf22bec67d9d325bde867c08e7d24e1e05b734b9e31a909030f7 AUX hip-5.1.3-fix-hip_prof_gen.patch 1480 BLAKE2B caa3fa9840a8add5a25daaeb6f26eed9da3fe55686f6343e31b836a0b2e12999cd45d9220469cde036c7914f672b6cc46695fce1bfe4a8d6d35c836cdc14e413 SHA512 a588238cb12dc973acc6513bead68439b10b49214d5dceb81a0498510f79269b79897a02dd9e2ee1ef396a762d49310fd0a406d7f8b6c0e85faeba0f69b1de23 @@ -16,6 +12,10 @@ AUX hip-5.1.3-fno-stack-protector.patch 788 BLAKE2B 8f9d01ceeec2098df4d49e116c14 AUX hip-5.1.3-llvm-15-noinline-keyword.patch 829 BLAKE2B 39b859e90acacd2eccdd60b690e1d882b63cfa66ff1b12effe447b18de72ffd61dd32983552f9ae39b384c3bbfbbcfd59ff2bb47943c1340bf6c1df5cb7d4075 SHA512 1933e883f84451e8512669572ea03dd25c916c6baeafac27b07e3d4a5e89165952a64afaceade4546e7e2d4473aba9811ac21131f283f9680d35e777ad9659a7 AUX hip-5.1.3-remove-cmake-doxygen-commands.patch 896 BLAKE2B 35640516bf416760db69b736d72c1e78efdbad8a930d621fdaffd13c5c250f5d80a6975c1e4c368389ce8059aee964c36645f420d0844141d09463637ba0bccb SHA512 b1288e1f4b7553c5bf0fe38a46fbdf269ca5c01fd8e0e225b9454d4916092601d565c57eaf9f716e06fee816e41cb3a948884060551b5a9d71da9b1a050765f9 AUX hip-5.1.3-rocm-path.patch 564 BLAKE2B ad554063a11d58ce5acfa8c8980bac2668d199b059bc2555d4cea40fbc53b6334daaea448d99cc391cee246d8318a450efdef669db2ee164a4db3a55d7d8e193 SHA512 eaa03f4d2394f61dcedde376de6c398625d284a7ac0c94ff2484929efdf298f455c796b96f16bf3989de6593a9a026a7681620b5ca13ce403aba4a32e5a38226 +AUX hip-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch 7304 BLAKE2B 3fca9d44f706250438f1c3f5d44142e1fa3040336eb9ab8b9e7fc54b9473e11957962a9a93cdb3b6980228fffe1a3fd5dab3f8c972340a83723858c12790c1f8 SHA512 7e54d22b0a0924c79d0b31764586891401d1a39f37380d3809e23a60075baacc55468930c30fa5a8ce64083b274701dbc190f67244822191873ae4f831a7fc33 +AUX hip-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch 2734 BLAKE2B 5580ae24e854a42837979a1f6e688eb7edcfeee554577f41611941aa69d5a0bf3f1eb1916c4c7b2ba0389fc16efc31b229a9b21dbec3bfcf0cccad20241191a7 SHA512 156f650559fdeb625c15a8b94320f0b422b04b883f84a5e74ef03293420292be25c118df67bba1ae11fca6a1ac7429b0254aa32b963f7e09a7d8d923589009fd +AUX hip-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch 1866 BLAKE2B 89e377104b0bc383f69c10f894ff28cb8282eeaf042fcb27b03a64b78959c147ef6cd4291aef47a25b616ea2b801363d7a382df4d924ba94fcea7e9ffa1b26f6 SHA512 7f73d7a66adc959ef4dd0dc3540b6db472a3650926f315f4c79761a45e619432107898dc58cb15958be4b36823029ccf91e599760a23fd886429789de586db3b +AUX hip-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch 8063 BLAKE2B c0b7b83682c13bb21e6a152b8c4c2b003024fd2dfc4f5f59e8b91b3d933bbfa888549c1a4471a29a225400f3d900d47023c3394111d41a3ecf52a48647db1694 SHA512 972a249daf692ce847884821a1205608d9ee2941793c474cb36f435eff2ad52dc7cb4f1a3a48a4037df3d62a6e47db84c86014933c94b4bb9bf7b7b12f31cce1 AUX hip-5.3.3-correct-ldflag.patch 1196 BLAKE2B 93c0e7e92c898cfa5d39d008f8c18d82b9032d3f865725b59fb4c0fef263c9a7c4108ecca9f406c21411d72781b88fcacbd7b1e50cc6dd5483cbe89a37b9a2fc SHA512 7a81444c6f2b1a70a451b13440235ba14e058f9023abfd56502ad2ba12a00e31970873b92313a7888c3794083d0c011ce8a314b43e835e9fe872ad97de4e758f AUX hip-5.3.3-disable-Werror.patch 621 BLAKE2B 9bcdec821484ac20343e1352e3c3d5a9297f8e7ab81ed135c5b27f11dd0667c68939fe04157ae8b7dacc5cdcbb6631e0a1b66d6cc2cd796f6322b6ded75055c7 SHA512 799c40b5a2524e166aa674c432c7bfb93c03fe00832680a99cd701b2498cd33c52e5582f9754161173f17048b6ae346a7a5b6d59eddce8696670b1f229858fef AUX hip-5.3.3-remove-cmake-doxygen-commands.patch 976 BLAKE2B edff02ed7b2371739f1659a93ecad9485045091ec48c6aa018d8fde3a9f4a9a48bdcf0cca660e03b4f3ff0e6c4f019068019407f429913f8c3231cdb252b0464 SHA512 f6835f74fb34cd4a9ea0db693eff6e57c742f6912b29046f7b01b87037c014cdeb38f17dd0a6b90dd823656e2957b2d0bc981eb0c71221994ae455cefc03805b @@ -27,11 +27,20 @@ AUX hip-5.5.1-disable-Werror.patch 748 BLAKE2B 965af2240c72e22706c5b1ecb414954ba AUX hip-5.7.0-install.patch 576 BLAKE2B b3c5437a81bcc901327ba4ee9419ad77ea94aab3f6df49c1ce581fd5dad9321d7ffe4d81e1991476978690811d748ee8600dbdf9d70151cfdfb348130e18efdc SHA512 28301e939b3dc49c47d5db16d11b580dbedd47796a2765afab2b535fcd005d4a909f54865f044f0bacb0470ca2e29e529d1511c8bf4d037987bc046704e8e9eb AUX hip-5.7.1-disable-stack-protector.patch 771 BLAKE2B 46ea4b48ae32c7e120418fec467fedc7c496fec2c0589c04e4b62a0afe9b7e6b6e9aae8a4502d5772eefc07c5f71d39b37e4a47d1796d7688b1804814a0274da SHA512 30b82c3b8e7403e8098d1d564c94a85cd29fbf0d6fb4d4af26874bbc5ed03477933fb61064d57c2e2c724182b4816598752b38b1bb9f9384685be72a774d81af AUX hip-5.7.1-exec-stack.patch 1136 BLAKE2B b45560c1cd3410ba9340d5dea7fc2ab7167126a3dbcee6fdaa5ccdab6140db8a6ce9c9f588451f77a1cd27154551a4cb00743d7b2ac3dcb6c36e87f2bc182fe1 SHA512 66a6a9518975a9702f365ae6e9b09835ff93cde49209714b4cbb19c375052859ac26f3d4d2b61052280eee93e237f930a4b7b2d837245a7d477e30893ca6a0b4 -AUX hip-5.7.1-extend-isa-compatibility-check.patch 9043 BLAKE2B 8effc992b0d3478939fed4b003b4cbc1ef09ca1f59792f46d4c5c9253ac1a4d9a32357294b15c50e9c0dc867ebf284fe1823f3c7d829097c69d6633ff2027adc SHA512 ccab928a25089e6f9260dcdda665258fb71b6aefaae444ea25274475b3d668785b5bf4396ca4fbefb1471c06115b139b13f0af4d9b1f76e66821d585e7c8b781 +AUX hip-5.7.1-extend-isa-compatibility-check.patch 9039 BLAKE2B d1c80da9ca584aa43461f4301e8caa49aa995f1050ba71b9a81bf4e184cd361e28ac79ee25b081802611251b0b6ac30afbcd60759724f88361768ffc3f2cfe39 SHA512 b4db426300d93ddf97d419a4388359abd7841213c9be7dee20b0b7bd7a9a7c8f8fc391629984759bc4b365dd7b73e205fbd14d04be8caaff8037df8c572e3b84 AUX hip-5.7.1-fix-mmap-oom-check.patch 1317 BLAKE2B d1e9db74bb815cd9194b47688bb125630a8baf8c3df14e454b2f8c59303c136c6c69b7ca89fddabb2533bfa034c984d88ec276851daf2241d9abeda7f5a50f87 SHA512 b6a5d7b861fe4138c72f91b765df822cce00fda94d3b8b85c0a40c3697455b018256f37317adf714280aa387ebe5da14a092ab69e375e8a804f01243837f7b60 AUX hip-5.7.1-fix-unaligned-access.patch 3011 BLAKE2B d8a6a130edcf51c40e88250508ff3db13f134fb3833d1eadfac32dfdee09c7635091b1f32ed640bcba0c5ca2b745c401183ee8adaa392977ecece12a03450f9e SHA512 f9b85117927d18921d939daa73d2d97477bb49eb6ff7e496f9b110b8e70e00734b698517ae4235a03c560bdfc3618367d7eb2970c9d90dc2bcf07e2ab803d994 AUX hip-5.7.1-no_asan_doc.patch 817 BLAKE2B 4bc80470f9cb476289086ae561560bb54fcdd9d1e66ef420dc60f129f29b0de02025be0ed2a7bfd2143b9bc0b456a354abc574dcbff509872a35e2e0c06f7760 SHA512 10a97524acce0c45c8edeccd11b64445f6edeb380e8262e1fc63163c4758efd731af36701dae1c9988264e8ce10971c9b3959ea881e81646994c779a96d10bb9 +AUX hip-6.0.2-install.patch 993 BLAKE2B e54542801197ad33e3feee0896401acec60190e95ec09ede70b357f5af550255dc4f08e75279d21e3932d7be6b7e0c0b5cd86f8ca235f463135d42699855f4d9 SHA512 a3d772d60d3842a91796f32d8bad3289eee8f878bcedb6c064df43f514ed102729f8f7ed62fc1d8b3f73dd969e5368a86b847b0858d296da916ac424ef593059 +AUX hip-6.1.0-extend-isa-compatibility-check-v2.patch 1323 BLAKE2B 1af3ebf4c9c328a89a6b7440acd744955078b1a35c90d7476905417398e05848435776ba954184e37a943d2ff31d10aa3116ce00eed754574bf843a16cd0da1c SHA512 19c93c98ea3bc6fbff309ff02424355e482ea584266adf4322bd46d55a2f6f0196fd02eae843c08080d01a6afc1cf94e1bed3905881a67df9f3c3b0d8b17c464 +AUX hip-6.1.0-extend-isa-compatibility-check.patch 9037 BLAKE2B d9dceb54665816468971e8ee1ae9e749df48f60be0cd9a131259179f4b5cc8e465a27971906f2d990e73ad00f278e9736cba9941686ecb604ca8820e82e2ac94 SHA512 18bd5365774694619d8601dc6ed40517cc77f4dcdd124ef59f486416c4f6c08586adece94bd175ef33109744de84a11e78a34b4e07425a2616cbf68ef1c1bf49 +AUX hip-6.1.0-install.patch 937 BLAKE2B a694b8d4fd433ed788e97df09ed26a58305944b63f1f88948b0ff47f9f60f96236bda072917d279d263d02059aaab0e3d2282feb0cee02a7da86e9f016a091f0 SHA512 62a38326021bb1b81a43cf26336528dd1cb30ac90d41c5a3ab9a2d8996090cb8677fc163d156785347f0cb893c84b7166b698b801e1d52449fdb3ee01e75483b +AUX hip-6.1.1-fix-musl.patch 566 BLAKE2B ca84d7a1c38b6ae3e7dedbda8cafa0ad5bf31165c3a7b5af8a1a9714d871eeedb64bd6e6c71960e65ee3f7bed2bdf302d07e7c33e225102123d8516018391430 SHA512 e224e84b6eb4b43fd79e5172ad4882d1862d7a50fcb7ed60afc58148a399a96fafaf14477ed31d503f3ecb4c93ba2b58bdcad3c6dce7afab61ee7a8e60d3f65e AUX hip-test-5.7.0-rocm_agent_enumerator-location.patch 651 BLAKE2B 237ae5e71c9a6c565680c4fb07ece160f6bc635d25c77a20f3da54b92fcead95c0f6871f53a58a1e9b26b1d5fef3372ebc547638ba2fba43621c2867d276e75a SHA512 79d3cb277c41a84e6db70b28ad465067403f27d1f54adcbcd3e3501fc08c29f2aafc60fa2e6e78794eed95987352aa7ae844fbd55abc1abe0be8ff1879ed7d8f +AUX hip-test-5.7.1-remove-incompatible-flag.patch 1474 BLAKE2B eeb5442fbb4db172a88949b8d824e036bf6be68b92096d827239a841ede8247e663cb54ede44914272e36be552c2a5f2e99c089807477a8961a255ce2c789b6f SHA512 7ebb72f29adea25200bcd400e7b8dc8fb3b7d017699717d7f495a4cf07a25b3aba749938392268b9b9a461057932cfd340763a43b55623cb6aa64c30e0ee48e0 +AUX hip-test-6.0.2-hipcc-system-install.patch 1912 BLAKE2B a20f5bdaf84d7e22ee7903e36d31f9e61328474456a1b91ab936478dd7e79f50510a4f5cb7cfefd31f6c200f9c40afc9ff2641667f10bb8c88871c9aa964faea SHA512 c237658d8d3f3c2ab7cc583dd62c32d1ccda610b2515b47250ce112639d4838c9b3d14e77a9edc7b854d14368fa16c9bd048ec014f528620cb8d11d7601e1350 +AUX hip-test-6.1.0-disable-hipKerArgOptimization.patch 943 BLAKE2B 1cfc94f9969d28f64c3b2598916669101f4d5704abec8fedb896f3d26403b273a6acdce5a189380da08174f8a5b679f4c7f3a97e4856c9b683dc68fdd72edb47 SHA512 3cb098d8d672801f394e059540846d541eef38f52da5044e29cac0863b473150a8771c12585ddad1e2e2599c667367529649914779df467f1c5e1dd8acfc13b5 +AUX hip-test-6.1.1-fix-musl.patch 5506 BLAKE2B 9f6c97491c76d5194b20e8705a645de170d1234dd1422b1857442c5d1a90d33c726b473d35ce673465e3893cb36f4f2cb1babef5f2140b453234131bb5883193 SHA512 173cdb65c24091548a8ec3c994fc393052ccd582e27a9ffb259bedf6fabf543a0e18aa6a5f5d9fd1541834acee470a1d6d2dc7def88d6b1cbe0c916bbc361a21 AUX hipvars-5.1.3.pm 629 BLAKE2B 6149f230aa0756603ac0b455d802db9c698be8e4a22367e98915db974ea16176f85f9b5a22e2572183641734cedbbe2ba2c826aa0223ea3e12c5550983db0480 SHA512 26ba459b13df1ad6dc50411ac6589dd3d17eff727fee0e938275912e36459c7a43b35233a7f78bbed282a992e969d8b8f95007964c810a5954b0abeccc67082d AUX hipvars-5.3.3.pm 581 BLAKE2B edf0c1df5f7f5c57189c76fbcedec8155072a9f8e2c580d637dcfb557a844e7cc276b754d0fd8f5a9f59d2c5bbcfda6c9ac9951ad16d8a12bb48e74f062987ab SHA512 9fd72b000f59ec25a74ef5965f4affc5e866025424211b4d81fbea979ffba9f08319dde0063c8c835507a1b9db990f8f25eea3a8e2e6d88faceaf34d5dd722cb AUX hipvars.pm 598 BLAKE2B 1645b12179195b95757d207248c85b7c8d9eda0347caee5cb48bdc66e85fda517f607bcb69cdfc63657a0db04ad8e96494a0a80268df7c17d6bb0e689325c2e8 SHA512 6c4e71455341673a329b4b0163fefd7f2f4b7d62da3496643d0de096755899c99b3b5a80fffbdf29896c234cb4f617b368217f4eecfd005849b294ff434b79c6 @@ -39,14 +48,15 @@ AUX rocclr-5.3.3-fix-include.patch 6053 BLAKE2B e215cefd0f2895beda0e3c029a24e48f AUX rocclr-5.3.3-gcc13.patch 776 BLAKE2B f942628db7c91aff27ba6f0cb96ec857b28f6967806aba88473e11a9ab0b6b6169f12f4a1990131709c74da6635e793fafaf2d0bef9759c8f4f816e9777c966c SHA512 72bafbd708a222f03e8f5a89aaaf3050eff9d15202f759298a50995aeb545238107a5c8e00ff5b4d2ba510dad3f71a4061261b20d7dd958632ebae63c2ccb2ca DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228 SHA512 eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a DIST hip-5.7.1.tar.gz 553774 BLAKE2B f88c235f688d3a662ec6cb4ad7fe3f82c0015015997871609cc30ab5b2f7fcb9709a08683d77194e45a6dbbe1d24c6355b128d2ecf655f1dea3468711c64e0a3 SHA512 68fa8753725b53c999d102d254c6b1dba53af4e00d6a48db93d10213cc02eec30b4a39c66e773d4f625dd9636cf8b0c5faa05b69fac27cf5a6b19dd3ddd2b905 -DIST hip-6.0.0.tar.gz 243451 BLAKE2B c404d23f7ee46a6c5601077d598edf4d6b2ca48da5e6cabf45c926ee1224eedc3d9eb6715948bc44cf3da2431a2feb879b1b8cd35bac69319c9dc066ab2e12f7 SHA512 2beb100812f9f515d6bc29fd4930913c2ff64c4f824727c9fc38d2e249841c840bd35357f652ab2b5022d166331de8f7409e72c49a5f69042f54f16a6a290339 +DIST hip-6.1.1.tar.gz 247192 BLAKE2B c40bb483fb61b3037693f456e546046598df7e0dd81a1f1c8d222ab0d9c0752092ce85c8533bd355f883dda5ce1f32f7ff2b2a58cebac50d53e0e7f4d85ca3ae SHA512 3e6162938294a74af51bc2161ada38dc4ba19614e182238f320f2052a9025be6ea413e40f00cb80f4e86696793d6c4431e2417ea798a2330886a3f3e66aedf0d +DIST hip-test-6.1.1.tar.gz 1080605 BLAKE2B 7eddf648be31365479baa0cd4fd1c060a682a6b44d923cac1c4840c0768782db2fef4e5d97318ef0423be1e5c85b1a0cc6b9d324db789dad28be17f64ab38cae SHA512 0dd679c5b94a59e192bea5789f4448b53ac23c8a03b24a347758b1d70ff692483fd4aaea0b19345eb6ffb82a4492ed21958398b53ae6244a244a660dfa33412f DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c SHA512 89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449 SHA512 3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924 DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11 SHA512 c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a DIST rocclr-5.5.1.tar.gz 634330 BLAKE2B e6383a6b6b09f274a944d66effd345e38a191ec73ee5c5240f8ec8bb62a4df97b80835ce57f8f78c3834602b9da425b49289b5c7cd7e4c7071147ff409c6a6c9 SHA512 4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f DIST rocm-5.7.0.tar.gz 845881 BLAKE2B 08255edc1407e5ef85895336b11496319695318fce265565728ad75175b5e1dfab98f696fee2d27e60c48e862f721fad4c53118cc70b807353fff5f97ed72ac2 SHA512 72420e16c7cfe9687e030331838666dabaa43d686bdad1d109431e44db99070a2cf6dd64b59e3275019abedd6612f6008c798a79275e7225b6b122fb9f644660 DIST rocm-clr-5.7.1.tar.gz 2008647 BLAKE2B 3db0760d6f83504e60caf88a2dd5e0bc02c7db9d6f263ad0eb2cfc79aa0f88a3699c412844a0158a796d9d02e79660287e791edad787d814eefffea4fd2298b4 SHA512 d79323481d82fc02c12a32cdcc0d14437d512af023e7737db0387b7eecb27fe6e4ae7c71d6adce57932a04bb24c880440d9dc10aeb5af11a4f2ca64d44330965 -DIST rocm-clr-6.0.0.tar.gz 1983453 BLAKE2B 2cf6ec7c3b0ec5dedeea94ff54af30662b781fc2eee22e3315094af61dc9d331eba33c1d9d463295848c5724e515a3137f9b189c1261273afad1a5f9d32226c2 SHA512 12e77a121150d8c25121b98bd7c6233c2568f9f4130bdbe6bc3ab225f14b8bea6a6bdc4ed497c0f999d3d3daabdca0de8caaa1b69911c11974b5d6f951734433 +DIST rocm-clr-6.1.1.tar.gz 2031034 BLAKE2B b0485bb015d31986f4988d1db0c029c826856e50b5bb1b58fac2097c14b3966668f1b8d41ec198889e27ac860497a8b3c081ec31d52390d5c9ff5db092bf7cce SHA512 86925e8b9a9e77b06a57daefbc7279887b4ef7c6a79c3717bc2f2d3bf29926281c60063fd17e21c65d7def520d9f579bf88f69051d053a38750ba968f69ca3fc DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43 SHA512 6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24 DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b SHA512 e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87 DIST rocm-hip-5.4.3.tar.gz 1195173 BLAKE2B 7452ee7a874bc4703b0d3aaaf9fa2a51e223d5650c65c34982a9981dbe14e8ec70c93d7e70c5ad36a8d02c3d2214fa6a393e20502a01418fb3320d8cfe363feb SHA512 1f4100e114576dcbad83aae453e21ab85cf25bd8a6ada380bb11cfc30e5f92ba903055b7257a099321a84b65adb444dd52b8258e82567f4bc882e65d89369b43 @@ -60,10 +70,10 @@ DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B a3f600a68183337f92b152a123 DIST rocm-opencl-runtime-5.4.3.tar.gz 1005268 BLAKE2B f9398e4c2b0f045f1b5d8df9f31b7f2bef6a9201885aa6ee5fc5d71632cfde26a078d9a5ea38c3da12d3c187faf04c7bdcf1a8ecb9927cdba56b1efdfcdc44ee SHA512 f65d4622ce8721a6b91ab5b5b306d142ba507d3e631ac3ab0b76c5bc6d8d18455e02debd954c82e7eb609f232b509f1ec1a013dc2fad467c2c2ad31fdf15755d DIST rocm-opencl-runtime-5.5.1.tar.gz 991802 BLAKE2B 07d955b4a76b11296259287f5878cadc2438350a3abcdb5bd693c02790ff4c330b1d0a2a87f8de5334b3e3459c26b3fdf695886502ec5d2c373d807c242c8f93 SHA512 06786e818002dc43f64e4b0aaae0a0a2bcdad7acdb4662e1215d43277b107d65fb9a7f7441c31e3378c380cac860b1cd2eaefb5753246beffa4d9c10efced85e DIST rocm-tracer-5.1.3.tar.gz 511617 BLAKE2B 4142979b3b7d649798a7ac0b2a04b42aa7fbcbf82f2cf51b0e5363ec0da538046d6e59283d0ce1bfd341317bf24ac2f694d5c8a7d1f132f9b21caea5caf7eda3 SHA512 e73b0c921ffbdcac571d8b0825de39bd8a4fd5f2720ecdd0c189951db85efb607a0b1cd7a9bb02b3dbf329b277cb5e197525216a8e8927eea4e6ce290b7e7c7b -EBUILD hip-5.1.3-r4.ebuild 6638 BLAKE2B 4ccc536736e737f0066ab4f200a5ea76a9f16edef0db0eefa36573bc4c9d3ea26ca04e6ad3cd4fd5d4dcbd7437177957b6cdd23307249525340bfcc7ae3ed9c6 SHA512 235042a89298d383a4a33ac437f510036d922f049ff0e02990167165e448dd88b615d6be7dd84c67d644f5fbcab5f9a71a9b7393fffa1b406095bae91a5087ed -EBUILD hip-5.3.3-r3.ebuild 5346 BLAKE2B 4f5c0570e8a4ff65ac0b11bc555e2f81f7c6e56cc3ff86de894536b3b0597c049216a9d4184e25471999c4cf73b8f774daf1bb46d613c830bcc0d8c445f85b74 SHA512 9a54281155f14f467286d132ec405b90703b94760b8f4e268aed77b4a47d8a195febef3200068d0e5905cf7078fb92e2252b6ab7a3b86e40d330449315c0cf4d -EBUILD hip-5.4.3.ebuild 5239 BLAKE2B 74d5423c5f7c01f15c5583b2c53420b1780fa7fdb11581fef2f0570be11a2047a43881a13b41b333905faaafab7dee15e1fb4af96703829cdab7d547e2cb5796 SHA512 7b2f5abfbc2ded1751b3d32349eb81715468125e9a9cc64522b725ed9a92f0dbf6e575fd1b84ab5234532badbf3a6b0c4d3a5b375384665ab413b22c54a5ee3e -EBUILD hip-5.5.1.ebuild 5244 BLAKE2B aa1f937c5f2651ad3e79898ffc427696253c619583cd1450f1a3e7b9a7448e0d750f5df72a87458dfe6107f2f8846bc2b9b064d54b0b849fc3812a4f268c4af1 SHA512 94cad30f1f0e3e376a5902c83a151d3fe2a7b72b45747672e96b9d13dedadc7184c8f714789ff3e436133ffb8a7d58e8194471c843c694d3d39c348fd7d5a3ab -EBUILD hip-5.7.1-r2.ebuild 5350 BLAKE2B d8dcd223e711f9ba0b61822761d2805a0e54ef50a048bdd16170cfc64f00bb6bd3f0d018984201f0dc5c383badb2574174419f8c42c5cee006cca93047a77054 SHA512 f88b8f32d37bc13e78e4fe452012af44dd7aa09b6a67a3c1243632127510381ebb2293947a708043e47defcd53607a744102260e0f4602579024ef50ed6189b9 -EBUILD hip-6.0.0.ebuild 4818 BLAKE2B d98c4b514dbdeacbc633fe6b8347f228238b8e56c2854790991cd2ab8fb685417fd32795c4246bd4fdf8bb2497be3133373fdf505b1583955fc4a1acf07f658d SHA512 2260791ffbab2f527e9a3f390de477e98f4f1eccc8e8e709d2b4d57ee055b07d1ea53f34a849851d0f1909bb3649f7b14769f6da08a7de323f52e6f6967cbdbd -MISC metadata.xml 729 BLAKE2B 92e36c42f6d8335e5a8e3a86b591ff9e6306e0d187644620fab7f8f7ddd00156ee91ff49184ffbe379e509f2096c51c421575a69de7abea3c0b372fdcec52ccb SHA512 84fc8234a5fdf54bf43228c2144d809a461862fb45fea24bf366ee5937df3882c3332429938792981e37dbb4cda6e5d7e05ac5deaded34d8bcce1eb53df8d0fd +EBUILD hip-5.1.3-r4.ebuild 6650 BLAKE2B 83eb1cbf369f7b5112de88334b340ff89486c093da946218eae42cd7bef7a3982e6da08ebdb8d12e79f60b2920f8680f555dc16fc75d99a41b7a9d1f42b2aada SHA512 e60014a38997e93f13d73fc52e77408b61414eef90263f3ff19025d42efe324b8e5a2fb50b6aa830ded6e764273ccea007341918de48e3bf4e728b525e42bbbc +EBUILD hip-5.3.3-r3.ebuild 5396 BLAKE2B 1303346f578f16525415144781dbde4838da758888346136fb4f88f53e6b1abcc43bfbde7f9b16bbf00eb26b7409564948949d82981bee30b177c1265acfdd8b SHA512 39c9dbfee84aea0c60e5ae000ea6ce72a8112b0ad95e41ccca2d74180f52f7aca2eb017344e66c4e17fba3d0cd412c7024ccaeaad2947e1849edffa57293c6b5 +EBUILD hip-5.4.3.ebuild 5263 BLAKE2B 4fd371749bfe8d1359941be7f71962e9157efab0410a457691609cddd400ae1046b687dcacf7238090864f9082c52a1ad76df59e50c7fb4a767cafdb3c6bd1c9 SHA512 1bd49dcbd11405933b75db6369e9c803a007bdc3393bc2bdf8a858e883e9d1d9ec98add9c6e64341b53af7ef943e9de0ecce8d94cfdf7df49d08f2260a3d2cb7 +EBUILD hip-5.5.1.ebuild 5269 BLAKE2B 29d0f7303267e6baec24ea65b24b1b4e1d62255312496f962e7ef81a4da3fd8fe67fac9f87d61bd11de14c0bd8497749183c7a702fed187b54e6b34a5a590b77 SHA512 49a5cbae272cafe9f5b696ddca3099932a50671d2d59d589252834cc7ecb01eccb8efac0a3b39f646e38017e009ffcbfaac7b2f4d59443a68845d4be97f6b361 +EBUILD hip-5.7.1-r2.ebuild 5452 BLAKE2B ff7f44547964dabff96ed68e60d0928512d208b37a446053bc93052aea809914fe4c49430958b7c26900015886b7be0b7c9e6bea4aed91377d83b19f5ba63754 SHA512 a0d0786e8f5e75b4450b90a53131c2580810afcb51d8df618d253c2968b8da3ab1641df9142d8f13db93ed773dcb7e2b746eaab9f42a4f49f820819d5cdb64fb +EBUILD hip-6.1.1.ebuild 6598 BLAKE2B 01a40b98c8739f976e8b2f81d3fe5dd5ee970cb38ea97317ec18722db9483ced21c8116eb92e206250d8f4209187a78619b2f4f854edb5fb139c884e501e8dbe SHA512 ad283051ed13122d4e2402102cd12abfbcbca996d532398577b74eadc1f17875a26806a9254e4733d9b3c290193eed92ac712c911805cc89dfe6fe4b6c14cb59 +MISC metadata.xml 1076 BLAKE2B 816a3628360882d89e2bc64f7b5be6442ad4fb0866b6a8291c4701a03e626d9482b93980b34e5ab21c37bda025359978b471d09e2d4817ceeb209d83afaecbfe SHA512 009079d56a9fb1c3212dc4e67dd88bc16bbc6350bb832912543b2a1e6747c77d13021e7a94da9a4c9371722828214b308246e7ad58406276126cdf6e44281506 diff --git a/dev-util/hip/files/0001-SWDEV-316128-HIP-surface-API-support.patch b/dev-util/hip/files/hip-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch index 14af91f9055b..14af91f9055b 100644 --- a/dev-util/hip/files/0001-SWDEV-316128-HIP-surface-API-support.patch +++ b/dev-util/hip/files/hip-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch diff --git a/dev-util/hip/files/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch b/dev-util/hip/files/hip-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch index 9dbfe8a55395..9dbfe8a55395 100644 --- a/dev-util/hip/files/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch +++ b/dev-util/hip/files/hip-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch diff --git a/dev-util/hip/files/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch b/dev-util/hip/files/hip-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch index b9a1329e5931..b9a1329e5931 100644 --- a/dev-util/hip/files/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch +++ b/dev-util/hip/files/hip-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch diff --git a/dev-util/hip/files/0002-SWDEV-355608-Remove-clang-include-path-2996.patch b/dev-util/hip/files/hip-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch index 6d64ad8c9fd8..6d64ad8c9fd8 100644 --- a/dev-util/hip/files/0002-SWDEV-355608-Remove-clang-include-path-2996.patch +++ b/dev-util/hip/files/hip-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch diff --git a/dev-util/hip/files/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch b/dev-util/hip/files/hip-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch index f92cce4cf8d8..f92cce4cf8d8 100644 --- a/dev-util/hip/files/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch +++ b/dev-util/hip/files/hip-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch diff --git a/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch b/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch index 7853de693cde..25bdfba07fd2 100644 --- a/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch +++ b/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch @@ -42,7 +42,7 @@ https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026 +} + +static bool isGfx1010EquivalentProcessor(const std::string& processor) { -+ return matches(GfxPattern{"gfx101", "02"}, processor); ++ return matches(GfxPattern{"gfx101", "0"}, processor); +} + +static bool isGfx1010SupersetProcessor(const std::string& processor) { @@ -181,7 +181,7 @@ https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026 } --- a/rocclr/device/device.cpp +++ b/rocclr/device/device.cpp -@@ -232,10 +232,49 @@ std::string Isa::isaName() const { +@@ -234,10 +234,49 @@ std::string Isa::isaName() const { return std::string(hsaIsaNamePrefix) + targetId(); } @@ -211,7 +211,7 @@ https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026 + } + } else if (codeObjectIsa.versionMajor() == 10) { + if (codeObjectIsa.versionMinor() == 1) { -+ const std::array<uint32_t, 2> gfx1010_equivalent = { 0, 2 }; ++ const std::array<uint32_t, 1> gfx1010_equivalent = { 0 }; + const std::array<uint32_t, 4> gfx1010_superset = { 0, 1, 2, 3 }; + if (Contains(gfx1010_equivalent, codeObjectIsa.versionStepping()) && + Contains(gfx1010_superset, agentIsa.versionStepping())) { diff --git a/dev-util/hip/files/hip-6.0.2-install.patch b/dev-util/hip/files/hip-6.0.2-install.patch new file mode 100644 index 000000000000..e2fc3a8852cb --- /dev/null +++ b/dev-util/hip/files/hip-6.0.2-install.patch @@ -0,0 +1,23 @@ +diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt +index 7ad30019d..e79ea0714 100755 +--- a/hipamd/CMakeLists.txt ++++ b/hipamd/CMakeLists.txt +@@ -398,18 +398,7 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "") + set(hipcc_bin ${hipcc_bin}.exe) + set(hipconfig_bin ${hipconfig_bin}.exe) + endif() +- if(EXISTS ${hipcc_bin} AND EXISTS ${hipconfig_bin}) +- install(PROGRAMS ${hipcc_bin} DESTINATION bin) +- install(PROGRAMS ${hipconfig_bin} DESTINATION bin) +- endif() + endif() +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin) + endif() + + ############################# diff --git a/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch new file mode 100644 index 000000000000..d6e95c994c8f --- /dev/null +++ b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch @@ -0,0 +1,35 @@ +From e188c092a987c45caf2ea4651686ea631ca47c3d Mon Sep 17 00:00:00 2001 +From: Paul Zander <negril.nx+gentoo@gmail.com> +Date: Tue, 25 Jun 2024 15:22:33 +0200 +Subject: [PATCH] prepare usage of old patch + +Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> +--- + hipamd/src/hip_code_object.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/hipamd/src/hip_code_object.cpp b/hipamd/src/hip_code_object.cpp +index 6b3a6d0..fef89df 100644 +--- a/hipamd/src/hip_code_object.cpp ++++ b/hipamd/src/hip_code_object.cpp +@@ -410,7 +410,7 @@ static bool isCodeObjectCompatibleWithDevice(std::string co_triple_target_id, + if (co_triple_target_id == agent_triple_target_id) return true; + + // Parse code object triple target id +- if (!consume(co_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) { ++ if (!consume(co_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + '-')) { + return false; + } + +@@ -423,7 +423,7 @@ static bool isCodeObjectCompatibleWithDevice(std::string co_triple_target_id, + if (!co_triple_target_id.empty()) return false; + + // Parse agent isa triple target id +- if (!consume(agent_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) { ++ if (!consume(agent_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + '-')) { + return false; + } + +-- +2.45.2 + diff --git a/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check.patch b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check.patch new file mode 100644 index 000000000000..40ccf6fdc089 --- /dev/null +++ b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check.patch @@ -0,0 +1,236 @@ +Combined with matching changes within rocr-runtime ebuild, this patch allows +to load compatible kernels whenever possible. +For example if AMDGPU_TARGETS is set to gfx1030 and some application +was started on gfx1036, it loads gfx1030 kernel. + +Author: Cordell Bloor <cgmb@slerp.xyz> +https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0025-improve-rocclr-isa-compatibility-check.patch +https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026-extend-hip-isa-compatibility-check.patch +--- a/hipamd/src/hip_code_object.cpp ++++ b/hipamd/src/hip_code_object.cpp +@@ -390,47 +390,123 @@ static bool getTripleTargetID(std::string bundled_co_entry_id, const void* code_ + return true; + } + +-static bool isCodeObjectCompatibleWithDevice(std::string co_triple_target_id, +- std::string agent_triple_target_id) { ++struct GfxPattern { ++ std::string root; ++ std::string suffixes; ++}; ++ ++static bool matches(const GfxPattern& p, const std::string& s) { ++ if (p.root.size() + 1 != s.size()) { ++ return false; ++ } ++ if (0 != std::memcmp(p.root.data(), s.data(), p.root.size())) { ++ return false; ++ } ++ return p.suffixes.find(s[p.root.size()]) != std::string::npos; ++} ++ ++static bool isGfx900EquivalentProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx90", "029c"}, processor); ++} ++ ++static bool isGfx900SupersetProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx90", "0269c"}, processor); ++} ++ ++static bool isGfx1030EquivalentProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx103", "0123456"}, processor); ++} ++ ++static bool isGfx1010EquivalentProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx101", "0"}, processor); ++} ++ ++static bool isGfx1010SupersetProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx101", "0123"}, processor); ++} ++ ++enum CompatibilityScore { ++ CS_EXACT_MATCH = 1 << 4, ++ CS_PROCESSOR_MATCH = 1 << 3, ++ CS_PROCESSOR_COMPATIBLE = 1 << 2, ++ CS_XNACK_SPECIALIZED = 1 << 1, ++ CS_SRAM_ECC_SPECIALIZED = 1 << 0, ++ CS_INCOMPATIBLE = 0, ++}; ++ ++static int getProcessorCompatibilityScore(const std::string& co_processor, ++ const std::string& agent_processor) { ++ if (co_processor == agent_processor) ++ return CS_PROCESSOR_MATCH; ++ ++ if (isGfx900SupersetProcessor(agent_processor)) ++ return isGfx900EquivalentProcessor(co_processor) ? CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE; ++ ++ if (isGfx1010SupersetProcessor(agent_processor)) ++ return isGfx1010EquivalentProcessor(co_processor) ? CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE; ++ ++ if (isGfx1030EquivalentProcessor(agent_processor)) ++ return isGfx1030EquivalentProcessor(co_processor) ? CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE; ++ ++ return CS_INCOMPATIBLE; ++} ++ ++static int getCompatiblityScore(std::string co_triple_target_id, ++ std::string agent_triple_target_id) { + // Primitive Check +- if (co_triple_target_id == agent_triple_target_id) return true; ++ if (co_triple_target_id == agent_triple_target_id) return CS_EXACT_MATCH; + + // Parse code object triple target id + if (!consume(co_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) { +- return false; ++ return CS_INCOMPATIBLE; + } + + std::string co_processor; + char co_sram_ecc, co_xnack; + if (!getTargetIDValue(co_triple_target_id, co_processor, co_sram_ecc, co_xnack)) { +- return false; ++ return CS_INCOMPATIBLE; + } + +- if (!co_triple_target_id.empty()) return false; ++ if (!co_triple_target_id.empty()) return CS_INCOMPATIBLE; + + // Parse agent isa triple target id + if (!consume(agent_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) { +- return false; ++ return CS_INCOMPATIBLE; + } + + std::string agent_isa_processor; + char isa_sram_ecc, isa_xnack; + if (!getTargetIDValue(agent_triple_target_id, agent_isa_processor, isa_sram_ecc, isa_xnack)) { +- return false; ++ return CS_INCOMPATIBLE; + } + +- if (!agent_triple_target_id.empty()) return false; ++ if (!agent_triple_target_id.empty()) return CS_INCOMPATIBLE; + + // Check for compatibility +- if (agent_isa_processor != co_processor) return false; +- if (co_sram_ecc != ' ') { +- if (co_sram_ecc != isa_sram_ecc) return false; ++ int processor_score = getProcessorCompatibilityScore(co_processor, agent_isa_processor); ++ if (processor_score == CS_INCOMPATIBLE) { ++ return CS_INCOMPATIBLE; + } +- if (co_xnack != ' ') { +- if (co_xnack != isa_xnack) return false; ++ ++ int xnack_bonus; ++ if (co_xnack == ' ') { ++ xnack_bonus = 0; ++ } else if (co_xnack == isa_xnack) { ++ xnack_bonus = CS_XNACK_SPECIALIZED; ++ } else { ++ return CS_INCOMPATIBLE; + } + +- return true; ++ int sram_ecc_bonus; ++ if (co_sram_ecc == ' ') { ++ sram_ecc_bonus = 0; ++ } else if (co_sram_ecc == isa_sram_ecc) { ++ sram_ecc_bonus = CS_SRAM_ECC_SPECIALIZED; ++ } else { ++ return CS_INCOMPATIBLE; ++ } ++ ++ return processor_score + xnack_bonus + sram_ecc_bonus; + } + + // This will be moved to COMGR eventually +@@ -483,6 +559,7 @@ hipError_t CodeObject::extractCodeObjectFromFatBinary( + for (size_t i = 0; i < agent_triple_target_ids.size(); i++) { + code_objs.push_back(std::make_pair(nullptr, 0)); + } ++ std::vector<int> compatibility_score(agent_triple_target_ids.size()); + + const auto obheader = reinterpret_cast<const __ClangOffloadBundleHeader*>(data); + const auto* desc = &obheader->desc[0]; +@@ -495,17 +572,19 @@ hipError_t CodeObject::extractCodeObjectFromFatBinary( + reinterpret_cast<const void*>(reinterpret_cast<uintptr_t>(obheader) + desc->offset); + const size_t image_size = desc->size; + +- if (num_code_objs == 0) break; + std::string bundleEntryId{desc->bundleEntryId, desc->bundleEntryIdSize}; + + std::string co_triple_target_id; + if (!getTripleTargetID(bundleEntryId, image, co_triple_target_id)) continue; + + for (size_t dev = 0; dev < agent_triple_target_ids.size(); ++dev) { +- if (code_objs[dev].first) continue; +- if (isCodeObjectCompatibleWithDevice(co_triple_target_id, agent_triple_target_ids[dev])) { ++ if (compatibility_score[dev] >= CS_PROCESSOR_MATCH) continue; ++ int score = getCompatiblityScore(co_triple_target_id, agent_triple_target_ids[dev]); ++ if (score > compatibility_score[dev]) { ++ compatibility_score[dev] = score; ++ if (!code_objs[dev].first) ++ --num_code_objs; + code_objs[dev] = std::make_pair(image, image_size); +- --num_code_objs; + } + } + } +--- a/rocclr/device/device.cpp ++++ b/rocclr/device/device.cpp +@@ -232,10 +232,49 @@ std::string Isa::isaName() const { + return std::string(hsaIsaNamePrefix) + targetId(); + } + ++template <class T, std::size_t N> ++static bool Contains(const std::array<T, N>& arr, const T& value) { ++ return std::find(std::begin(arr), std::end(arr), value) != std::end(arr); ++} ++ ++static bool IsVersionCompatible(const Isa &codeObjectIsa, ++ const Isa &agentIsa) { ++ if (codeObjectIsa.versionMajor() == agentIsa.versionMajor() && ++ codeObjectIsa.versionMinor() == agentIsa.versionMinor()) { ++ ++ if (codeObjectIsa.versionStepping() == agentIsa.versionStepping()) { ++ return true; // exact match ++ } ++ ++ // The code object and the agent may sometimes be compatible if ++ // they differ only by stepping version. ++ if (codeObjectIsa.versionMajor() == 9 && ++ codeObjectIsa.versionMinor() == 0) { ++ const std::array<uint32_t, 4> gfx900_equivalent = { 0, 2, 9, 12 }; ++ const std::array<uint32_t, 5> gfx900_superset = { 0, 2, 6, 9, 12 }; ++ if (Contains(gfx900_equivalent, codeObjectIsa.versionStepping()) && ++ Contains(gfx900_superset, agentIsa.versionStepping())) { ++ return true; // gfx900 compatible object and agent ++ } ++ } else if (codeObjectIsa.versionMajor() == 10) { ++ if (codeObjectIsa.versionMinor() == 1) { ++ const std::array<uint32_t, 1> gfx1010_equivalent = { 0 }; ++ const std::array<uint32_t, 4> gfx1010_superset = { 0, 1, 2, 3 }; ++ if (Contains(gfx1010_equivalent, codeObjectIsa.versionStepping()) && ++ Contains(gfx1010_superset, agentIsa.versionStepping())) { ++ return true; // gfx1010 compatible object and agent ++ } ++ } else if (codeObjectIsa.versionMinor() == 3) { ++ return true; // gfx1030 compatible object and agent ++ } ++ } ++ } ++ ++ return false; ++} ++ + bool Isa::isCompatible(const Isa &codeObjectIsa, const Isa &agentIsa) { +- if (codeObjectIsa.versionMajor() != agentIsa.versionMajor() || +- codeObjectIsa.versionMinor() != agentIsa.versionMinor() || +- codeObjectIsa.versionStepping() != agentIsa.versionStepping()) ++ if (!IsVersionCompatible(codeObjectIsa, agentIsa)) + return false; + + assert(codeObjectIsa.isSrameccSupported() == agentIsa.isSrameccSupported() && diff --git a/dev-util/hip/files/hip-6.1.0-install.patch b/dev-util/hip/files/hip-6.1.0-install.patch new file mode 100644 index 000000000000..416663f6ea48 --- /dev/null +++ b/dev-util/hip/files/hip-6.1.0-install.patch @@ -0,0 +1,20 @@ +These files already installed by hipcc, which is a runtime dep +--- a/hipamd/CMakeLists.txt ++++ b/hipamd/CMakeLists.txt +@@ -401,16 +401,7 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "") + set(hipcc_bin ${hipcc_bin}.exe) + set(hipconfig_bin ${hipconfig_bin}.exe) + endif() +- if(EXISTS ${hipcc_bin} AND EXISTS ${hipconfig_bin}) +- install(PROGRAMS ${hipcc_bin} DESTINATION bin) +- install(PROGRAMS ${hipconfig_bin} DESTINATION bin) +- endif() + endif() +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin) + if(WIN32) + install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin) + install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin)
\ No newline at end of file diff --git a/dev-util/hip/files/hip-6.1.1-fix-musl.patch b/dev-util/hip/files/hip-6.1.1-fix-musl.patch new file mode 100644 index 000000000000..424cd0dde119 --- /dev/null +++ b/dev-util/hip/files/hip-6.1.1-fix-musl.patch @@ -0,0 +1,24 @@ +Fix "basename" and "__cpu_mask" definitions for musl + +Upstream PR: https://github.com/ROCm/clr/pull/83 +--- a/rocclr/os/os.hpp ++++ b/rocclr/os/os.hpp +@@ -29,6 +29,7 @@ + + #if defined(__linux__) + #include <sched.h> ++#include <libgen.h> + #endif + + #ifdef _WIN32 +@@ -377,6 +378,10 @@ ALWAYSINLINE address Os::currentStackPtr() { + + #if defined(__linux__) + ++#ifndef __GLIBC__ ++typedef unsigned long int __cpu_mask; ++#endif ++ + inline void Os::ThreadAffinityMask::init() { CPU_ZERO(&mask_); } + + inline void Os::ThreadAffinityMask::set(uint cpu) { CPU_SET(cpu, &mask_); } diff --git a/dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch b/dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch new file mode 100644 index 000000000000..02aa12f1fe42 --- /dev/null +++ b/dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch @@ -0,0 +1,28 @@ +https://github.com/ROCm/hip-tests/pull/443 + +From cb0140843a162f69c454e91cd994524423b39b8c Mon Sep 17 00:00:00 2001 +From: Yiyang Wu <xgreenlandforwyy@gmail.com> +Date: Sun, 10 Dec 2023 21:57:14 +0800 +Subject: [PATCH] -fallow-half-arguments-and-returns is not recognized by clang + +Reference: https://reviews.llvm.org/D145345 +Issue: https://github.com/ROCm/HIP/issues/3178 +Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> +--- + catch/unit/deviceLib/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/catch/unit/deviceLib/CMakeLists.txt b/catch/unit/deviceLib/CMakeLists.txt +index 0645def..3662cbd 100644 +--- catch/unit/deviceLib/CMakeLists.txt ++++ catch/unit/deviceLib/CMakeLists.txt +@@ -171,7 +171,6 @@ if(${ARCH_CHECK} GREATER_EQUAL 0) + set_source_files_properties(unsafeAtomicAdd_NonCoherent_withunsafeflag.cc PROPERTIES COMPILE_OPTIONS "-munsafe-fp-atomics") + set_source_files_properties(unsafeAtomicAdd_Coherent_withnounsafeflag.cc PROPERTIES COMPILE_OPTIONS "-mno-unsafe-fp-atomics") + set_source_files_properties(unsafeAtomicAdd_NonCoherent_withnounsafeflag.cc PROPERTIES COMPILE_OPTIONS "-mno-unsafe-fp-atomics") +- set_source_files_properties(hipMathFunctions.cc PROPERTIES COMPILE_FLAGS "-Xclang -fallow-half-arguments-and-returns") + file(GLOB AtomicAdd_files *AtomicAdd_*_*.cc) + set_property(SOURCE ${AtomicAdd_files} PROPERTY COMPILE_FLAGS --save-temps) + file(GLOB unsafeAtomicAdd_files *unsafeAtomicAdd_*_*.cc) +-- +2.42.0 diff --git a/dev-util/hip/files/hip-test-6.0.2-hipcc-system-install.patch b/dev-util/hip/files/hip-test-6.0.2-hipcc-system-install.patch new file mode 100644 index 000000000000..bf143939d13e --- /dev/null +++ b/dev-util/hip/files/hip-test-6.0.2-hipcc-system-install.patch @@ -0,0 +1,43 @@ +In Gentoo rocm_agent_enumerator is installed by rocminfo and is in PATH. + +Index: catch/CMakeLists.txt +=================================================================== +--- catch.orig/CMakeLists.txt ++++ catch/CMakeLists.txt +@@ -55,9 +55,9 @@ endif() + message(STATUS "HIP_PATH: ${HIP_PATH}") + message(STATUS "ROCM_PATH: ${ROCM_PATH}") + +-set(CMAKE_CXX_COMPILER "${HIP_PATH}/bin/hipcc${EXT}") +-set(CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc${EXT}") +-set(HIPCONFIG_EXECUTABLE "${HIP_PATH}/bin/hipconfig${EXT}") ++set(CMAKE_CXX_COMPILER "hipcc${EXT}") ++set(CMAKE_C_COMPILER "hipcc${EXT}") ++set(HIPCONFIG_EXECUTABLE "hipconfig${EXT}") + execute_process(COMMAND ${HIPCONFIG_EXECUTABLE} --version + OUTPUT_VARIABLE HIP_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) +@@ -183,9 +183,8 @@ message(STATUS "CMAKE HIP ARCHITECTURES: + # OFFLOAD_ARCH_STR + # rocm_agent_enumerator + if(NOT DEFINED OFFLOAD_ARCH_STR +- AND EXISTS "${ROCM_PATH}/bin/rocm_agent_enumerator" + AND HIP_PLATFORM STREQUAL "amd" AND UNIX) +- execute_process(COMMAND "${ROCM_PATH}/bin/rocm_agent_enumerator" ++ execute_process(COMMAND "rocm_agent_enumerator" + OUTPUT_VARIABLE HIP_GPU_ARCH + RESULT_VARIABLE ROCM_AGENT_ENUM_RESULT + OUTPUT_STRIP_TRAILING_WHITESPACE) +Index: catch/hipTestMain/hip_test_context.cc +=================================================================== +--- catch.orig/hipTestMain/hip_test_context.cc ++++ catch/hipTestMain/hip_test_context.cc +@@ -37,7 +37,7 @@ std::string TestContext::substringFound( + + std::string TestContext::getCurrentArch() { + #if HT_LINUX +- const char* cmd = "/opt/rocm/bin/rocm_agent_enumerator | sort -u | xargs | sed -e 's/ /;/g'"; ++ const char* cmd = "rocm_agent_enumerator | sort -u | xargs | sed -e 's/ /;/g'"; + std::array<char, 1024> buffer; + std::string result; + std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose); diff --git a/dev-util/hip/files/hip-test-6.1.0-disable-hipKerArgOptimization.patch b/dev-util/hip/files/hip-test-6.1.0-disable-hipKerArgOptimization.patch new file mode 100644 index 000000000000..cb65ebae62be --- /dev/null +++ b/dev-util/hip/files/hip-test-6.1.0-disable-hipKerArgOptimization.patch @@ -0,0 +1,24 @@ +Those tests requires >=clang-18 to support -amdgpu-kernarg-preload-count +index afdf8c4..28b0198 100644 +--- a/unit/module/CMakeLists.txt ++++ b/unit/module/CMakeLists.txt +@@ -41,9 +41,6 @@ add_custom_target(copyKernel.s + -I${CMAKE_CURRENT_SOURCE_DIR}/../../include --rocm-path=${ROCM_PATH}) + + if(UNIX) +-set(TEST_SRC +- ${TEST_SRC} +- hipKerArgOptimization.cc) + + add_custom_target(copiousArgKernel.code + COMMAND ${CMAKE_CXX_COMPILER} --genco ${OFFLOAD_ARCH_STR} +@@ -106,8 +103,4 @@ hip_add_exe_to_target(NAME ModuleTest + TEST_TARGET_NAME build_tests COMMON_SHARED_SRC ${COMMON_SHARED_SRC}) + + add_dependencies(build_tests copyKernel.code copyKernel.s) +-if(UNIX) +-add_dependencies(build_tests copiousArgKernel.code copiousArgKernel0.code copiousArgKernel1.code copiousArgKernel2.code +-copiousArgKernel3.code copiousArgKernel16.code copiousArgKernel17.code) + endif() +-endif() +\ No newline at end of file diff --git a/dev-util/hip/files/hip-test-6.1.1-fix-musl.patch b/dev-util/hip/files/hip-test-6.1.1-fix-musl.patch new file mode 100644 index 000000000000..c3f3e45efe4d --- /dev/null +++ b/dev-util/hip/files/hip-test-6.1.1-fix-musl.patch @@ -0,0 +1,159 @@ +Fix musl errors: +* reinterpret_cast from 'std::nullptr_t' to 'void **' is not allowed +* error.h is GNU extension + +Upstream PR: https://github.com/ROCm/hip-tests/pull/463 +--- a/unit/rtc/headers/printf_common.h ++++ b/unit/rtc/headers/printf_common.h +@@ -30,7 +30,6 @@ THE SOFTWARE. + #if defined(_WIN32) + #include <io.h> + #else +-#include <error.h> + #include <unistd.h> + #endif + +@@ -110,7 +109,7 @@ struct CaptureStream { + saved_fd = dup(orig_fd); + + if ((temp_fd = mkstemp(tempname)) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +@@ -118,11 +117,11 @@ struct CaptureStream { + void Begin() { + fflush(nullptr); + if (dup2(temp_fd, orig_fd) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + if (close(temp_fd) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +@@ -130,11 +129,11 @@ struct CaptureStream { + void End() { + fflush(nullptr); + if (dup2(saved_fd, orig_fd) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + if (close(saved_fd) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +@@ -148,7 +147,7 @@ struct CaptureStream { + + ~CaptureStream() { + if (remove(tempname) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +--- a/unit/memory/hipMemRangeGetAttributes_old.cc ++++ b/unit/memory/hipMemRangeGetAttributes_old.cc +@@ -268,7 +268,7 @@ TEST_CASE("Unit_hipMemRangeGetAttributes_NegativeTst") { + // Passing NULL as first parameter + SECTION("Passing NULL as first parameter") { + if (!CheckError(hipMemRangeGetAttributes( +- reinterpret_cast<void**>(NULL), ++ static_cast<void**>(NULL), + reinterpret_cast<size_t*>(dataSizes), + AttrArr, 4, Hmm, MEM_SIZE), + __LINE__)) { +--- a/unit/occupancy/hipOccupancyMaxActiveBlocksPerMultiprocessor_old.cc ++++ b/unit/occupancy/hipOccupancyMaxActiveBlocksPerMultiprocessor_old.cc +@@ -40,7 +40,7 @@ TEST_CASE("Unit_hipOccupancyMaxActiveBlocksPerMultiprocessor_Negative") { + ret = hipOccupancyMaxActiveBlocksPerMultiprocessor(NULL, f1, blockSize, 0); + REQUIRE(ret != hipSuccess); + +- ret = hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlock, NULL, blockSize, 0); ++ ret = hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlock, static_cast<void*>(NULL), blockSize, 0); + REQUIRE(ret != hipSuccess); + + ret = hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlock, f1, 0, 0); +--- a/unit/occupancy/hipOccupancyMaxPotentialBlockSize_old.cc ++++ b/unit/occupancy/hipOccupancyMaxPotentialBlockSize_old.cc +@@ -37,7 +37,7 @@ TEST_CASE("Unit_hipOccupancyMaxPotentialBlockSize_Negative") { + + #ifndef __HIP_PLATFORM_NVIDIA__ + // nvcc doesnt support kernelfunc(NULL) for api +- ret = hipOccupancyMaxPotentialBlockSize(&gridSize, &blockSize, NULL, 0, 0); ++ ret = hipOccupancyMaxPotentialBlockSize(&gridSize, &blockSize, static_cast<void*>(NULL), 0, 0); + REQUIRE(ret != hipSuccess); + #endif + } +--- a/unit/occupancy/hipOccupancyMaxActiveBlocksPerMultiprocessor.cc ++++ b/unit/occupancy/hipOccupancyMaxActiveBlocksPerMultiprocessor.cc +@@ -48,7 +48,7 @@ TEST_CASE("Unit_hipOccupancyMaxActiveBlocksPerMultiprocessor_Negative_Parameters + blockSize); + + SECTION("Kernel function is NULL") { +- HIP_CHECK_ERROR(hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, NULL, blockSize, 0), ++ HIP_CHECK_ERROR(hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, static_cast<void*>(NULL), blockSize, 0), + hipErrorInvalidDeviceFunction); + } + } +--- a/unit/kernel/printf_common.h ++++ b/unit/kernel/printf_common.h +@@ -24,7 +24,6 @@ THE SOFTWARE. + #define _STRESSTEST_PRINTF_COMMON_H_ + + #include <errno.h> +-#include <error.h> + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +@@ -47,17 +46,17 @@ struct CaptureStream { + saved_fd = dup(orig_fd); + + if ((temp_fd = mkstemp(tempname)) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + + fflush(nullptr); + if (dup2(temp_fd, orig_fd) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + if (close(temp_fd) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } +@@ -67,11 +66,11 @@ struct CaptureStream { + return; + fflush(nullptr); + if (dup2(saved_fd, orig_fd) == -1) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + if (close(saved_fd) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + saved_fd = -1; +@@ -90,7 +89,7 @@ struct CaptureStream { + ~CaptureStream() { + restoreStream(); + if (remove(tempname) != 0) { +- error(0, errno, "Error"); ++ fprintf(stderr, "Error: %s\n", strerror(errno)); + assert(false); + } + } diff --git a/dev-util/hip/hip-5.1.3-r4.ebuild b/dev-util/hip/hip-5.1.3-r4.ebuild index a8654a3e0568..764d4f49f49b 100644 --- a/dev-util/hip/hip-5.1.3-r4.ebuild +++ b/dev-util/hip/hip-5.1.3-r4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -51,7 +51,7 @@ PATCHES=( "${FILESDIR}/${PN}-5.1.3-fix-hip_prof_gen.patch" "${FILESDIR}/${PN}-5.1.3-correct-sample-install-location.patch" "${FILESDIR}/${PN}-5.1.3-remove-cmake-doxygen-commands.patch" - "${FILESDIR}/0001-SWDEV-316128-HIP-surface-API-support.patch" + "${FILESDIR}/${PN}-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch" "${FILESDIR}/${PN}-5.1.3-llvm-15-noinline-keyword.patch" ) diff --git a/dev-util/hip/hip-5.3.3-r3.ebuild b/dev-util/hip/hip-5.3.3-r3.ebuild index c03da0d6effc..fe717ad3b84c 100644 --- a/dev-util/hip/hip-5.3.3-r3.ebuild +++ b/dev-util/hip/hip-5.3.3-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -40,7 +40,7 @@ PATCHES=( "${FILESDIR}/${PN}-5.0.2-set-build-id.patch" "${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch" "${FILESDIR}/${PN}-5.3.3-disable-Werror.patch" - "${FILESDIR}/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" + "${FILESDIR}/${PN}-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" ) S="${WORKDIR}/hipamd-rocm-${PV}" @@ -78,9 +78,11 @@ src_prepare() { eapply "${FILESDIR}/${PN}-5.1.3-rocm-path.patch" eapply "${FILESDIR}/${PN}-5.1.3-fno-stack-protector.patch" eapply "${FILESDIR}/${PN}-5.3.3-correct-ldflag.patch" - eapply "${FILESDIR}/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch" - eapply "${FILESDIR}/0002-SWDEV-355608-Remove-clang-include-path-2996.patch" - eapply "${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" + + eapply "${FILESDIR}/${PN}-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch" + eapply "${FILESDIR}/${PN}-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch" + eapply "${FILESDIR}/${PN}-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" + eapply "${FILESDIR}/${PN}-5.4.3-fix-HIP_CLANG_PATH-detection.patch" # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include" # which makes "stdlib.h" not found when using "#include_next" in header files; diff --git a/dev-util/hip/hip-5.4.3.ebuild b/dev-util/hip/hip-5.4.3.ebuild index 7798aab3e444..3eb09247c48f 100644 --- a/dev-util/hip/hip-5.4.3.ebuild +++ b/dev-util/hip/hip-5.4.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -40,7 +40,7 @@ PATCHES=( "${FILESDIR}/${PN}-5.0.2-set-build-id.patch" "${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch" "${FILESDIR}/${PN}-5.3.3-disable-Werror.patch" - "${FILESDIR}/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" + "${FILESDIR}/${PN}-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" ) S="${WORKDIR}/hipamd-rocm-${PV}" @@ -80,7 +80,7 @@ src_prepare() { eapply "${FILESDIR}/${PN}-5.4.3-correct-ldflag.patch" eapply "${FILESDIR}/${PN}-5.4.3-clang-version.patch" eapply "${FILESDIR}/${PN}-5.4.3-clang-include.patch" - eapply "${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" + eapply "${FILESDIR}/${PN}-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" eapply "${FILESDIR}/${PN}-5.4.3-fix-HIP_CLANG_PATH-detection.patch" # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include" diff --git a/dev-util/hip/hip-5.5.1.ebuild b/dev-util/hip/hip-5.5.1.ebuild index 276e8628ad9c..3bb5b6bb99c9 100644 --- a/dev-util/hip/hip-5.5.1.ebuild +++ b/dev-util/hip/hip-5.5.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -40,7 +40,7 @@ PATCHES=( "${FILESDIR}/${PN}-5.0.2-set-build-id.patch" "${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch" "${FILESDIR}/${PN}-5.5.1-disable-Werror.patch" - #"${FILESDIR}/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" + # "${FILESDIR}/${PN}-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch" ) S="${WORKDIR}/hipamd-rocm-${PV}" @@ -80,7 +80,7 @@ src_prepare() { #eapply "${FILESDIR}/${PN}-5.4.3-correct-ldflag.patch" #eapply "${FILESDIR}/${PN}-5.4.3-clang-version.patch" #eapply "${FILESDIR}/${PN}-5.4.3-clang-include.patch" - #eapply "${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" + #eapply "${FILESDIR}/${PN}-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch" eapply "${FILESDIR}/${PN}-5.4.3-fix-HIP_CLANG_PATH-detection.patch" # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include" diff --git a/dev-util/hip/hip-5.7.1-r2.ebuild b/dev-util/hip/hip-5.7.1-r2.ebuild index c6c7376c0297..e5d5fee9a796 100644 --- a/dev-util/hip/hip-5.7.1-r2.ebuild +++ b/dev-util/hip/hip-5.7.1-r2.ebuild @@ -7,17 +7,17 @@ DOCS_BUILDER="doxygen" DOCS_DEPEND="media-gfx/graphviz" ROCM_SKIP_GLOBALS=1 -inherit cmake docs llvm rocm flag-o-matic +inherit cmake docs flag-o-matic llvm rocm LLVM_MAX_SLOT=17 TEST_PV=5.7.0 # No hip-test-5.7.1 release DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" -HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipamd" -SRC_URI="https://github.com/ROCm-Developer-Tools/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz - https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> hip-${PV}.tar.gz - test? ( https://github.com/ROCm-Developer-Tools/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz )" +HOMEPAGE="https://github.com/ROCm/hipamd" +SRC_URI="https://github.com/ROCm/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz + https://github.com/ROCm/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> hip-${PV}.tar.gz + test? ( https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz )" KEYWORDS="~amd64" LICENSE="MIT" @@ -27,7 +27,6 @@ RESTRICT="!test? ( test )" IUSE="debug test" DEPEND=" - dev-util/hipcc >=dev-util/rocminfo-5 sys-devel/clang:${LLVM_MAX_SLOT} dev-libs/rocm-comgr:${SLOT} @@ -35,7 +34,9 @@ DEPEND=" x11-base/xorg-proto virtual/opengl " +BDEPEND="test? ( =dev-util/hipcc-5* )" RDEPEND="${DEPEND} + =dev-util/hipcc-5* dev-perl/URI-Encode sys-devel/clang-runtime:= >=dev-libs/roct-thunk-interface-5" @@ -51,12 +52,12 @@ PATCHES=( ) S="${WORKDIR}/clr-rocm-${PV}/" +TEST_S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch" hip_test_wrapper() { - local S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch" - local CMAKE_USE_DIR="${S}" - local BUILD_DIR="${S}_build" - cd "${S}" || die + local CMAKE_USE_DIR="${TEST_S}" + local BUILD_DIR="${TEST_S}_build" + cd "${TEST_S}" || die $@ } @@ -66,8 +67,8 @@ src_prepare() { -e "s:#Set HIP_CLANG_PATH:set(HIP_CLANG_PATH \"$(get_llvm_prefix -d ${LLVM_MAX_SLOT})/bin\"):" \ -i "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP.cmake || die - # https://github.com/ROCm-Developer-Tools/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3 - # https://github.com/ROCm-Developer-Tools/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e + # https://github.com/ROCm/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3 + # https://github.com/ROCm/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e # Migrated to hip-test, but somehow the change is not applied to the tarball. rm -rf "${WORKDIR}"/HIP-rocm-${PV}/tests || die sed -e '/tests.*cmake/d' -i hipamd/CMakeLists.txt || die @@ -75,8 +76,11 @@ src_prepare() { cmake_src_prepare if use test; then - PATCHES=${FILESDIR}/hip-test-5.7.0-rocm_agent_enumerator-location.patch \ - hip_test_wrapper cmake_src_prepare + local PATCHES=( + "${FILESDIR}"/hip-test-5.7.0-rocm_agent_enumerator-location.patch \ + "${FILESDIR}"/hip-test-5.7.1-remove-incompatible-flag.patch + ) + hip_test_wrapper cmake_src_prepare fi } @@ -115,6 +119,7 @@ src_configure() { local mycmakeargs=( -DROCM_PATH="${BUILD_DIR}"/hipamd -DHIP_PLATFORM=amd + -DCMAKE_MODULE_PATH="${TEST_S}/external/Catch2/cmake/Catch2" ) hip_test_wrapper cmake_src_configure fi @@ -167,7 +172,7 @@ EOF rm "${ED}/usr/include/hip/hcc_detail" || die - # files already installed by hipcc, which is a build dep + # files already installed by hipcc, which is a runtime dep rm "${ED}/usr/bin/hipconfig.pl" || die rm "${ED}/usr/bin/hipcc.pl" || die rm "${ED}/usr/bin/hipcc" || die diff --git a/dev-util/hip/hip-6.0.0.ebuild b/dev-util/hip/hip-6.0.0.ebuild deleted file mode 100644 index ff53e07dc49a..000000000000 --- a/dev-util/hip/hip-6.0.0.ebuild +++ /dev/null @@ -1,164 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DOCS_BUILDER="doxygen" -DOCS_DEPEND="media-gfx/graphviz" -ROCM_SKIP_GLOBALS=1 - -inherit cmake docs flag-o-matic llvm rocm - -LLVM_MAX_SLOT=17 - -TEST_PV=5.7.0 # No hip-test-5.7.1 release - -DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" -HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipamd" -SRC_URI="https://github.com/ROCm-Developer-Tools/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz - https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> hip-${PV}.tar.gz - test? ( https://github.com/ROCm-Developer-Tools/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz )" - -KEYWORDS="~amd64" -LICENSE="MIT" -SLOT="0/$(ver_cut 1-2)" - -RESTRICT="!test? ( test )" -IUSE="debug test" - -DEPEND=" - dev-util/hipcc - >=dev-util/rocminfo-5 - sys-devel/clang:${LLVM_MAX_SLOT} - dev-libs/rocm-comgr:${SLOT} - >=dev-libs/rocr-runtime-5.6 - x11-base/xorg-proto - virtual/opengl -" -RDEPEND="${DEPEND} - dev-perl/URI-Encode - sys-devel/clang-runtime:= - >=dev-libs/roct-thunk-interface-5" - -PATCHES=( - "${FILESDIR}/${PN}-5.7.0-install.patch" - "${FILESDIR}/${PN}-5.7.1-fix-unaligned-access.patch" - "${FILESDIR}/${PN}-5.7.1-exec-stack.patch" - "${FILESDIR}/${PN}-5.7.1-disable-stack-protector.patch" - "${FILESDIR}/${PN}-5.7.1-no_asan_doc.patch" - "${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch" -) - -S="${WORKDIR}/clr-rocm-${PV}/" - -hip_test_wrapper() { - local S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch" - local CMAKE_USE_DIR="${S}" - local BUILD_DIR="${S}_build" - cd "${S}" || die - $@ -} - -src_prepare() { - # hipamd is itself built by cmake, and should never provide a - # FindHIP.cmake module. - rm -r "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP* || die - - # https://github.com/ROCm-Developer-Tools/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3 - # https://github.com/ROCm-Developer-Tools/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e - # Migrated to hip-test, but somehow the change is not applied to the tarball. - rm -rf "${WORKDIR}"/HIP-rocm-${PV}/tests || die - sed -e '/tests.*cmake/d' -i hipamd/CMakeLists.txt || die - - cmake_src_prepare - - if use test; then - PATCHES=${FILESDIR}/hip-test-5.7.0-rocm_agent_enumerator-location.patch \ - hip_test_wrapper cmake_src_prepare - fi -} - -src_configure() { - # -Werror=strict-aliasing - # https://bugs.gentoo.org/858383 - # https://github.com/ROCm/clr/issues/64 - # - # Do not trust it for LTO either - append-flags -fno-strict-aliasing - filter-lto - - use debug && CMAKE_BUILD_TYPE="Debug" - - # Fix ld.lld linker error: https://github.com/ROCm/HIP/issues/3382 - # See also: https://github.com/gentoo/gentoo/pull/29097 - append-ldflags $(tc-flags-CCLD -Wl,--undefined-version) - - local mycmakeargs=( - -DCMAKE_PREFIX_PATH="$(get_llvm_prefix "${LLVM_MAX_SLOT}")" - -DCMAKE_BUILD_TYPE=${buildtype} - -DCMAKE_SKIP_RPATH=ON - -DBUILD_HIPIFY_CLANG=OFF - -DHIP_PLATFORM=amd - -DHIP_COMMON_DIR="${WORKDIR}/HIP-rocm-${PV}" - -DROCM_PATH="${EPREFIX}/usr" - -DUSE_PROF_API=0 - -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF - -DCLR_BUILD_HIP=ON - -DHIPCC_BIN_DIR="${EPREFIX}/usr/bin" - -DOpenGL_GL_PREFERENCE="GLVND" - ) - - cmake_src_configure - - if use test; then - local mycmakeargs=( - -DROCM_PATH="${BUILD_DIR}"/hipamd - -DHIP_PLATFORM=amd - ) - hip_test_wrapper cmake_src_configure - fi -} - -src_compile() { - cmake_src_compile - - if use test; then - HIP_PATH="${BUILD_DIR}"/hipamd \ - hip_test_wrapper cmake_src_compile build_tests - fi -} - -src_test() { - check_amdgpu - export LD_LIBRARY_PATH="${BUILD_DIR}/hipamd/lib" - - # TODO: research how to test Vulkan-related features. - local CMAKE_SKIP_TESTS=( - Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Positive_Read_Write - Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Negative_Parameters - Unit_hipImportExternalMemory_Vulkan_Negative_Parameters - Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore - Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores - Unit_hipWaitExternalSemaphoresAsync_Vulkan_Negative_Parameters - Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore - Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores - Unit_hipSignalExternalSemaphoresAsync_Vulkan_Negative_Parameters - Unit_hipImportExternalSemaphore_Vulkan_Negative_Parameters - Unit_hipDestroyExternalSemaphore_Vulkan_Negative_Parameters - ) - - MAKEOPTS="-j1" hip_test_wrapper cmake_src_test -} - -src_install() { - cmake_src_install - - # files already installed by hipcc, which is a build dep - rm "${ED}/usr/bin/hipconfig.pl" || die - rm "${ED}/usr/bin/hipcc.pl" || die - rm "${ED}/usr/bin/hipcc" || die - rm "${ED}/usr/bin/hipcc.bin" || die - rm "${ED}/usr/bin/hipconfig" || die - rm "${ED}/usr/bin/hipconfig.bin" || die - rm "${ED}/usr/bin/hipvars.pm" || die -} diff --git a/dev-util/hip/hip-6.1.1.ebuild b/dev-util/hip/hip-6.1.1.ebuild new file mode 100644 index 000000000000..eab3697cf4ef --- /dev/null +++ b/dev-util/hip/hip-6.1.1.ebuild @@ -0,0 +1,238 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DOCS_BUILDER="doxygen" +DOCS_DEPEND="media-gfx/graphviz" +ROCM_SKIP_GLOBALS=1 + +LLVM_COMPAT=( 18 ) + +inherit cmake docs flag-o-matic llvm-r1 rocm + +TEST_PV=${PV} + +DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" +HOMEPAGE="https://github.com/ROCm/clr" +SRC_URI=" + https://github.com/ROCm/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz + https://github.com/ROCm/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> hip-${PV}.tar.gz + test? ( + https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz -> hip-test-${TEST_PV}.tar.gz + ) +" +S="${WORKDIR}/clr-rocm-${PV}/" +TEST_S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" + +IUSE="debug +hip opencl test video_cards_amdgpu video_cards_nvidia" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + || ( hip opencl ) + ^^ ( video_cards_amdgpu video_cards_nvidia ) +" + +DEPEND=" + video_cards_amdgpu? ( + >=dev-util/rocminfo-5 + $(llvm_gen_dep ' + sys-devel/clang:${LLVM_SLOT} + ') + dev-libs/rocm-comgr:${SLOT} + dev-libs/rocr-runtime:${SLOT} + ) + video_cards_nvidia? ( + dev-libs/hipother:${SLOT} + ) + x11-base/xorg-proto + virtual/opengl +" +BDEPEND=" + video_cards_amdgpu? ( + dev-util/hipcc:${SLOT}[${LLVM_USEDEP}] + ) +" +RDEPEND="${DEPEND} + sys-devel/clang-runtime:= + video_cards_amdgpu? ( + dev-util/hipcc:${SLOT}[${LLVM_USEDEP}] + >=dev-libs/rocm-device-libs-${PV} + >=dev-libs/roct-thunk-interface-5 + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.7.1-no_asan_doc.patch" + "${FILESDIR}/${PN}-6.1.0-install.patch" + "${FILESDIR}/${PN}-6.1.1-fix-musl.patch" +) + +hip_test_wrapper() { + local CMAKE_USE_DIR="${TEST_S}" + local BUILD_DIR="${TEST_S}_build" + cd "${TEST_S}" || die + "${@}" +} + +src_prepare() { + # NOTE We do this head stand to safe the patch size. + # NOTE Adjust when we drop 5.7.1 + sed \ + -e 's:kAmdgcnTargetTriple:AMDGCN_TARGET_TRIPLE:g' \ + -i hipamd/src/hip_code_object.cpp || die + eapply "${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch" + sed \ + -e 's:AMDGCN_TARGET_TRIPLE:kAmdgcnTargetTriple:g' \ + -i hipamd/src/hip_code_object.cpp || die + + # hipamd is itself built by cmake, and should never provide a + # FindHIP.cmake module. But the reality is some package relies on it. + # Set HIP and HIP Clang paths directly, don't search using heuristics + sed -e "s:# Search for HIP installation:set(HIP_ROOT_DIR \"${EPREFIX}/usr\"):" \ + -e "s:#Set HIP_CLANG_PATH:set(HIP_CLANG_PATH \"$(get_llvm_prefix -d)/bin\"):" \ + -i "${WORKDIR}/HIP-rocm-${PV}/cmake/FindHIP.cmake" || die + + cmake_src_prepare + + # With Clang>17 -amdgpu-early-inline-all=true causes OOMs in dependencies + # https://github.com/llvm/llvm-project/issues/86332 + if [ "$LLVM_SLOT" -le "17" ]; then + sed -e "s/-mllvm=-amdgpu-early-inline-all=true //" -i hipamd/hip-config-amd.cmake || die + sed -e "s/-mllvm=-amdgpu-early-inline-all=true;//" -i "${WORKDIR}/HIP-rocm-${PV}/hip-lang-config.cmake.in" + fi + + if use test; then + local PATCHES=( + "${FILESDIR}"/hip-test-6.0.2-hipcc-system-install.patch + "${FILESDIR}"/hip-test-5.7.1-remove-incompatible-flag.patch + "${FILESDIR}"/hip-test-6.1.0-disable-hipKerArgOptimization.patch + "${FILESDIR}"/hip-test-6.1.1-fix-musl.patch + ) + hip_test_wrapper cmake_src_prepare + fi +} + +src_configure() { + # -Werror=strict-aliasing + # https://bugs.gentoo.org/858383 + # https://github.com/ROCm/clr/issues/64 + # + # Do not trust it for LTO either + append-flags -fno-strict-aliasing + filter-lto + + use debug && CMAKE_BUILD_TYPE="Debug" + + # Fix ld.lld linker error: https://github.com/ROCm/HIP/issues/3382 + # See also: https://github.com/gentoo/gentoo/pull/29097 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + local mycmakeargs=( + -DCMAKE_PREFIX_PATH="$(get_llvm_prefix)" + -DCMAKE_SKIP_RPATH=ON + -D__HIP_ENABLE_PCH="no" + + -DCLR_BUILD_HIP="$(usex hip)" + -DCLR_BUILD_OCL="$(usex opencl)" + + -DHIP_COMMON_DIR="${WORKDIR}/HIP-rocm-${PV}" + -DHIPCC_BIN_DIR="${EPREFIX}/usr/bin" + -DROCM_PATH="${EPREFIX}/usr" + -DUSE_PROF_API="no" + -DFILE_REORG_BACKWARD_COMPATIBILITY="no" + + -DOpenGL_GL_PREFERENCE="GLVND" + -DCMAKE_DISABLE_FIND_PACKAGE_Git="yes" + ) + + if use video_cards_amdgpu; then + mycmakeargs+=( + -DHIP_PLATFORM="amd" + ) + elif use video_cards_nvidia; then + mycmakeargs+=( + -DHIPNV_DIR="${EPREFIX}/usr" + -DHIP_PLATFORM="nvidia" + ) + fi + + cmake_src_configure + + if use test; then + local mycmakeargs=( + -DCMAKE_MODULE_PATH="${TEST_S}/external/Catch2/cmake/Catch2" + ) + if use video_cards_amdgpu; then + mycmakeargs+=( + -DROCM_PATH="${BUILD_DIR}/hipamd" + -DHIP_PLATFORM="amd" + ) + elif use video_cards_nvidia; then + mycmakeargs+=( + -DROCM_PATH="${BUILD_DIR}/hipother" + -DHIP_PLATFORM="nvidia" + ) + fi + HIP_PATH="${EPREFIX}/usr" hip_test_wrapper cmake_src_configure + fi +} + +src_compile() { + cmake_src_compile + + if use test; then + HIP_PATH="${BUILD_DIR}"/hipamd \ + hip_test_wrapper cmake_src_compile build_tests + fi +} + +src_test() { + check_amdgpu + export LD_LIBRARY_PATH="${BUILD_DIR}/hipamd/lib" + + # TODO: research how to test Vulkan-related features. + local CMAKE_SKIP_TESTS=( + Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Positive_Read_Write + Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Negative_Parameters + Unit_hipImportExternalMemory_Vulkan_Negative_Parameters + Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore + Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores + Unit_hipWaitExternalSemaphoresAsync_Vulkan_Negative_Parameters + Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore + Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores + Unit_hipSignalExternalSemaphoresAsync_Vulkan_Negative_Parameters + Unit_hipImportExternalSemaphore_Vulkan_Negative_Parameters + Unit_hipDestroyExternalSemaphore_Vulkan_Negative_Parameters + ) + + MAKEOPTS="-j1" hip_test_wrapper cmake_src_test +} + +src_install() { + cmake_src_install + + # add version file that is required by some libraries + mkdir "${ED}"/usr/include/rocm-core || die + cat <<-EOF > "${ED}"/usr/include/rocm-core/rocm_version.h || die + #pragma once + #define ROCM_VERSION_MAJOR $(ver_cut 1) + #define ROCM_VERSION_MINOR $(ver_cut 2) + #define ROCM_VERSION_PATCH $(ver_cut 3) + #define ROCM_BUILD_INFO "$(ver_cut 1-3).0-9999-unknown" + EOF + + dosym -r /usr/include/rocm-core/rocm_version.h /usr/include/rocm_version.h + + if use video_cards_nvidia; then + newenvd - 99hipconfig <<-EOF + HIP_PLATFORM="nvidia" + HIP_RUNTIME="cuda" + CUDA_PATH="${EPREFIX}/opt/cuda" + EOF + fi +} diff --git a/dev-util/hip/metadata.xml b/dev-util/hip/metadata.xml index 21b0e03f6a41..8746df97725c 100644 --- a/dev-util/hip/metadata.xml +++ b/dev-util/hip/metadata.xml @@ -17,7 +17,17 @@ <email>gentoo@holzke.net</email> <name>Wilfried Holzke</name> </maintainer> + <maintainer type="person"> + <email>lockalsash@gmail.com</email> + <name>Sv. Lockal</name> + </maintainer> <upstream> - <remote-id type="github">ROCm-Developer-Tools/HIP</remote-id> + <remote-id type="github">ROCm/HIP</remote-id> </upstream> + <use> + <flag name="hip">Build HIP runtime</flag> + <flag name="opencl">Build OpenCL runtime</flag> + <flag name="video_cards_amdgpu">Build for AMD platform</flag> + <flag name="video_cards_nvidia">Build for Nvidia platform</flag> + </use> </pkgmetadata> diff --git a/dev-util/hipcc/Manifest b/dev-util/hipcc/Manifest index 3c95471bd0e7..aadfbc006417 100644 --- a/dev-util/hipcc/Manifest +++ b/dev-util/hipcc/Manifest @@ -1,7 +1,7 @@ AUX hipcc-5.7.1-fno-stack-protector.patch 499 BLAKE2B d848b79ad2fd542bc6e6595ebc7dbd240b23aa2903aae31a0583b7beba032d8f4999142b932e9a443415bdb7ae4fe06f9e7da607c402109e3b887fef741d460f SHA512 a115cc8c9779cd318e7806d78a8aa99f03596258f8d3b105231dd6b1f9d3168687c305d1ec1c95902f841bb18570f943d3a655a03504f19a6f6ca7419d9272fd AUX hipcc-5.7.1-hipcc-hip-version.patch 2245 BLAKE2B 85e41db593706478e92966ee2ee33e1e8c8309251446f14192083a81e35f43be5dfa23337abc8371147b59c9399be79f9461cadf7ba0e025f1355d6c9836d68e SHA512 2cbfdeb9361b38a32ef52dec0c899c7cadc7220a5213fd6e9670c8a9ea6690e80e956d236e0de893bc4fe19117466659bdfdb2e16e720011b7480bc2e8bee458 DIST hipcc-5.7.1.tar.gz 36589 BLAKE2B a8ae6bd9f0f985d78119223b67b5b35b8d1ee38edb7e43c1e77752d203fe2c8b669b3bcff0cec661054d8cb24f799e7784a49eb0664bdd1dc2bf024ce026c175 SHA512 2d232c8dd4a47de6e0cff9d37b4e63a26cb1809ef2ff3a119c15e992cae96ffc2f4d8c1ddffd8732dea3a3d589a93e177f424a6174f982908aa50904e265432a -DIST hipcc-6.0.0.tar.gz 36648 BLAKE2B d4b67a962e61da5e96423191dad13e90c6aaec890a2b0dccb83ec4b3a9551ed9e2050bdc747fe7c79627d51b62408918157114f954aa579097163af2fc0b06e8 SHA512 e5307c880c96906d216b44b7bb269756e713cf45f5c72fc5dfc31f1e69d8e5e2cc8022bca289dc2b0a1bd72f86ddbdbb29dfda45010d4e4a4fb77096c9c93621 +DIST llvm-project-rocm-6.1.1.tar.gz 196027084 BLAKE2B 3ef0b6e3c47c66fd80289373e6ff8aaff44751f9b380addfae73a18dc388093c0535f230b0cc7528724bc43f6992e2ae6decd3d0d3c700893ca95a6166b7b8dc SHA512 e320d4eeaa6f61ed1cdbf653d67fe887d3ce9dc0d6743b4713502e1cb5318ab8afbe1ee71f8cba07635c54ce532df6683de40ade0e5be4a52e50ce25a9b70818 EBUILD hipcc-5.7.1-r3.ebuild 1168 BLAKE2B 480af07e6feb93e684ff7de07efada9231d43296bfc498267c8d758a25d2690779b7d3bd9f872290f86a8621fa1e519d37d0712200ac0a2cb57c915942b2b3e0 SHA512 c3c3abb00fee6fcc593df78dad13b5ec8a144ed92439942512c67d9fb369dec7f8fa055075a0121a3b08823e236560d256741b1243fb14a3e643cda929f90650 -EBUILD hipcc-6.0.0.ebuild 1254 BLAKE2B 717f472afefd65ffc96a22b9f0701edd35c18df2d2cdc782ff5786c7c04d97f16c1c566b43d787f2555fd99fb3167541c85b531af5200bf2b810fdb185403582 SHA512 d9d043e58856cd1b4e64505d165fa40b15f95e8b4dde1c4966cc2d55257fbb42fb160bf09004b91dde747286839d8668149f1270a3880230646afd2a5133a4de -MISC metadata.xml 845 BLAKE2B 108a9ee40f02d5e190f4d1ee11eea32aaec844c63811265d52046bdb266f6cddfb1774419feace41aaa2bacfd01581847f655aa5fc49536968c54e7f023d49ae SHA512 2b7bbe1205b4a07b81e6c0f4cc2c224a573a03004ce808b4d1ef51ea1b0bec770545b7c46530a1b18222cd67854f790ae44695dd39ef2201d7f3e3ea3ada904f +EBUILD hipcc-6.1.1.ebuild 2024 BLAKE2B 9cad5c85c2795a692878aa46b3b578e518e4ed8f2443d55d62408c16e0b3561417d34939dd52f26980f8fabf04b7d70ec53263fe47710bcff3b51eb8163609b5 SHA512 b09ef0e288403be4beaecd59d41a3c44e17c3543b3ff3f9fe59e4a7de44d54fca98d82fb5c12c834fa2246e301ac4d137e7bb54558a5a4b79a8578c82f4cd12b +MISC metadata.xml 942 BLAKE2B 56fe9d0c0615796d69d11ced9aa54834f9e3cb649786cc117bb2628086be15e1bc2dfb8e96fc93a043603ab34abec04a8bb1592b101444ea077ba0d73e55c374 SHA512 84bac9774f2d0dfec093c0269fe76662dc12a44fa3d4861152c6a076165d44af399cdcb134bea93d094b9b9d0094bec6ba72f6f81ad29b7467ce5262348ba263 diff --git a/dev-util/hipcc/hipcc-6.0.0.ebuild b/dev-util/hipcc/hipcc-6.0.0.ebuild deleted file mode 100644 index 088297598782..000000000000 --- a/dev-util/hipcc/hipcc-6.0.0.ebuild +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake llvm - -LLVM_MAX_SLOT=17 - -DESCRIPTION="Radeon Open Compute hipcc" -HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipcc" - -KEYWORDS="~amd64" -SRC_URI="https://github.com/ROCm-Developer-Tools/hipcc/archive/refs/tags/rocm-${PV}.tar.gz -> hipcc-${PV}.tar.gz" - -LICENSE="Apache-2.0 MIT" -SLOT="0/$(ver_cut 1-2)" -IUSE="debug test" -RESTRICT="!test? ( test )" - -S=${WORKDIR}/HIPCC-rocm-${PV} - -DEPEND="<sys-devel/llvm-18:= - <sys-devel/clang-18:= - " -RDEPEND="${DEPEND} - !<dev-util/hip-5.7" - -PATCHES=( - "${FILESDIR}/${PN}-5.7.1-fno-stack-protector.patch" - "${FILESDIR}/${PN}-5.7.1-hipcc-hip-version.patch" -) - -src_prepare() { - cmake_src_prepare - - sed -e "s:\$ROCM_PATH/llvm/bin:$(get_llvm_prefix ${LLVM_MAX_SLOT})/bin:" \ - -i bin/hipvars.pm || die - - sed -e "s:\$ENV{'DEVICE_LIB_PATH'}:'${EPREFIX}/usr/lib/amdgcn/bitcode':" \ - -e "s:\$ENV{'HIP_LIB_PATH'}:'${EPREFIX}/usr/$(get_libdir)':" \ - -e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \ - -e 's:${ROCM_PATH}/usr/bin/rocm_agent_enumerator:/usr/bin/rocm_agent_enumerator:' \ - -i bin/hipcc.pl || die -} - -src_install() { - cmake_src_install - # rm unwanted copy - rm -rf "${ED}/usr/hip" || die -} diff --git a/dev-util/hipcc/hipcc-6.1.1.ebuild b/dev-util/hipcc/hipcc-6.1.1.ebuild new file mode 100644 index 000000000000..87a19b598953 --- /dev/null +++ b/dev-util/hipcc/hipcc-6.1.1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 18 ) +inherit cmake perl-functions llvm-r1 + +DESCRIPTION="Radeon Open Compute hipcc" +HOMEPAGE="https://github.com/ROCm/hipcc" + +MY_P=llvm-project-rocm-${PV} +components=( "amd/hipcc" ) +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/ROCm/llvm-project" + inherit git-r3 + S="${WORKDIR}/${P}/${components[0]}" +else + SRC_URI="https://github.com/ROCm/llvm-project/archive/rocm-${PV}.tar.gz -> ${MY_P}.tar.gz" + S="${WORKDIR}/${MY_P}/${components[0]}" + KEYWORDS="~amd64" +fi + +LICENSE="Apache-2.0 MIT" +SLOT="0/$(ver_cut 1-2)" +IUSE="debug test" +RESTRICT="!test? ( test )" + +DEPEND=" + $(llvm_gen_dep ' + sys-libs/compiler-rt:${LLVM_SLOT}= + sys-devel/llvm:${LLVM_SLOT}= + sys-devel/clang:${LLVM_SLOT}= + ') +" +RDEPEND="${DEPEND} + !<dev-util/hip-5.7" + +PATCHES=( + "${FILESDIR}/${PN}-5.7.1-hipcc-hip-version.patch" +) + +src_unpack() { + if [[ ${PV} == *9999 ]] ; then + git-r3_fetch + git-r3_checkout '' . '' "${components[@]}" + else + archive="${MY_P}.tar.gz" + ebegin "Unpacking from ${archive}" + tar -x -z -o \ + -f "${DISTDIR}/${archive}" \ + "${components[@]/#/${MY_P}/}" || die + eend ${?} + fi +} + +src_prepare() { + cmake_src_prepare + + sed -e "s:\$ROCM_PATH/llvm/bin:$(get_llvm_prefix)/bin:" \ + -e "s:/opt/rocm:/usr:" \ + -i bin/hipvars.pm || die + + sed -e "s:\$ENV{'DEVICE_LIB_PATH'}:'${EPREFIX}/usr/lib/amdgcn/bitcode':" \ + -e "s:\$ENV{'HIP_LIB_PATH'}:'${EPREFIX}/usr/$(get_libdir)':" \ + -e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \ + -i bin/hipcc.pl || die + + # With Clang>17 -amdgpu-early-inline-all=true causes OOMs in dependencies + # https://github.com/llvm/llvm-project/issues/86332 + if [ "$LLVM_SLOT" != "17" ]; then + sed -e "s/-mllvm -amdgpu-early-inline-all=true //g" -i bin/hipcc.pl || die + fi +} + +src_install() { + cmake_src_install + # rm unwanted copy + rm -rf "${ED}/usr/hip" || die + # Handle hipvars.pm + rm "${ED}/usr/bin/hipvars.pm" || die + perl_domodule "${S}"/bin/hipvars.pm +} diff --git a/dev-util/hipcc/metadata.xml b/dev-util/hipcc/metadata.xml index d280423bad96..b6d25312b735 100644 --- a/dev-util/hipcc/metadata.xml +++ b/dev-util/hipcc/metadata.xml @@ -21,7 +21,11 @@ <email>gentoo@holzke.net</email> <name>Wilfried Holzke</name> </maintainer> + <maintainer type="person"> + <email>lockalsash@gmail.com</email> + <name>Sv. Lockal</name> + </maintainer> <upstream> - <remote-id type="github">ROCm-Developer-Tools/hipcc</remote-id> + <remote-id type="github">ROCm/hipcc</remote-id> </upstream> </pkgmetadata> diff --git a/dev-util/hipify-clang/Manifest b/dev-util/hipify-clang/Manifest index f9489960373f..2a9ac02ed62c 100644 --- a/dev-util/hipify-clang/Manifest +++ b/dev-util/hipify-clang/Manifest @@ -1,4 +1,6 @@ AUX hipify-clang-5.7.1-fix-clang-libs.patch 1298 BLAKE2B 3f6d24300e50d4144c60635045ae0d6c84a1e153607e6779180065c4158afe33a8e8df642eda9c84d1eb189b9ec00eba0614060fc7b3f9136b92b163b932bae5 SHA512 8af2408124e5caca08ea7f72a95dfed816bae4dd07effdc04562f24f209ba5ce57b5e5875f0e03a5560c09d6d3718921bfbb56dc2b55db926aa618486d00032c DIST HIPIFY-5.7.1.tar.gz 673452 BLAKE2B e0293c1b7f9ea028efc8d712ddedae4ec933c5bcfba524e13816bd999e67bcf06097f9fe0e4d1f4fa6a38df133be694e92adeefd92f77301d8537b6880b1a1fe SHA512 0cc75fdbcb6278d319cfe8ee3c8547dc75ea494a007d2159c64312c3411627905e0d6c7d7f0032cbc4c727a90723325aa2705db2fd473dbeb41e60f276d1c9a7 +DIST HIPIFY-6.1.1.tar.gz 813425 BLAKE2B accc661431f11796d0c8bcf638537a6035020b2a36ebe66c1b8c10bb63b762418d5fd1f256f3a3e51d2ace224a6492abfe72838bef859b1da68c2126cc3521be SHA512 29c45e312c8e2f0d06916b57f24eba27ba7beae3bd860850b57cfe27c87df22aabe9fdcf3d12671b81e68b61c3974aaf0064e96ae68392d181148aaeef14f1c7 EBUILD hipify-clang-5.7.1.ebuild 1037 BLAKE2B c13330ff2f0ce915b37841abde52c70cf8907a674969ba5ed929702dbe180e1166b7c62b7dc0bd6f8df2af6e4689337d22cf1e247f27f7d0c72d0cf5c59c23a4 SHA512 24caa7e7007d9ae952e976b5b5d86912cc7780dec7e04a001707d24840d98369799f6766ca85eb242ad04b8e5c8faf7a72fae1d315f42ce1608d81d896ca2fc1 -MISC metadata.xml 469 BLAKE2B b62d4ab1829968943d48809f2059527b44d464e8b0e089214ec3fb8fcde1d5f380045a68978be63e3e149243f5d57e1cd4958943d0cff97a882711d688870800 SHA512 c8a00d04d7f41f47b636c367f6d7c41d2bd750650af98182c250bcd9d687af64d408b9031bcd1df480746c04ffa9f0ff07bc02250cf98a6f33bf21d1b714ea2d +EBUILD hipify-clang-6.1.1.ebuild 1057 BLAKE2B e4357b90e71c1b177c1cde5373ae9c84ec9f9e3ff8ca47b5d48c482d7f59e4b17a9337d31f6cc6c1cd86007f9360d5e9ffde11835ad66a809ca19bb44694fdfc SHA512 2530656d0a68d34cef1a9d5b810b57b79daa807c368ebd1dcc53b1f9c893b58e869323729df2217f9717213b3434799aac71aacec00728c51f1d50c33ee33454 +MISC metadata.xml 453 BLAKE2B b7719f4627bf53a6b4bb0c5255860382008294b3e5abf41512f62a0b55f0de6e5f5859472cb4352ecbab2139c27b68015922baec4c75a45cc4d078257a1bf846 SHA512 33d3fe6ab49e832e97c122f0eca8292b9129396d9ffec137516259fc5d12924062bbd8fe600da6f1685f954bcb61b466f5631db661023ceb507151c7741c33ce diff --git a/dev-util/hipify-clang/hipify-clang-6.1.1.ebuild b/dev-util/hipify-clang/hipify-clang-6.1.1.ebuild new file mode 100644 index 000000000000..ca0eeb20cc2a --- /dev/null +++ b/dev-util/hipify-clang/hipify-clang-6.1.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 18 ) + +inherit cmake llvm-r1 + +DESCRIPTION="A set of tools to translate CUDA source code into portable HIP C++" +HOMEPAGE="https://github.com/ROCm/HIPIFY" +SRC_URI="https://github.com/ROCm/HIPIFY/archive/rocm-${PV}.tar.gz -> HIPIFY-${PV}.tar.gz" +S="${WORKDIR}/HIPIFY-rocm-${PV}" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" + +BDEPEND=">=dev-build/cmake-3.22" +DEPEND=" + $(llvm_gen_dep ' + sys-devel/clang:${LLVM_SLOT}= + sys-devel/llvm:${LLVM_SLOT}= + ') +" + +PATCHES=( + "${FILESDIR}/${PN}-5.7.1-fix-clang-libs.patch" +) + +src_prepare() { + cmake_src_prepare + sed -i 's:/../libexec/hipify::' \ + bin/hipconvertinplace.sh bin/hipconvertinplace-perl.sh \ + bin/hipexamine-perl.sh bin/hipexamine.sh || die +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_PREFIX_PATH="$(get_llvm_prefix)/$(get_libdir)/cmake/llvm" + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # rm unwanted copy + rm -rf "${ED}/usr/hip" || die +} diff --git a/dev-util/hipify-clang/metadata.xml b/dev-util/hipify-clang/metadata.xml index 82e35f93e198..4d4ce95c15e4 100644 --- a/dev-util/hipify-clang/metadata.xml +++ b/dev-util/hipify-clang/metadata.xml @@ -10,6 +10,6 @@ <name>Sv. Lockal</name> </maintainer> <upstream> - <remote-id type="github">ROCm-Developer-Tools/HIPIFY</remote-id> + <remote-id type="github">ROCm/HIPIFY</remote-id> </upstream> </pkgmetadata> diff --git a/dev-util/makeheaders/Manifest b/dev-util/makeheaders/Manifest index 05530142f4c7..37c536954beb 100644 --- a/dev-util/makeheaders/Manifest +++ b/dev-util/makeheaders/Manifest @@ -3,5 +3,5 @@ DIST makeheaders-0_p20220411.html 40335 BLAKE2B 6eec5080226d7759e8bdf97b2238fb33 DIST makeheaders-262696252dc50250c896c90cc240dcd946614b9c7727902aa7606640507e9231.html 40335 BLAKE2B 6eec5080226d7759e8bdf97b2238fb33e85700d29b0b539fcb797fa219d9d00461aafdabf2642e2cf1a622cf633cf889d71381bb3342113736ddfdafca3582de SHA512 6cccd5388e8af6f814d735c643abb231dab21a16799fba080858b15885a77b99bf37a5c7bac72958bbfcacea2ed54635ccc6323f5c7d47e2a1a73fffa8952504 DIST makeheaders-cae894dc3611ee6e0fba4100c0e377fcd3bbc6d8ddb91c997939ce439c50cee2.c 101039 BLAKE2B bff701e0230351b268591c24b3ae255916c0ffcb740375f9029d706b41a4c2a091330d74eee9ff687ff2237b53ebd94913a2e43213315fb01ec862c158b01b63 SHA512 0673648b1d3bb0e665edf05dd8c3075e4e4fa52acd1a051caa1018680d4969d5189c4750d7c36d59ddaa79646432cb75fcfec8181eabca804c56d81b4d8f6600 EBUILD makeheaders-0_p20220411.ebuild 1176 BLAKE2B 7bece779ad96d2b54cda9b9842a0ac383bf50700fc7d9db13dbb77c274cd2672e0b2c93d20eeea62d92304cad07f951ef0f1a025c097aacbcd7268ac981aea7f SHA512 4190f9110293c2523b25bea0d1422eabedac52fb1e1817d47170477577c9b80dd1ca83b0c91b30e460b3f0799b82830930fda7a2e155956b7282ae6ff0b72a5c -EBUILD makeheaders-0_p20240202.ebuild 1244 BLAKE2B 3f08fd540c095d1f12654a9d0129b0aaa0b771a42334b6efae6501d56987a89fbc394a7a047937ee4006d3e73d778135edf2d7202037c5ff5d0b8deac6c14d5e SHA512 d61eee642db028330e80772c348b2c83185b1f56c7e0c6046ce23f5647bb458d02746ede6c441b9a626214be92be0f13508376b37a8839d3453c7b16dc3616d0 +EBUILD makeheaders-0_p20240202.ebuild 1242 BLAKE2B d7d6b1471a5c820f8c367a5b311e5bd60792e30c2fb169a1a1953a02bd3f3db9a42046428ca6cb9f660ea8d532bf619bd37e9a53aba9834a198006ccf2c48913 SHA512 5d3fca1a6e83d21dc5de0c6636112fdfa1516c9e32c679736a8f1af905b351c9bc2ce1fb25125e35cb5ee4bf0e03b7c8176638c605b02b34b8263cb9c6614fb1 MISC metadata.xml 959 BLAKE2B d584237736f0fa8879ee7637a44c3705c29b66a7d07fef3b6ce4c96c4ee7d9acc0ac3dcdc10e6575a4777fc48dd0365786e3fa805298889132c553dcb65f6586 SHA512 18407e55d8e1697e6eb80662bb7ecd27633f0357e85155894bd221ff972972479b514f99b3c6c10b0d1baa8ee7c50d4e02d15e882049652c4ffdb13963ce93bd diff --git a/dev-util/makeheaders/makeheaders-0_p20240202.ebuild b/dev-util/makeheaders/makeheaders-0_p20240202.ebuild index 5af574ab1fca..e5a85cd9f98a 100644 --- a/dev-util/makeheaders/makeheaders-0_p20240202.ebuild +++ b/dev-util/makeheaders/makeheaders-0_p20240202.ebuild @@ -22,7 +22,7 @@ SRC_URI=" LICENSE="BSD-2" SLOT="0" -KEYWORDS="~amd64 ~ppc ~sparc ~x86" +KEYWORDS="amd64 ~ppc ~sparc x86" HTML_DOCS=( "makeheaders.html" ) diff --git a/dev-util/pkgdev/Manifest b/dev-util/pkgdev/Manifest index 16a4b606490c..46237e130823 100644 --- a/dev-util/pkgdev/Manifest +++ b/dev-util/pkgdev/Manifest @@ -1,4 +1,5 @@ DIST pkgdev-0.2.10.tar.gz 85476 BLAKE2B 2002daa38d445f90cbc2f17ad0e42045b32b5dcefdd85a3485b6e253d9703ad7e59119873718259874de32e7c50e4f5acbacc6c3b40770d55f4d38dbbd7805c4 SHA512 aa9f6465ba44ff67f2b160bc9249583c355e7cc807ce4c797cc8b6d2a4858414a82e702e47ff5b87dc0f6ba70b9c83d515c59a732406437e5325aa3ae7ff95aa +EBUILD pkgdev-0.2.10-r1.ebuild 1806 BLAKE2B afe832fa24855c0e3daafb76f9789263d9190353b42e60f7244076beaa160fd2375e27b5ff7c3f9583c485e6514bd65422b500bb5c5b1b4deb6fa3d96ff34542 SHA512 c1a1b2e9e85947b2d0f578fbaeca44f0ff6c0a17c2f6c2436c23dd553c6efe1e0b98c2e928e9ecef72a99a652893aa8836b16696258a4b8a2c27bbbe4fb6cccf EBUILD pkgdev-0.2.10.ebuild 1727 BLAKE2B e0d47b1da47f758d779e3056df523379d44bf558b8ef1e6722ce7549d90f8a28fa2bf3eae6fffa8c5a17b9fa971e8129f74561206cc1ee2c84bfe9ec7372e1de SHA512 497c7a6417c510ca3e4db16aa8fcf927ba6f59364dcac8153774e8f5e2e4f984422174278572f9eabba5a26664523bbbc3ea26927300039703b74a6a90f8bc12 -EBUILD pkgdev-9999.ebuild 1729 BLAKE2B a777826f4477b18a5ec90667ef0847707cfea6d5d43b1dafce6672040616e326fda38e7a5153a61484f8f673fefce99c0f761fbbe8628a0a86969c886f2b56e2 SHA512 3480ac0ffbf8bd20b93f440500d4fcd08d2484bc4e30c7d562c50537bff80d1151e4f2937be5b971821f4a8199e530260291c80fc032f4ee35112b939f955246 +EBUILD pkgdev-9999.ebuild 1800 BLAKE2B 079de03e55c642251d2d3e206beece76d5e23282ee97b7ba75ac32811cbc2eb358b74689fde314c3b0aa7c40ada561ffc03a75b828026f4c15157ab80f731e26 SHA512 ee99685aaa7f0a0214edd6b3a9d6b01f750f3515e71c1d983f35eb931bf4263a235a23f56abd84c0c24f9999b1db616f9d01db0b73fa3492fe0d632392c4c1ef MISC metadata.xml 449 BLAKE2B f440d395e5453394e7bcc857ccd07b6735bce1b68b3e4ce9d33068c28c5794f6ba65d7394ed6f585dcd3e58ccd3f49ecee4d001ff4e40893db721b5ac869f7ae SHA512 a07c315d071af0ad53ee79f9db3cfd1a8acbdbabfad960cf64025eea1a3759f1ef7d5dcf71bf07b17cbfb6f912513edf118c28d3c24de06223a7a3420cc4438d diff --git a/dev-util/pkgdev/pkgdev-0.2.10-r1.ebuild b/dev-util/pkgdev/pkgdev-0.2.10-r1.ebuild new file mode 100644 index 000000000000..1fc8f43e2948 --- /dev/null +++ b/dev-util/pkgdev/pkgdev-0.2.10-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=standalone +PYTHON_COMPAT=( python3_{10..12} ) +inherit distutils-r1 optfeature + +if [[ ${PV} == *9999 ]] ; then + EGIT_BRANCH="main" + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/pkgcore/pkgdev.git + https://github.com/pkgcore/pkgdev.git" + inherit git-r3 +else + inherit pypi + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" +fi + +DESCRIPTION="Collection of tools for Gentoo development" +HOMEPAGE="https://github.com/pkgcore/pkgdev" + +LICENSE="BSD MIT" +SLOT="0" +IUSE="doc" + +if [[ ${PV} == *9999 ]] ; then + RDEPEND=" + ~dev-python/snakeoil-9999[${PYTHON_USEDEP}] + ~dev-util/pkgcheck-9999[${PYTHON_USEDEP}] + ~sys-apps/pkgcore-9999[${PYTHON_USEDEP}] + " +else + RDEPEND=" + >=dev-python/snakeoil-0.10.5[${PYTHON_USEDEP}] + >=sys-apps/pkgcore-0.12.23[${PYTHON_USEDEP}] + >=dev-util/pkgcheck-0.10.25[${PYTHON_USEDEP}] + " +fi + +RDEPEND+=" + dev-vcs/git + $(python_gen_cond_dep ' + dev-python/tomli[${PYTHON_USEDEP}] + ' 3.10) +" +BDEPEND=" + >=dev-python/flit-core-3.8[${PYTHON_USEDEP}] + >=dev-python/snakeoil-0.10.5[${PYTHON_USEDEP}] + test? ( + x11-misc/xdg-utils + ) +" + +distutils_enable_sphinx doc \ + ">=dev-python/snakeoil-0.10.5" \ + dev-python/tomli +distutils_enable_tests pytest + +python_compile_all() { + use doc && emake PYTHON="${EPYTHON}" man + + sphinx_compile_all # HTML pages only +} + +python_install_all() { + # If USE=doc, there'll be newly generated docs which we install instead. + if use doc || [[ ${PV} != *9999 ]]; then + doman build/sphinx/man/* + fi + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "sending email support" x11-misc/xdg-utils + optfeature "tatt subcommand" "app-portage/nattka dev-python/jinja" +} diff --git a/dev-util/pkgdev/pkgdev-9999.ebuild b/dev-util/pkgdev/pkgdev-9999.ebuild index 207bcf10ce9c..a1858addd1ea 100644 --- a/dev-util/pkgdev/pkgdev-9999.ebuild +++ b/dev-util/pkgdev/pkgdev-9999.ebuild @@ -40,6 +40,9 @@ fi RDEPEND+=" dev-vcs/git + $(python_gen_cond_dep ' + dev-python/tomli[${PYTHON_USEDEP}] + ' 3.10) " BDEPEND=" >=dev-python/flit-core-3.8[${PYTHON_USEDEP}] diff --git a/dev-util/rbtools/Manifest b/dev-util/rbtools/Manifest index 79c616128c78..606dc6d083ea 100644 --- a/dev-util/rbtools/Manifest +++ b/dev-util/rbtools/Manifest @@ -1,6 +1,7 @@ AUX rbtools-5.0-importlib-resources.patch 425 BLAKE2B 6ea4e39cd033b468f8e3ecdef564e161299f539580890a5ba4930e5ceee7a339ecaf4c77f88d0b700019cfd1319369061262bef7301d2e84201d4af26e12a77c SHA512 44ebe3eced9f5fbee2ecfe891959d37e83699dd74677a4aef614de39ffc2aab69dbb79f0cf0df1921fd73cd70e61c89b9b1f326dbef72bb5f93aab71f118262d +AUX rbtools-5.0-scmtool-crash.patch 18177 BLAKE2B 67d07d40ecaaf75ac2c2908f78127f8821f37cb499c9e46d464335f989d94e776dcc0d1a64fed8e48218e566d3b342ce0863c00921322a1ac1cece4ac8c70b13 SHA512 a9bbaed7b467707124d2f505d93fae76d5d3f1a4ac548736b762357585a17a7c6e31bffa0d631e6158b088cd544056af50dab175f68674ca6f962e984c4cf45f DIST rbtools-4.1.tar.gz 619541 BLAKE2B 9b1aeca4f139a0189affb873363dba8f6d13eb954d4872939c543f6d91c00b09b2452cc379d4d99450c05d3d44a1996e910ff512ba9849292a7b705ce01be654 SHA512 58aa58ce6c55d4d3be9f221c493c8a3c15537776ff4e28be1ea44c0441f1dd9877ac9145066fdceb90d392c75cf29ec80e7efd154b0a2f1893422b65a0189ea0 DIST rbtools-5.0.tar.gz 649338 BLAKE2B c6a08004e7c8ba17936865e53b78e086ec74e8f5fee7ecc124750f3bf24b9b52ab8a26d1caa7010cdd2822463fcb27b8e5c5f757068924e22d3e59268166f7bf SHA512 7fbc5198fc89ee911a3cc487ead094d46213cfc4f85ab01cf22bd2a628559acdaaed138b430b08aa94ea25dec1179bf7c28349ac8226d632a6112ec83e2b57b7 EBUILD rbtools-4.1.ebuild 1421 BLAKE2B e3ad76841f38a456551bf7180645059c2dbd54be236eac0b4407b29936724d74e1bdac8197ab812e731eb5c09c49e92b0c7f83b5b96ed696f605fb4d1eb54a0c SHA512 c21b192ef90417f5e5726ae2158de614079a16a10275fd589b738788ed5f005cd0eeb33801435ada41b4932373ca04e10d62dfb8aa318ced52f39290c697c94a -EBUILD rbtools-5.0.ebuild 1537 BLAKE2B 594e197b4fc87c616d6f045d5d3028e65336f2bcb3105f6bd7c3bbade13d75e126ee685a512125dd6a412f337a1a29b917047e13193b343280940ecebafb3e0e SHA512 3cb89e3fbb36f4a63b0873d3ad5bdf02b19cf06853dc412c330dc0f8ce82061021b4ce67b97d6aa1665eafc87976cc3e11508a162e036e1693850c701afe64a5 +EBUILD rbtools-5.0-r1.ebuild 1580 BLAKE2B 93d644d3f6b0ae7ab73b74e9841cd60d60b5bd817a7501cfcb3381b53f3e4d3bc8389dc9fc27642ed2a18aeec0f8f7c8898d4f61b775dd291c21f59c562affc4 SHA512 89b375e100c567602654fa5a7361cabd4438fb59bbf781fe4f78d0124bfe63c2cd9abf6f07415437e1a50435e6ecfff0b4296fcf3907f0f5a3aede7c8400ea6c MISC metadata.xml 310 BLAKE2B d4825072b11fd2f9cad88fd9f3e0670d42f997f2f49034539ea9cab13751e08d7f4153fc7534d4931baa55cab6a4bb1ae65f1790fce12d784dfab1eb747a344b SHA512 4b2b81003437f8f97af748509521ce7f946df9e0fcc4ffbabf4de5289b046eeee25d0e1acaf3604fa09995965728b7e4cd10233074ddc4e9bed54a68f26e6613 diff --git a/dev-util/rbtools/files/rbtools-5.0-scmtool-crash.patch b/dev-util/rbtools/files/rbtools-5.0-scmtool-crash.patch new file mode 100644 index 000000000000..28783545edef --- /dev/null +++ b/dev-util/rbtools/files/rbtools-5.0-scmtool-crash.patch @@ -0,0 +1,483 @@ +From 36efa0724e3b4d941aa0554b1d82934319d25ce3 Mon Sep 17 00:00:00 2001 +From: David Trowbridge <trowbrds@gmail.com> +Date: Tue, 11 Jun 2024 17:22:15 -0600 +Subject: [PATCH] Use SCMTool IDs to look up repositories when possible. + +Many versions of Review Board currently have a bug where sending an +unknown value in the tool= parameter to the repository list API would +cause a crash. We'll be shipping a fix for that, but unfortunately there +are a variety of released versions where the Git and Clearcase clients +can trigger this crash on servers that do not have Power Pack installed. + +This change fixes the RBTools side to not include the Power Pack SCMTool +names, which will avoid the problem for existing servers. For new +servers, we'll be shipping a server-side fix that fixes the crash, adds +the SCMTool IDs to the capabilities, and allows us to pass SCMTool IDs +rather than names to the repository list API. If we see the IDs in the +capability blob, we can assume that we can pass the IDs, including +potentially unknown IDs. + +This also fixes a problem where we were sometimes accessing the +repository list API twice with exactly the same parameters. + +Testing Done: +- Ran unit tests. +- Verified that the repository list API was accessed using SCMTool names + that did not include potentially missing ones when running against an + older server. +- Verified that the repository list API was accessed with SCMTool IDs + when running against a server with the new API fixes. + +Reviewed at https://reviews.reviewboard.org/r/13973/ +--- + rbtools/clients/base/scmclient.py | 59 +++++++++++++++++++++++++------ + rbtools/clients/bazaar.py | 1 + + rbtools/clients/clearcase.py | 10 +++++- + rbtools/clients/cvs.py | 1 + + rbtools/clients/git.py | 10 +++++- + rbtools/clients/mercurial.py | 1 + + rbtools/clients/perforce.py | 1 + + rbtools/clients/plastic.py | 1 + + rbtools/clients/svn.py | 1 + + rbtools/clients/tfs.py | 1 + + rbtools/commands/base/commands.py | 3 +- + rbtools/commands/setup_repo.py | 25 +++++++++---- + rbtools/utils/repository.py | 58 ++++++++++++++++++++++-------- + 13 files changed, 139 insertions(+), 33 deletions(-) + +diff --git a/rbtools/clients/base/scmclient.py b/rbtools/clients/base/scmclient.py +index c053b91b..9f56c084 100644 +--- a/rbtools/clients/base/scmclient.py ++++ b/rbtools/clients/base/scmclient.py +@@ -9,24 +9,24 @@ + import argparse + import logging + import re +-from typing import (Any, Dict, List, Mapping, Optional, Tuple, Union, cast, +- TYPE_CHECKING) ++from typing import (Any, cast, ClassVar, Dict, List, Mapping, Optional, ++ TYPE_CHECKING, Tuple, Union) + + from typing_extensions import NotRequired, TypedDict, final + +-from rbtools.api.capabilities import Capabilities +-from rbtools.api.resource import (ItemResource, +- ListResource, +- ReviewRequestResource) + from rbtools.clients.base.patch import PatchAuthor, PatchResult +-from rbtools.clients.base.repository import RepositoryInfo + from rbtools.clients.errors import SCMClientDependencyError, SCMError + from rbtools.deprecation import RemovedInRBTools50Warning +-from rbtools.diffs.tools.base import BaseDiffTool + from rbtools.diffs.tools.registry import diff_tools_registry + from rbtools.utils.process import execute + + if TYPE_CHECKING: ++ from rbtools.api.capabilities import Capabilities ++ from rbtools.api.resource import (ItemResource, ++ ListResource, ++ ReviewRequestResource) ++ from rbtools.clients.base.repository import RepositoryInfo ++ from rbtools.diffs.tools.base import BaseDiffTool + from rbtools.config import RBToolsConfig + + +@@ -281,14 +281,27 @@ class BaseSCMClient(object): + #: str + name: str = '' + +- #: A comma-separated list of SCMClient names on the server ++ #: A comma-separated list of SCMClient names on the server. + #: + #: Version Added: + #: 3.0 + #: + #: Type: + #: str +- server_tool_names: Optional[str] = None ++ server_tool_names: ClassVar[Optional[str]] = None ++ ++ #: A comma-separated list of SCMClient IDs on the server. ++ #: ++ #: This supersedes :py:attr:`server_tool_names` when running on a version ++ #: of Review Board that supports passing tool IDs to the repositories ++ #: list API. ++ #: ++ #: Version Added: ++ #: 5.0.1 ++ #: ++ #: Type: ++ #: str ++ server_tool_ids: ClassVar[Optional[List[str]]] = None + + #: Whether this tool requires a command line diff tool. + #: +@@ -692,6 +705,32 @@ def get_diff_tool(self) -> Optional[BaseDiffTool]: + + return diff_tool + ++ def get_server_tool_names( ++ self, ++ capabilities: Optional[Capabilities], ++ ) -> Optional[str]: ++ """Return the list of supported tool names on the server. ++ ++ Version Added: ++ 5.0.1 ++ ++ Args: ++ capabilities (rbtools.api.capabilities.Capabilities): ++ The server capabilities, if present. ++ ++ Returns: ++ str: ++ A comma-separated list of server-side tool names to match with. ++ """ ++ if (capabilities is not None and ++ capabilities.get_capability('scmtools', 'supported_tools') and ++ self.server_tool_ids is not None): ++ # Versions of Review Board that have this capability allow us to ++ # pass SCMTool IDs rather than names. ++ return ','.join(self.server_tool_ids) ++ else: ++ return self.server_tool_names ++ + def find_matching_server_repository( + self, + repositories: ListResource, +diff --git a/rbtools/clients/bazaar.py b/rbtools/clients/bazaar.py +index 0e39315d..4174c010 100644 +--- a/rbtools/clients/bazaar.py ++++ b/rbtools/clients/bazaar.py +@@ -37,6 +37,7 @@ class BazaarClient(BaseSCMClient): + scmclient_id = 'bazaar' + name = 'Bazaar' + server_tool_names = 'Bazaar' ++ server_tool_ids = ['bazaar'] + supports_diff_exclude_patterns = True + supports_parent_diffs = True + can_branch = True +diff --git a/rbtools/clients/clearcase.py b/rbtools/clients/clearcase.py +index f9c8762e..e2c04633 100644 +--- a/rbtools/clients/clearcase.py ++++ b/rbtools/clients/clearcase.py +@@ -392,7 +392,15 @@ class ClearCaseClient(BaseSCMClient): + + scmclient_id = 'clearcase' + name = 'VersionVault / ClearCase' +- server_tool_names = 'ClearCase,VersionVault / ClearCase' ++ ++ # Review Board versions that use the old names-based repositories/?tool= ++ # API parameter also have a bug where a missing name could cause a ++ # server-side crash. This was making it so servers that did not have Power ++ # Pack were failing when we tried to make a query that included the ++ # VersionVault name. We therefore only include it when we know the server ++ # can use server_tool_ids instead. ++ server_tool_names = 'ClearCase' ++ server_tool_ids = ['clearcase', 'versionvault'] + + requires_diff_tool = True + +diff --git a/rbtools/clients/cvs.py b/rbtools/clients/cvs.py +index 98354e8b..dd2c72ef 100644 +--- a/rbtools/clients/cvs.py ++++ b/rbtools/clients/cvs.py +@@ -28,6 +28,7 @@ class CVSClient(BaseSCMClient): + scmclient_id = 'cvs' + name = 'CVS' + server_tool_names = 'CVS' ++ server_tool_ids = ['cvs'] + supports_diff_exclude_patterns = True + supports_patch_revert = True + +diff --git a/rbtools/clients/git.py b/rbtools/clients/git.py +index f4b96cb6..431fd7c6 100644 +--- a/rbtools/clients/git.py ++++ b/rbtools/clients/git.py +@@ -76,7 +76,15 @@ class GitClient(BaseSCMClient): + + scmclient_id = 'git' + name = 'Git' +- server_tool_names = 'Git,Perforce,Subversion,Team Foundation Server (git)' ++ ++ # Review Board versions that use the old names-based repositories/?tool= ++ # API parameter also have a bug where a missing name could cause a ++ # server-side crash. This was making it so servers that did not have Power ++ # Pack were failing when we tried to make a query that included the TFS-Git ++ # name. We therefore only include it when we know the server can use ++ # server_tool_ids instead. ++ server_tool_names = 'Git,Perforce,Subversion' ++ server_tool_ids = ['git', 'perforce', 'subversion', 'tfs_git'] + + supports_commit_history = True + supports_diff_exclude_patterns = True +diff --git a/rbtools/clients/mercurial.py b/rbtools/clients/mercurial.py +index 2ee473c9..6f1c5ea0 100644 +--- a/rbtools/clients/mercurial.py ++++ b/rbtools/clients/mercurial.py +@@ -64,6 +64,7 @@ class MercurialClient(BaseSCMClient): + scmclient_id = 'mercurial' + name = 'Mercurial' + server_tool_names = 'Mercurial,Subversion' ++ server_tool_ids = ['mercurial', 'subversion'] + + supports_commit_history = True + supports_diff_exclude_patterns = True +diff --git a/rbtools/clients/perforce.py b/rbtools/clients/perforce.py +index f5892073..4f5d7fb1 100644 +--- a/rbtools/clients/perforce.py ++++ b/rbtools/clients/perforce.py +@@ -445,6 +445,7 @@ class PerforceClient(BaseSCMClient): + scmclient_id = 'perforce' + name = 'Perforce' + server_tool_names = 'Perforce' ++ server_tool_ids = ['perforce'] + + requires_diff_tool = True + +diff --git a/rbtools/clients/plastic.py b/rbtools/clients/plastic.py +index c45c7abd..3bec215a 100644 +--- a/rbtools/clients/plastic.py ++++ b/rbtools/clients/plastic.py +@@ -28,6 +28,7 @@ class PlasticClient(BaseSCMClient): + scmclient_id = 'plastic' + name = 'Plastic' + server_tool_names = 'Plastic SCM' ++ server_tool_ids = ['plastic'] + supports_changesets = True + supports_patch_revert = True + +diff --git a/rbtools/clients/svn.py b/rbtools/clients/svn.py +index 34cdffcb..6d0352cc 100644 +--- a/rbtools/clients/svn.py ++++ b/rbtools/clients/svn.py +@@ -52,6 +52,7 @@ class SVNClient(BaseSCMClient): + scmclient_id = 'svn' + name = 'Subversion' + server_tool_names = 'Subversion' ++ server_tool_ids = ['subversion'] + + requires_diff_tool = True + +diff --git a/rbtools/clients/tfs.py b/rbtools/clients/tfs.py +index 2b70fae3..7b02d3de 100644 +--- a/rbtools/clients/tfs.py ++++ b/rbtools/clients/tfs.py +@@ -1321,6 +1321,7 @@ class TFSClient(BaseSCMClient): + scmclient_id = 'tfs' + name = 'Team Foundation Server' + server_tool_names = 'Team Foundation Server' ++ server_tool_ids = ['tfs'] + + requires_diff_tool = True + +diff --git a/rbtools/commands/base/commands.py b/rbtools/commands/base/commands.py +index 3313a689..d4e20f61 100644 +--- a/rbtools/commands/base/commands.py ++++ b/rbtools/commands/base/commands.py +@@ -939,7 +939,8 @@ def initialize(self) -> None: + api_root=self.api_root, + tool=tool, + repository_name=options.repository_name, +- repository_paths=repository_info.path) ++ repository_paths=repository_info.path, ++ capabilities=self.capabilities) + self.repository = repository + + if repository: +diff --git a/rbtools/commands/setup_repo.py b/rbtools/commands/setup_repo.py +index 615bc9e3..9905d1b5 100644 +--- a/rbtools/commands/setup_repo.py ++++ b/rbtools/commands/setup_repo.py +@@ -1,14 +1,20 @@ + """Implementation of rbt setup-repo.""" + ++from __future__ import annotations ++ + import difflib + import os + import textwrap ++from typing import Optional, TYPE_CHECKING, Union + + from rbtools.commands.base import BaseCommand, CommandError + from rbtools.config.loader import CONFIG_FILENAME + from rbtools.utils.console import confirm, confirm_select + from rbtools.utils.repository import get_repository_resource + ++if TYPE_CHECKING: ++ from rbtools.api.resource import ItemResource, RootResource ++ + + class SetupRepo(BaseCommand): + """Configure a repository to point to a Review Board server. +@@ -38,22 +44,27 @@ class SetupRepo(BaseCommand): + BaseCommand.tfs_options, + ] + +- def prompt_rb_repository(self, local_tool_name, server_tool_names, +- repository_paths, api_root): ++ def prompt_rb_repository( ++ self, ++ local_tool_name: str, ++ server_tool_names: Optional[str], ++ repository_paths: Optional[Union[str, list[str]]], ++ api_root: RootResource, ++ ) -> Optional[ItemResource]: + """Interactively prompt to select a matching repository. + + The user is prompted to choose a matching repository found on the + Review Board server. + + Args: +- local_tool_name (unicode): ++ local_tool_name (str): + The local name of the detected tool. + +- server_tool_names (unicode): ++ server_tool_names (str): + A comma-separated list of potentially matching SCMTool names in + the Review Board server. + +- repository_paths (list or unicode, optional): ++ repository_paths (list or str, optional): + A list of potential paths to match for the repository. + + api_root (rbtools.api.resource.RootResource): +@@ -192,9 +203,11 @@ def main(self, *args): + while True: + self.stdout.new_line() + self.stdout.write('Current server: %s' % server) ++ ++ tool_names = tool.get_server_tool_names(self.capabilities) + selected_repo = self.prompt_rb_repository( + local_tool_name=tool.name, +- server_tool_names=tool.server_tool_names, ++ server_tool_names=tool_names, + repository_paths=repository_info.path, + api_root=api_root) + +diff --git a/rbtools/utils/repository.py b/rbtools/utils/repository.py +index d30d2cc0..d3ec280d 100644 +--- a/rbtools/utils/repository.py ++++ b/rbtools/utils/repository.py +@@ -1,17 +1,34 @@ + """Utility functions for working with repositories.""" + ++from __future__ import annotations ++ ++from typing import Optional, TYPE_CHECKING, Union ++ + from rbtools.api.errors import APIError + ++if TYPE_CHECKING: ++ from rbtools.api.capabilities import Capabilities ++ from rbtools.api.resource import ItemResource, RootResource ++ from rbtools.clients.base.repository import RepositoryInfo ++ from rbtools.clients.base.scmclient import BaseSCMClient ++ + +-def get_repository_resource(api_root, +- tool=None, +- repository_name=None, +- repository_paths=None): ++def get_repository_resource( ++ api_root: RootResource, ++ tool: Optional[BaseSCMClient] = None, ++ repository_name: Optional[str] = None, ++ repository_paths: Optional[Union[str, list[str]]] = None, ++ capabilities: Optional[Capabilities] = None, ++) -> tuple[Optional[ItemResource], Optional[ItemResource]]: + """Return the API resource for the matching repository on the server. + + Version Added: + 3.0 + ++ Version Changed: ++ 5.0.1: ++ Added the ``capabilities`` argument. ++ + Args: + api_root (rbtools.api.resource.RootResource): + The root resource for the API. +@@ -19,12 +36,15 @@ def get_repository_resource(api_root, + tool (rbtools.clients.base.BaseSCMClient, optional): + The SCM client corresponding to the local working directory. + +- repository_name (unicode, optional): ++ repository_name (str, optional): + An explicit repository name provided by the local configuration. + +- repository_paths (list or unicode, optional): ++ repository_paths (list or str, optional): + A list of potential paths to match for the repository. + ++ capabilities (rbtools.api.capabilities.Capabilities, optional): ++ The capabilities fetched from the server. ++ + Returns: + tuple of rbtools.api.resource.ItemResource: + A 2-tuple of :py:class:`~rbtools.api.resource.ItemResource`. The first +@@ -47,8 +67,11 @@ def _get_info(repository): + 'only_links': 'info,diff_file_attachments', + } + +- if tool and tool.server_tool_names: +- query['tool'] = tool.server_tool_names ++ if tool: ++ server_tool_names = tool.get_server_tool_names(capabilities) ++ ++ if server_tool_names: ++ query['tool'] = server_tool_names + + if repository_name: + query['name'] = repository_name +@@ -70,9 +93,12 @@ def _get_info(repository): + # configured path than the client. In that case, we want to try again + # without filtering by path, and ask each tool to match based on other + # conditions. +- query.pop('path', None) ++ if 'path' in query: ++ query.pop('path', None) + +- all_repositories = api_root.get_repositories(**query) ++ all_repositories = api_root.get_repositories(**query) ++ else: ++ all_repositories = repositories + + if all_repositories.total_results > 0 and tool: + repository, info = tool.find_matching_server_repository( +@@ -93,7 +119,11 @@ def _get_info(repository): + return None, None + + +-def get_repository_id(repository_info, api_root, repository_name=None): ++def get_repository_id( ++ repository_info: RepositoryInfo, ++ api_root: RootResource, ++ repository_name: Optional[str] = None, ++) -> Optional[int]: + """Return the ID of a repository from the server. + + This will look up all accessible repositories on the server and try to +@@ -106,18 +136,18 @@ def get_repository_id(repository_info, api_root, repository_name=None): + api_root (rbtools.api.resource.RootResource): + The root resource for the API. + +- repository_name (unicode, optional): ++ repository_name (str, optional): + An explicit repository name provided by local configuration. + + Returns: + int: + The ID of the repository, or ``None`` if not found. + """ +- repository, info = get_repository_resource( ++ repository = get_repository_resource( + api_root, + tool=None, + repository_name=repository_name, +- repository_paths=repository_info.path) ++ repository_paths=repository_info.path)[0] + + if repository: + return repository.id diff --git a/dev-util/rbtools/rbtools-5.0.ebuild b/dev-util/rbtools/rbtools-5.0-r1.ebuild index 6a99f1af7e31..e3d01d77608e 100644 --- a/dev-util/rbtools/rbtools-5.0.ebuild +++ b/dev-util/rbtools/rbtools-5.0-r1.ebuild @@ -16,7 +16,7 @@ S="${WORKDIR}/rbtools-release-${PV}" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="test" RDEPEND=" >=dev-python/certifi-2023.5.7[${PYTHON_USEDEP}] @@ -40,7 +40,7 @@ BDEPEND=" ) " -PATCHES=( "${FILESDIR}/${P}-importlib-resources.patch" ) +PATCHES=( "${FILESDIR}/${P}-importlib-resources.patch" "${FILESDIR}/${P}-scmtool-crash.patch" ) DOCS=( AUTHORS NEWS README.md ) diff --git a/dev-util/rocm-smi/Manifest b/dev-util/rocm-smi/Manifest index 3fa0a1500d13..0fc8e5a1f444 100644 --- a/dev-util/rocm-smi/Manifest +++ b/dev-util/rocm-smi/Manifest @@ -4,11 +4,15 @@ AUX rocm-smi-5.4.2-detect-builtin-amdgpu.patch 1071 BLAKE2B 1957d49b0c3c1f9db24a AUX rocm-smi-5.7.1-no-strip.patch 1405 BLAKE2B 703eafdfe552afe3d2d4d67af2e847b42669b09b8b553b7a77e46f39f3a960174380187f5927b3a4c686dded54b4d9fa6be6c5c862ea2a023bf84224de3be5b6 SHA512 60806893c6ae7fe4c66ae927528f0db13c75f74c464885a251ac5e021bf61aaa5f529cca3de72c9c49dd993375039e0052bbccb4c3065a17849852c9283e20c5 AUX rocm-smi-5.7.1-remove-example.patch 560 BLAKE2B 6f541822947e6f458e5c553c307e137de63db884d7933dd5dad752990c7f4c15d02c47d66dd399d053368d79ab0b6d8237adb1d7c3fae28a9b03d0c34006d027 SHA512 e3be170af0d6f8b4e238e9f9940ac91748fd9b45a0f43fb1c7286d676c2a878a05aeb260e6248bc66ba93adcea5d4c7bc22ce6db6a248cee20d678fdfa7d07ec AUX rocm-smi-5.7.1-set-soversion.patch 5234 BLAKE2B b2e40d803d0511e98c87125dae05a415b2ddf38b28f774edfe6fca1bf552e630f872631b3cfe82c1302a1c2d7be83bf7a6b4e67c0f8eb271612999eaec3cba68 SHA512 af51867d0baeca303932b0d38f716a657bf14f57e595056694eadb2c120c741e03615837eee9b86932f1fa04815c2803b6115e5e2cb81ea51b07d558155eb398 +AUX rocm-smi-6.0.2-set-soversion.patch 7897 BLAKE2B 3b18e771001c651b1ab4cb041b7e3da4e799073ef94a1ae9db42ba072430a3f79f5ccb1896190217807105a185235209b4411b33159f4a457fff1d82ebec8aa7 SHA512 9e67af5545b890a3a830a34334c551ec6934146268670549d43fe7a4b249ff8729225b31a603efee0beee3cff910ca14a000dc6b3384d456b8481fbae3864614 +AUX rocm-smi-6.1.1-fix-const-qualifier.patch 517 BLAKE2B d5a35233910380d6a5bb7931bc7861efb22254ce33f4f015ae27d44bef7afa13b5e66afbe5c33dce228a95bb3d82783d3e95570f0a0ec77f6043c69bfe828bf1 SHA512 03c06d0fc663b9e5c57f970596444cf851047c40c5a2511fa5d1c1d196f20ddcfec013bdf6d7789cb62ec60d858abeac69a35b57784de4dfc92bfb8e4131d5e0 DIST rocm-smi-5.1.3.tar.gz 1701386 BLAKE2B c5e779f5c33fec0b1b39b09c758dfadd3c24e28f15381593f2959e5c2fb9f49af3a7ca1f9ab7d6bf34c5af4fbe3f0c0ae20c6c049cbf9421a9184735bb4a64a2 SHA512 7bf7af2b42a035c298c2f9009b6123671af41f9ca1a50607cfa362f39dbd82ff88f8c13ece6c4edab585edadd9072ed096a400dd3850851e1beef3633a8eb14e DIST rocm-smi-5.4.2.tar.gz 1553259 BLAKE2B 0560e115028caafb1d5dd8892cfa677431b792714ecd8c75f31451fa7685d1c7070cbd687c894d7eefd112de5e2df9aa7895aa57821db207dffc4e8890898638 SHA512 0fd651593df0ebbcb2c2327d030d2674efacdb6e883daa5a8adf733db2bde3e5d16dc304856221f4bb07a3cd834944ffcc7ebd689624f7ba24ffd6c262ba74b8 DIST rocm-smi-5.7.1.tar.gz 801646 BLAKE2B b4799bbdaeb7203c16117cd30511d589a2b96e15801bb9f1382fe7a4d87d43e1d4b458d6923b6ebd602fdccba74bd65bcb98766dbd83c48fc3e02219be8c1022 SHA512 ad364278f137228a39108c93d482635137ea2724a5a39debb5b32329493ebf5c706dcf3863e2e24b6f0b6286f3877942277f5ae447446f155518972b957f7d9d +DIST rocm-smi-6.1.1.tar.gz 872628 BLAKE2B 35830fd0eb36688b3803bed2059f29ba4d8613112ae4cfff2e0a3b1d7afef9f0d77ec16771e2205ba351df0aa678c3b0d2436940b76d10d020f1a30d14d760e9 SHA512 3e31ff0d94e7f0ea650c985973b27107e3f7293b92857fbf2fe196b61632c530e95c3228ad7550d44f8ee9f5f1abfd17e5c2b19164759728fb6d4b0995455fa7 EBUILD rocm-smi-5.1.3-r1.ebuild 1850 BLAKE2B 9f7cbf7d5ec55ac112980609f8a924b5678aa4fa5cf75cdda3d80ad90c15ecb5f1d129a21c0248985d7f4e792abbcd3f0d822e8e10e76314ebaa5fc240632ae9 SHA512 30181897335c17d81a9d9dce8c4417c62fe66a20d557251158bf2a8ffe6fc075e51878a4bd42708ef47a89022fd03a97b4dccca1f5ee450d098cf66af1095158 EBUILD rocm-smi-5.4.2.ebuild 1454 BLAKE2B 1025768cbe75bb5d815631868c8d9f72ba6dd19a2a0483b0f6fa992a89af4b018731ab247df3679bb836e88e961d80cc94f6550dab70dc00ba25e3d642f5af74 SHA512 5e124efaa71e74ab5b5063244d757f8e9eddc22dbf10d1878c1a5d7ad04dbc88b366470596d4ee48bb489b26bb30e90f8fab51ca756fa0315e5a673971ae8d7e EBUILD rocm-smi-5.7.1-r2.ebuild 1604 BLAKE2B 213d8d92f900537d4b84b419deca531a8b29bbb9d4ce3a6e64368b789aa341af02d8d5a2417acdc5267e370f16cd9b08a98f24156ce5ae93cae3bb648721b77d SHA512 3ad7dc560bad8eae69e3d78cff802f5a00a3984524bf94a7fab8491a1c043691deb61fe02f41b060caf834dd7210442471a72771b96162e7ff643e7ef918ec55 +EBUILD rocm-smi-6.1.1.ebuild 1479 BLAKE2B 56815b93b97e4e20f0405ce35467b10d8d8c5813044d995f94da8dcff468af8deb17f6cca2ce43cefdf4bdb63baceb4be64c284d5d4862ea03ad076bc6a974c4 SHA512 3627f49d454a34295ed75031f4480e5cb7758a57a641495b8c1abb19139e307db4a3b72c4e7302550817e02899f28c3fee481cd0a3e058fde473375e12810e77 EBUILD rocm-smi-9999.ebuild 1454 BLAKE2B 1025768cbe75bb5d815631868c8d9f72ba6dd19a2a0483b0f6fa992a89af4b018731ab247df3679bb836e88e961d80cc94f6550dab70dc00ba25e3d642f5af74 SHA512 5e124efaa71e74ab5b5063244d757f8e9eddc22dbf10d1878c1a5d7ad04dbc88b366470596d4ee48bb489b26bb30e90f8fab51ca756fa0315e5a673971ae8d7e -MISC metadata.xml 661 BLAKE2B ed6ec563956132012b44907f348091135c7a463fc47a51ac0726e7749da9a4c33811df87442e576fb510799a50c14949cd20c8ca10a5850ee941a8794b70ef7d SHA512 c047963068b4ccefb73539ecd91b4c3310f0863a674acb15e9843dda7f0c917616dc8cbfe5f859e42d9ee25323bf1b66b1ce7fbe9a2e8292963ac38aa0bd72f3 +MISC metadata.xml 769 BLAKE2B 4b19247215c20587c6c7b6958dbd2ed57a242e8718d642c602b4067c4ad3e7cc7778a62e2f20b2b940b3281cc6e0a793153e8ff7bfd54aaa7a16e74b8e54ac6c SHA512 76648eff089ed88259457dfea04a4db19393b0d1285b3556a583b7750782a3b2406e2c407c2c7cdff47cabf1c7377fdf8a053b74226f73c32426155361dc0c83 diff --git a/dev-util/rocm-smi/files/rocm-smi-6.0.2-set-soversion.patch b/dev-util/rocm-smi/files/rocm-smi-6.0.2-set-soversion.patch new file mode 100644 index 000000000000..6d28c7bb8e3e --- /dev/null +++ b/dev-util/rocm-smi/files/rocm-smi-6.0.2-set-soversion.patch @@ -0,0 +1,165 @@ +Switch from extracting version with git to version from ebuild filename. +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,20 +33,17 @@ set(SHARE_INSTALL_PREFIX + "share/${ROCM_SMI}" + CACHE STRING "Tests and Example install directory") + +-# provide git to utilities +-find_program (GIT NAMES git) +- +-## Setup the package version based on git tags. +-set(PKG_VERSION_GIT_TAG_PREFIX "rsmi_pkg_ver") +-get_package_version_number("7.0.0" ${PKG_VERSION_GIT_TAG_PREFIX} GIT) +-message("Package version: ${PKG_VERSION_STR}") +-set(${ROCM_SMI_LIBS_TARGET}_VERSION_MAJOR "${CPACK_PACKAGE_VERSION_MAJOR}") +-set(${ROCM_SMI_LIBS_TARGET}_VERSION_MINOR "${CPACK_PACKAGE_VERSION_MINOR}") +-set(${ROCM_SMI_LIBS_TARGET}_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}") +-set(${ROCM_SMI_LIBS_TARGET}_VERSION_BUILD "0") +-set(${ROCM_SMI_LIBS_TARGET}_VERSION_HASH "${PKG_VERSION_HASH}") +- +-set(${ROCM_SMI_LIBS_TARGET}_VERSION_STRING "${${ROCM_SMI_LIBS_TARGET}_VERSION_MAJOR}.${${ROCM_SMI_LIBS_TARGET}_VERSION_MINOR}.${${ROCM_SMI_LIBS_TARGET}_VERSION_PATCH}+${${ROCM_SMI_LIBS_TARGET}_VERSION_HASH}") ++set(VERSION_MAJOR "@VERSION_MAJOR@") ++set(VERSION_MINOR "@VERSION_MINOR@") ++set(VERSION_PATCH "@VERSION_PATCH@") ++set(PKG_VERSION_STR "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") ++set(SO_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}") ++set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}") ++set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}") ++set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}") ++set(rocm_smi_VERSION_MAJOR "${VERSION_MAJOR}") ++set(rocm_smi_VERSION_MINOR "${VERSION_MINOR}") ++set(rocm_smi_VERSION_PATCH "${VERSION_PATCH}") + + # The following default version values should be updated as appropriate for + # ABI breaks (update MAJOR and MINOR), and ABI/API additions (update MINOR). +--- a/oam/CMakeLists.txt ++++ b/oam/CMakeLists.txt +@@ -29,17 +29,6 @@ set(OAM_NAME "oam") + set(OAM_COMPONENT "lib${OAM_NAME}") + set(OAM_TARGET "${OAM_NAME}") + +-################# Determine the library version ######################### +-set(SO_VERSION_GIT_TAG_PREFIX "oam_so_ver") +- +-# VERSION_* variables should be set by get_version_from_tag +-message("Package version: ${PKG_VERSION_STR}") +- +-# Debian package specific variables +-# Set a default value for the package version +-get_version_from_tag("1.0.0.0" ${SO_VERSION_GIT_TAG_PREFIX} GIT) +- +-# VERSION_* variables should be set by get_version_from_tag + if ( ${ROCM_PATCH_VERSION} ) + set ( VERSION_PATCH ${ROCM_PATCH_VERSION}) + set(SO_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") +--- a/python_smi_tools/rsmiBindings.py ++++ b/python_smi_tools/rsmiBindings.py +@@ -26,17 +26,7 @@ def initRsmiBindings(silent=False): + if (rocm_smi_lib_path != None): + path_librocm = rocm_smi_lib_path + else: +- path_librocm = os.path.dirname(os.path.realpath(__file__)) + '/../../lib/librocm_smi64.so.7' +- +- if not os.path.isfile(path_librocm): +- print_silent('Unable to find %s . Trying /opt/rocm*' % path_librocm) +- for root, dirs, files in os.walk('/opt', followlinks=True): +- if 'librocm_smi64.so.7' in files: +- path_librocm = os.path.join(os.path.realpath(root), 'librocm_smi64.so.7') +- if os.path.isfile(path_librocm): +- print_silent('Using lib from %s' % path_librocm) +- else: +- print('Unable to find librocm_smi64.so.7') ++ path_librocm = 'librocm_smi64.so' + + # ----------> TODO: Support static libs as well as SO + try: +@@ -44,7 +34,7 @@ def initRsmiBindings(silent=False): + return CDLL(path_librocm) + except OSError: + print('Unable to load the rocm_smi library.\n'\ +- 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so.7\n'\ ++ 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so\n'\ + '{0}Please refer to https://github.com/'\ + 'RadeonOpenCompute/rocm_smi_lib for the installation guide.{1}'\ + .format('\33[33m', '\033[0m')) +--- a/python_smi_tools/rsmiBindings.py.in ++++ b/python_smi_tools/rsmiBindings.py.in +@@ -26,17 +26,7 @@ def initRsmiBindings(silent=False): + if (rocm_smi_lib_path != None): + path_librocm = rocm_smi_lib_path + else: +- path_librocm = os.path.dirname(os.path.realpath(__file__)) + '/../../@CMAKE_INSTALL_LIBDIR@/librocm_smi64.so.@VERSION_MAJOR@' +- +- if not os.path.isfile(path_librocm): +- print_silent('Unable to find %s . Trying /opt/rocm*' % path_librocm) +- for root, dirs, files in os.walk('/opt', followlinks=True): +- if 'librocm_smi64.so.@VERSION_MAJOR@' in files: +- path_librocm = os.path.join(os.path.realpath(root), 'librocm_smi64.so.@VERSION_MAJOR@') +- if os.path.isfile(path_librocm): +- print_silent('Using lib from %s' % path_librocm) +- else: +- print('Unable to find librocm_smi64.so.@VERSION_MAJOR@') ++ path_librocm = 'librocm_smi64.so' + + # ----------> TODO: Support static libs as well as SO + try: +@@ -44,7 +34,7 @@ def initRsmiBindings(silent=False): + return CDLL(path_librocm) + except OSError: + print('Unable to load the rocm_smi library.\n'\ +- 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so.@VERSION_MAJOR@\n'\ ++ 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so\n'\ + '{0}Please refer to https://github.com/'\ + 'RadeonOpenCompute/rocm_smi_lib for the installation guide.{1}'\ + .format('\33[33m', '\033[0m')) +--- a/python_smi_tools/rsmiBindingsInit.py.in ++++ b/python_smi_tools/rsmiBindingsInit.py.in +@@ -26,17 +26,7 @@ def initRsmiBindings(silent=False): + if (rocm_smi_lib_path != None): + path_librocm = rocm_smi_lib_path + else: +- path_librocm = os.path.dirname(os.path.realpath(__file__)) + '/../../@CMAKE_INSTALL_LIBDIR@/librocm_smi64.so.@VERSION_MAJOR@' +- +- if not os.path.isfile(path_librocm): +- print_silent('Unable to find %s . Trying /opt/rocm*' % path_librocm) +- for root, dirs, files in os.walk('/opt', followlinks=True): +- if 'librocm_smi64.so.@VERSION_MAJOR@' in files: +- path_librocm = os.path.join(os.path.realpath(root), 'librocm_smi64.so.@VERSION_MAJOR@') +- if os.path.isfile(path_librocm): +- print_silent('Using lib from %s' % path_librocm) +- else: +- print('Unable to find librocm_smi64.so.@VERSION_MAJOR@') ++ path_librocm = 'librocm_smi64.so' + + # ----------> TODO: Support static libs as well as SO + try: +@@ -44,7 +34,7 @@ def initRsmiBindings(silent=False): + return CDLL(path_librocm) + except OSError: + print('Unable to load the rocm_smi library.\n'\ +- 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so.@VERSION_MAJOR@\n'\ ++ 'Set LD_LIBRARY_PATH to the folder containing librocm_smi64.so\n'\ + '{0}Please refer to https://github.com/'\ + 'RadeonOpenCompute/rocm_smi_lib for the installation guide.{1}'\ + .format('\33[33m', '\033[0m')) +--- a/rocm_smi/CMakeLists.txt ++++ b/rocm_smi/CMakeLists.txt +@@ -31,17 +31,6 @@ set(ROCM_SMI_TARGET "${ROCM_SMI}64") + ## Include common cmake modules + include(utils) + +-################# Determine the library version ######################### +-set(SO_VERSION_GIT_TAG_PREFIX "rsmi_so_ver") +- +-# VERSION_* variables should be set by get_version_from_tag +-message("Package version: ${PKG_VERSION_STR}") +- +-# Debian package specific variables +-# Set a default value for the package version +-get_version_from_tag("1.0.0.0" ${SO_VERSION_GIT_TAG_PREFIX} GIT) +- +-# VERSION_* variables should be set by get_version_from_tag + if ( ${ROCM_PATCH_VERSION} ) + set ( VERSION_PATCH ${ROCM_PATCH_VERSION}) + set(SO_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") diff --git a/dev-util/rocm-smi/files/rocm-smi-6.1.1-fix-const-qualifier.patch b/dev-util/rocm-smi/files/rocm-smi-6.1.1-fix-const-qualifier.patch new file mode 100644 index 000000000000..6c4197091575 --- /dev/null +++ b/dev-util/rocm-smi/files/rocm-smi-6.1.1-fix-const-qualifier.patch @@ -0,0 +1,13 @@ +Fix error "cannot assign to variable 'rhs' with const-qualified type" +PR: https://github.com/ROCm/rocm_smi_lib/pull/156 +--- a/include/rocm_smi/rocm_smi_utils.h ++++ b/include/rocm_smi/rocm_smi_utils.h +@@ -216,7 +216,7 @@ class ScopeGuard { + __forceinline ~ScopeGuard() { + if (!dismiss_) release_(); + } +- __forceinline ScopeGuard& operator=(const ScopeGuard& rhs) { ++ __forceinline ScopeGuard& operator=(ScopeGuard& rhs) { + dismiss_ = rhs.dismiss_; + release_ = rhs.release_; + rhs.dismiss_ = true; diff --git a/dev-util/rocm-smi/metadata.xml b/dev-util/rocm-smi/metadata.xml index 6ae700d1f577..c909acfea388 100644 --- a/dev-util/rocm-smi/metadata.xml +++ b/dev-util/rocm-smi/metadata.xml @@ -9,11 +9,15 @@ <email>gentoo@holzke.net</email> <name>Wilfried Holzke</name> </maintainer> + <maintainer type="person"> + <email>lockalsash@gmail.com</email> + <name>Sv. Lockal</name> + </maintainer> <maintainer type="project" proxied="proxy"> <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> <upstream> - <remote-id type="github">RadeonOpenCompute/ROC-smi</remote-id> + <remote-id type="github">ROCm/ROC-smi</remote-id> </upstream> </pkgmetadata> diff --git a/dev-util/rocm-smi/rocm-smi-6.1.1.ebuild b/dev-util/rocm-smi/rocm-smi-6.1.1.ebuild new file mode 100644 index 000000000000..056dd80b453a --- /dev/null +++ b/dev-util/rocm-smi/rocm-smi-6.1.1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) + +inherit cmake python-r1 + +DESCRIPTION="ROCm System Management Interface Library" +HOMEPAGE="https://github.com/ROCm/rocm_smi_lib" + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ROCm/rocm_smi_lib" + EGIT_BRANCH="master" +else + SRC_URI="https://github.com/ROCm/rocm_smi_lib/archive/rocm-${PV}.tar.gz -> rocm-smi-${PV}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/rocm_smi_lib-rocm-${PV}" +fi + +LICENSE="MIT NCSA-AMD" +SLOT="0/$(ver_cut 1-2)" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS}" + +PATCHES=( + "${FILESDIR}"/${PN}-5.7.1-no-strip.patch + "${FILESDIR}"/${PN}-5.7.1-remove-example.patch + "${FILESDIR}"/${PN}-6.0.2-set-soversion.patch + "${FILESDIR}"/${PN}-6.1.1-fix-const-qualifier.patch +) + +src_prepare() { + cmake_src_prepare + + sed -e "s/@VERSION_MAJOR@/$(ver_cut 1)/" \ + -e "s/@VERSION_MINOR@/$(ver_cut 2)/" \ + -e "s/@VERSION_PATCH@/$(ver_cut 3)/" \ + -i CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + python_foreach_impl python_newscript python_smi_tools/rocm_smi.py rocm-smi + python_foreach_impl python_domodule python_smi_tools/rsmiBindings.py + + mv "${ED}"/usr/share/doc/rocm_smi "${ED}"/usr/share/doc/${PF} || die +} diff --git a/dev-util/rocminfo/Manifest b/dev-util/rocminfo/Manifest index 9a592ca40116..0ea7c677da77 100644 --- a/dev-util/rocminfo/Manifest +++ b/dev-util/rocminfo/Manifest @@ -1,15 +1,10 @@ AUX rocminfo-5.1.3-detect-builtin-amdgpu.patch 1720 BLAKE2B 990b0bfd101fbe41e7dfda85f88d18763371f7c9cdc46ac10a5c695c45d8e29c08f1444b44524ba0917489b89d4906498c81e9e8d805f5ab9b98e2160a394799 SHA512 c193cc7f72df6cc8d5118f1f55ae184f8d80083aee255efb64762b4f0cc00f2c8973515617630dd8267dc1053cac4d1773683870563c29000eb4fd32a7f54e78 AUX rocminfo-5.5.1-detect-builtin-amdgpu.patch 3763 BLAKE2B 8d37239cb8e9964bef2e22ea2e1ccfab53cd10247e4a04b4f7ec03c18fa3b1ad2b734169f277fad2cb8d951bee82d71f42ca97c3bd514edd44a65e78a0b82856 SHA512 5b9b4682ac1babe92ce5d86d9a2f2b62a556dbe804da53de2f34af36806b7ba8b53ba1d1eb0b2c446fb834bb91f46d06401f2f79e10f61f7b7b6cc1cf8846d25 -DIST rocminfo-5.1.3.tar.gz 16772 BLAKE2B 1b35661f9e6cd8cd5180ef3e4fd3dd8e7d6b282947d25c81b0b8bd347a5bee11cf87d950bbd8adcbd7a8a3053c41622b8e99fc0b56f4a14bdf4acf20992becc7 SHA512 998d499b0ae9a22bde30b2c26e31587a78b5ed63a19649d5b203eb47a044f17d1d4d3e951ec094d5be1ca3ba37efa4b19f5b53047727158170fa90c13a8c7563 -DIST rocminfo-5.3.3.tar.gz 16829 BLAKE2B 341908048b9726a22ab5e81317916166d4ba114c5060fd8b7b455e0f4df3857b16a735cfccce2d013cd6632680e29b2e0c9ef91461d46b7e94dc71b0751aa42e SHA512 336a408eb49eb8d40b506f58d62de3fd406d00b0de169bc3f6176c76f1f50366347d212de8783b5c48ae1b6660d307b276ba6b3bac8d8286f5e93cfe739c4dae -DIST rocminfo-5.4.3.tar.gz 16832 BLAKE2B 2344b6bd3ffecdfa657559e4d4d8c09de862ebcda287fd67db9864d19aab0a928b071bc43ddd4a24a31037c61500b1bb9697d11b3031c860c5bac77392c664ef SHA512 80221c91f56cd04ba8dcbddd53bb47cb57bb97b74102890a7a43203e9a2fd572762025feb65676774f774a9a5f0d0a1293fc4508fc82d21b6b4042ad92210096 -DIST rocminfo-5.5.1.tar.gz 17020 BLAKE2B 42fdbd32b7092306dc4442910ae922b616c859439511e2acfb17dee32557d77a9731aeb1d7ce25d32ae76f9cafd1e56476ac522545efe516d238d9285fa7b4a3 SHA512 5710979ee885bf35d40b7d07b157226ea4bb84bd14a2c57bdf8c93ca483685a8ce39d01f15b828d015968102457e9a94335a5273524d98eca76d0f8ceed2e8c1 +AUX rocminfo-6.0.0-detect-builtin-amdgpu.patch 1004 BLAKE2B b75f82db423455391951e6477e7b5a2e63f39f5e8b8eeb88e1ebd7047267defdfd806de7b3b6289106dd70472f63f121426b8528e62cb2ee79d743d66d60529b SHA512 22507911ca38b5147db58c020caf5859e6782211d363059c3e15334348950a921ee00110fa7e16ba9315625eced32b1191ce2f51eb0c97e5c59a9f6c83a541f5 +AUX rocminfo-6.0.0-python-3-12-support.patch 1333 BLAKE2B df3d2a7f338327ac3fbe08820fef1b2f40bdc14aca7091313eb354f2f2bc41373fb67b765554df6939ef5f32fb7fe3cd6c295b4e381917117074ce3f9066b44a SHA512 9bbec362a3c8435a58be53500048ebb0458bff46b3793b9b21019e8994528afd703431bf6ce189a045afdef3941b14d143b2bfb38e50a26f3be16a448c3f6fef +AUX rocminfo-6.0.0_python-3.12.patch 3102 BLAKE2B b11743bceb52b280835eccfe23815541f702c205d62c8e08b1a2a72e5d68882f16689b517f8733738657cef7fab7c933886168d3c9260567400827409856cb06 SHA512 59cca81b13fb3a01a7fbb5e9abf838571cd2ce09ea14e5bb1a72447b6450681dfc58d79cc524e9ffca03c9f4f23fd0cc524bf272fffeb5bc3cd0d70d5358e207 DIST rocminfo-5.7.1.tar.gz 17302 BLAKE2B 395c695ed0b79c771c4240310c457aec893ffd889ddd551866753d2a0c8d4e98399672d74a7114a89faf8b1960dd54fbb0425ea00f7d15e5c740e33ce4046d0b SHA512 38726bc52bd045b6281cccd702706fd6ea5b57cdc421ad23106d5447a002f4b530e8d4e4430d2bb8eb30803af3bacdaf34646a965cea26f42d726bf7f6aafbab -DIST rocminfo-6.0.0.tar.gz 17614 BLAKE2B f296d43103062c492c3a13a8f79a70ebe719126136abe38b020035f0e31819b9b25928aa538416ec9cc733a4e352e83fe8550d15c10f8071b7f889b361814fa6 SHA512 66de2e84b78f69a0c7d302e5432b08874374a45f7d577b158f23abbb40455c574868a7093e64c3a7d19e21dd13b48865a36bd626ef34b99ce52f3363bbb261a7 -EBUILD rocminfo-5.1.3.ebuild 1008 BLAKE2B 283c059c8c574638ae19d88972d41f7f51b99270c2ba9c8edf5e38e9a546e6e872044ef6685eb51965ccbfcbaad97ea5404e11cc66ed16dd604cde853301dc95 SHA512 f729a8e2c7418e42b96d64294cc6b8b6a1a62f319e4f2e2a67bc9219b698ac47d88b6e95d525c5fba83f9431088011c0ad4b54b859eb08e01d2c2ef5d792c390 -EBUILD rocminfo-5.3.3.ebuild 1008 BLAKE2B 283c059c8c574638ae19d88972d41f7f51b99270c2ba9c8edf5e38e9a546e6e872044ef6685eb51965ccbfcbaad97ea5404e11cc66ed16dd604cde853301dc95 SHA512 f729a8e2c7418e42b96d64294cc6b8b6a1a62f319e4f2e2a67bc9219b698ac47d88b6e95d525c5fba83f9431088011c0ad4b54b859eb08e01d2c2ef5d792c390 -EBUILD rocminfo-5.4.3.ebuild 1008 BLAKE2B b6762c3b90d65e74c0d770efe37fcf7632c89426b99d174069da219de96a022fae0b5432b9492c93c7921bd2119b7d843d6ad8130ebe596041d209dfea357a2e SHA512 e8aeb732f6331b153cc322a4d554fcaee681c37b1a9386bca280bd8716cf505e14a018274ffae75dc7d74b6d7e92d3774ab35ec3902b84ff19689f7731843a8a -EBUILD rocminfo-5.5.1.ebuild 1014 BLAKE2B 3302e95273bc3c577b14bd977a507e72e3b9ed397517263abfb1b2c23782f54d6ff726387bf798aaf35609c838eeafe18a04f70bb26b20a73cff4bb70138181b SHA512 d2dc4b9810ed7a63d1c04d2751fcfde0192cf85320a71c8187f579dcf90df02369989f6a1cf96b09725c9d79af3d59d39a20760fa5528f8e5b19bf73e277b647 -EBUILD rocminfo-5.7.1.ebuild 1014 BLAKE2B 3302e95273bc3c577b14bd977a507e72e3b9ed397517263abfb1b2c23782f54d6ff726387bf798aaf35609c838eeafe18a04f70bb26b20a73cff4bb70138181b SHA512 d2dc4b9810ed7a63d1c04d2751fcfde0192cf85320a71c8187f579dcf90df02369989f6a1cf96b09725c9d79af3d59d39a20760fa5528f8e5b19bf73e277b647 -EBUILD rocminfo-6.0.0.ebuild 1014 BLAKE2B 3302e95273bc3c577b14bd977a507e72e3b9ed397517263abfb1b2c23782f54d6ff726387bf798aaf35609c838eeafe18a04f70bb26b20a73cff4bb70138181b SHA512 d2dc4b9810ed7a63d1c04d2751fcfde0192cf85320a71c8187f579dcf90df02369989f6a1cf96b09725c9d79af3d59d39a20760fa5528f8e5b19bf73e277b647 -MISC metadata.xml 370 BLAKE2B 25693db5400c16b160c544c9afbf0a093c18cc94164e38fcde05e50cf6cbeef1f4875f59cf83830f8e700a60508b913430208b96518cc9a14c14f036d8152748 SHA512 763bc8e1c7f89ae046514b721ece281146d0b80768f49699ba8f347ff5f8c6a8facb8e6554c0ac0abfb195797acfb51f30f322fe90f6d342320a1d9cb44e1740 +DIST rocminfo-6.1.1.tar.gz 17740 BLAKE2B 6331054e1c8a59f2d4246c3fcb999afc28a8cabea9d5faf2b95d767f7153ab0930a633ee630cabc4472413a8a54fd9ef798516baa77e94aabda7687a36bf312f SHA512 d2982874ad09bfbe15418a88c2d3360f9bce262674d50f5858a08e52dd266e255f95116c85e069d7e8d28cb323164fb6999c5834163105f33e0c773aede4efdf +EBUILD rocminfo-5.7.1-r1.ebuild 1339 BLAKE2B 5d7ba72f7c1309efc6e5cdd9d05a0c2fccd0abb972ed8caca46004bfb16818d81bbef1fee87ec2a8af1600f8d54ae9c3b775f2168ed3105401ea6d43ef0760ea SHA512 9dc874889be072acbafb3e45b18d336ce4084104efa3df800f3066fca41c7c9cd60e12df55a79efa98fb6259a6fe8eab656615eda90fb4607a3790768b42c755 +EBUILD rocminfo-6.1.1.ebuild 1255 BLAKE2B c1e6948dd71632d93aa11a6ec8c5884bc124daa9db5cc1fe655dc801fa7503479b22c5b39ddc67fb8410b59a696fbf251d8525ae68d66cadbb6cac7d789291b1 SHA512 3096db54c2cdd00029d11e183ef02e80762da6902a4750089dc93c6a8ec8816c4da2d9c01a51d623eb416d7f653246aea3d5a5ac1e82ed1c57729596bfad14fd +MISC metadata.xml 357 BLAKE2B 09a7d224662327ffc7936d1d98691ce626dec3a23ffb7ba1b87da12a58659bff330a7a7718798928898b46754bb96869ec63c766ba25719b3abf88b06dd286d3 SHA512 ddf900d23e4bc3f69f0f1b53c9cff6e6f309a7add531512860e288b0c3593ca76f0590f73a0e934bdb5a4d2cfadb47e64bcfce0a354c31d27af1ff6214c32da8 diff --git a/dev-util/rocminfo/files/rocminfo-6.0.0-detect-builtin-amdgpu.patch b/dev-util/rocminfo/files/rocminfo-6.0.0-detect-builtin-amdgpu.patch new file mode 100644 index 000000000000..8956a790fbe1 --- /dev/null +++ b/dev-util/rocminfo/files/rocminfo-6.0.0-detect-builtin-amdgpu.patch @@ -0,0 +1,33 @@ +https://github.com/ROCm/rocminfo/pull/65 +From: YiyangWu <xgreenlandforwyy@gmail.com> +Date: Wed, 18 Aug 2021 21:05:20 +0800 +Subject: [PATCH] Check /sys/module/amdgpu for ROCk instead of lsmod + +Closes: #42 + +Signed-off-by: YiyangWu <xgreenlandforwyy@gmail.com> +--- + rocminfo.cc | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/rocminfo.cc b/rocminfo.cc +index 8ed9111..78b3afd 100755 +--- a/rocminfo.cc ++++ b/rocminfo.cc +@@ -1063,9 +1063,14 @@ int CheckInitialState(void) { + return -1; + } + } else { +- printf("%sROCk module is NOT loaded, possibly no GPU devices%s\n", ++ int module_dir; ++ module_dir = open("/sys/module/amdgpu", O_DIRECTORY); ++ if (module_dir < 0) { ++ printf("%sROCk module is NOT loaded, possibly no GPU devices%s\n", + COL_RED, COL_RESET); +- return -1; ++ return -1; ++ } ++ close(module_dir); + } + + // Check if user belongs to the group for /dev/kfd (e.g. "video" or diff --git a/dev-util/rocminfo/files/rocminfo-6.0.0-python-3-12-support.patch b/dev-util/rocminfo/files/rocminfo-6.0.0-python-3-12-support.patch new file mode 100644 index 000000000000..2b14e42e4705 --- /dev/null +++ b/dev-util/rocminfo/files/rocminfo-6.0.0-python-3-12-support.patch @@ -0,0 +1,34 @@ +Fix "SyntaxWarning: invalid escape sequence" SyntaxWarning in python 3.12+ +Bug: https://github.com/ROCm/rocminfo/issues/69 +--- a/rocm_agent_enumerator ++++ b/rocm_agent_enumerator +@@ -92,7 +92,7 @@ def getGCNISA(line, match_from_beginning = False): + return result.group(0) + return None + +-@staticVars(search_name=re.compile("gfx[0-9a-fA-F]+(:[-+:\w]+)?")) ++@staticVars(search_name=re.compile(r"gfx[0-9a-fA-F]+(:[-+:\w]+)?")) + def getGCNArchName(line): + result = getGCNArchName.search_name.search(line) + +@@ -149,9 +149,9 @@ def readFromROCMINFO(search_arch_name = False): + + # search AMDGCN gfx ISA + if search_arch_name is True: +- line_search_term = re.compile("\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)") ++ line_search_term = re.compile(r"\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)") + else: +- line_search_term = re.compile("\A\s+Name:\s+(gfx\d+)") ++ line_search_term = re.compile(r"\A\s+Name:\s+(gfx\d+)") + for line in rocminfo_output: + if line_search_term.match(line) is not None: + if search_arch_name is True: +@@ -172,7 +172,7 @@ def readFromLSPCI(): + except: + lspci_output = [] + +- target_search_term = re.compile("1002:\w+") ++ target_search_term = re.compile(r"1002:\w+") + for line in lspci_output: + search_result = target_search_term.search(line) + if search_result is not None: diff --git a/dev-util/rocminfo/files/rocminfo-6.0.0_python-3.12.patch b/dev-util/rocminfo/files/rocminfo-6.0.0_python-3.12.patch new file mode 100644 index 000000000000..9c4530b98b05 --- /dev/null +++ b/dev-util/rocminfo/files/rocminfo-6.0.0_python-3.12.patch @@ -0,0 +1,75 @@ +https://github.com/ROCm/rocminfo/pull/66 +From: Yiyang Wu <xgreenlandforwyy@gmail.com> +Date: Mon, 1 Jan 2024 22:34:23 +0800 +Subject: [PATCH] Fix python3.12 SyntaxWarning: invalid escape sequence + +Use raw strings for regular expression + +Reference: https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes +--- + rocm_agent_enumerator | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +Index: rocminfo-rocm-6.0.0/rocm_agent_enumerator +=================================================================== +--- rocminfo-rocm-6.0.0.orig/rocm_agent_enumerator ++++ rocminfo-rocm-6.0.0/rocm_agent_enumerator +@@ -81,7 +81,7 @@ def staticVars(**kwargs): + return func + return deco + +-@staticVars(search_term=re.compile("gfx[0-9a-fA-F]+")) ++@staticVars(search_term=re.compile(r"gfx[0-9a-fA-F]+")) + def getGCNISA(line, match_from_beginning = False): + if match_from_beginning is True: + result = getGCNISA.search_term.match(line) +@@ -92,7 +92,7 @@ def getGCNISA(line, match_from_beginning + return result.group(0) + return None + +-@staticVars(search_name=re.compile("gfx[0-9a-fA-F]+(:[-+:\w]+)?")) ++@staticVars(search_name=re.compile(r"gfx[0-9a-fA-F]+(:[-+:\w]+)?")) + def getGCNArchName(line): + result = getGCNArchName.search_name.search(line) + +@@ -135,8 +135,8 @@ def readFromROCMINFO(search_arch_name = + break + # run rocminfo + rocminfo_output = subprocess.Popen(rocminfo_executable, stdout=subprocess.PIPE).communicate()[0].decode("utf-8").split('\n') +- term1 = re.compile("Cannot allocate memory") +- term2 = re.compile("HSA_STATUS_ERROR_OUT_OF_RESOURCES") ++ term1 = re.compile(r"Cannot allocate memory") ++ term2 = re.compile(r"HSA_STATUS_ERROR_OUT_OF_RESOURCES") + done = 1 + for line in rocminfo_output: + if term1.search(line) is not None or term2.search(line) is not None: +@@ -149,9 +149,9 @@ def readFromROCMINFO(search_arch_name = + + # search AMDGCN gfx ISA + if search_arch_name is True: +- line_search_term = re.compile("\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)") ++ line_search_term = re.compile(r"\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)") + else: +- line_search_term = re.compile("\A\s+Name:\s+(gfx\d+)") ++ line_search_term = re.compile(r"\A\s+Name:\s+(gfx\d+)") + for line in rocminfo_output: + if line_search_term.match(line) is not None: + if search_arch_name is True: +@@ -172,7 +172,7 @@ def readFromLSPCI(): + except: + lspci_output = [] + +- target_search_term = re.compile("1002:\w+") ++ target_search_term = re.compile(r"1002:\w+") + for line in lspci_output: + search_result = target_search_term.search(line) + if search_result is not None: +@@ -196,7 +196,7 @@ def readFromKFD(): + if os.path.isdir(node_path): + prop_path = node_path + '/properties' + if os.path.isfile(prop_path) and os.access(prop_path, os.R_OK): +- target_search_term = re.compile("gfx_target_version.+") ++ target_search_term = re.compile(r"gfx_target_version.+") + with open(prop_path) as f: + try: + line = f.readline() diff --git a/dev-util/rocminfo/metadata.xml b/dev-util/rocminfo/metadata.xml index 3213bd34da97..24dcfaf2507f 100644 --- a/dev-util/rocminfo/metadata.xml +++ b/dev-util/rocminfo/metadata.xml @@ -6,6 +6,6 @@ <name>Craig Andrews</name> </maintainer> <upstream> - <remote-id type="github">RadeonOpenCompute/rocminfo</remote-id> + <remote-id type="github">ROCm/rocminfo</remote-id> </upstream> </pkgmetadata> diff --git a/dev-util/rocminfo/rocminfo-5.1.3.ebuild b/dev-util/rocminfo/rocminfo-5.1.3.ebuild deleted file mode 100644 index 6c175c0a3bd4..000000000000 --- a/dev-util/rocminfo/rocminfo-5.1.3.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="UoI-NCSA" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND=">=dev-libs/rocr-runtime-${PV}" -DEPEND="${RDEPEND}" - -PATCHES=("${FILESDIR}/${PN}-5.1.3-detect-builtin-amdgpu.patch") - -src_prepare() { - sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die - sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) - cmake_src_configure -} diff --git a/dev-util/rocminfo/rocminfo-5.4.3.ebuild b/dev-util/rocminfo/rocminfo-5.4.3.ebuild deleted file mode 100644 index 15e50f8d07fa..000000000000 --- a/dev-util/rocminfo/rocminfo-5.4.3.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="UoI-NCSA" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND=">=dev-libs/rocr-runtime-${PV}" -DEPEND="${RDEPEND}" - -PATCHES=("${FILESDIR}/${PN}-5.1.3-detect-builtin-amdgpu.patch") - -src_prepare() { - sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die - sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) - cmake_src_configure -} diff --git a/dev-util/rocminfo/rocminfo-5.5.1.ebuild b/dev-util/rocminfo/rocminfo-5.5.1.ebuild deleted file mode 100644 index 296b859a1fd3..000000000000 --- a/dev-util/rocminfo/rocminfo-5.5.1.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="UoI-NCSA" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND=">=dev-libs/rocr-runtime-${PV}" -DEPEND="${RDEPEND}" - -#PATCHES=( -# "${FILESDIR}/${PN}-5.5.1-detect-builtin-amdgpu.patch" -#) - -src_prepare() { - sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die - sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) - cmake_src_configure -} diff --git a/dev-util/rocminfo/rocminfo-5.3.3.ebuild b/dev-util/rocminfo/rocminfo-5.7.1-r1.ebuild index 6c175c0a3bd4..4b5df7bd0033 100644 --- a/dev-util/rocminfo/rocminfo-5.3.3.ebuild +++ b/dev-util/rocminfo/rocminfo-5.7.1-r1.ebuild @@ -1,9 +1,10 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit cmake +PYTHON_COMPAT=( python3_{11..12} ) +inherit cmake python-r1 if [[ ${PV} == *9999 ]] ; then EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" @@ -19,14 +20,20 @@ HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" LICENSE="UoI-NCSA" SLOT="0/$(ver_cut 1-2)" -RDEPEND=">=dev-libs/rocr-runtime-${PV}" +RDEPEND=">=dev-libs/rocr-runtime-${PV} + ${PYTHON_DEPS}" DEPEND="${RDEPEND}" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" -PATCHES=("${FILESDIR}/${PN}-5.1.3-detect-builtin-amdgpu.patch") +PATCHES=( + "${FILESDIR}/${PN}-6.0.0-detect-builtin-amdgpu.patch" + "${FILESDIR}/${PN}-6.0.0_python-3.12.patch" +) src_prepare() { sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die - sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" + sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" \ + -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" cmake_src_prepare } @@ -34,3 +41,9 @@ src_configure() { local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) cmake_src_configure } + +src_install() { + cmake_src_install + rm "${ED}/usr/bin/rocm_agent_enumerator" || die + python_foreach_impl python_doexe rocm_agent_enumerator "${BUILD_DIR}"/rocm_agent_enumerator +} diff --git a/dev-util/rocminfo/rocminfo-5.7.1.ebuild b/dev-util/rocminfo/rocminfo-5.7.1.ebuild deleted file mode 100644 index 296b859a1fd3..000000000000 --- a/dev-util/rocminfo/rocminfo-5.7.1.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="UoI-NCSA" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND=">=dev-libs/rocr-runtime-${PV}" -DEPEND="${RDEPEND}" - -#PATCHES=( -# "${FILESDIR}/${PN}-5.5.1-detect-builtin-amdgpu.patch" -#) - -src_prepare() { - sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die - sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) - cmake_src_configure -} diff --git a/dev-util/rocminfo/rocminfo-6.0.0.ebuild b/dev-util/rocminfo/rocminfo-6.0.0.ebuild deleted file mode 100644 index 296b859a1fd3..000000000000 --- a/dev-util/rocminfo/rocminfo-6.0.0.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/" - inherit git-r3 -else - SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" - S="${WORKDIR}/rocminfo-rocm-${PV}" -fi - -DESCRIPTION="ROCm Application for Reporting System Info" -HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo" -LICENSE="UoI-NCSA" -SLOT="0/$(ver_cut 1-2)" - -RDEPEND=">=dev-libs/rocr-runtime-${PV}" -DEPEND="${RDEPEND}" - -#PATCHES=( -# "${FILESDIR}/${PN}-5.5.1-detect-builtin-amdgpu.patch" -#) - -src_prepare() { - sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die - sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) - cmake_src_configure -} diff --git a/dev-util/rocminfo/rocminfo-6.1.1.ebuild b/dev-util/rocminfo/rocminfo-6.1.1.ebuild new file mode 100644 index 000000000000..5f6dfcd53860 --- /dev/null +++ b/dev-util/rocminfo/rocminfo-6.1.1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..13} ) +inherit cmake python-r1 + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/ROCm/rocminfo/" + inherit git-r3 +else + SRC_URI="https://github.com/ROCm/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/rocminfo-rocm-${PV}" +fi + +DESCRIPTION="ROCm Application for Reporting System Info" +HOMEPAGE="https://github.com/ROCm/rocminfo" +LICENSE="UoI-NCSA" +SLOT="0/$(ver_cut 1-2)" + +RDEPEND=">=dev-libs/rocr-runtime-${PV} + ${PYTHON_DEPS}" +DEPEND="${RDEPEND}" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +PATCHES=( + "${FILESDIR}/${PN}-6.0.0-detect-builtin-amdgpu.patch" +) + +src_prepare() { + sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die + sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" \ + -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( -DROCRTST_BLD_TYPE=Release ) + cmake_src_configure +} + +src_install() { + cmake_src_install + rm "${ED}/usr/bin/rocm_agent_enumerator" || die + python_foreach_impl python_doexe rocm_agent_enumerator "${BUILD_DIR}"/rocm_agent_enumerator +} diff --git a/dev-util/roctracer/Manifest b/dev-util/roctracer/Manifest index 09b1bca32d8a..3f7eff645618 100644 --- a/dev-util/roctracer/Manifest +++ b/dev-util/roctracer/Manifest @@ -13,7 +13,9 @@ DIST rocm-tracer-5.1.3.tar.gz 511617 BLAKE2B 4142979b3b7d649798a7ac0b2a04b42aa7f DIST rocm-tracer-5.3.3.tar.gz 353041 BLAKE2B b7614707ae3af2f5a46d058dacadfb0ef3b980963ac49face66a80c8396e66cf13e0430ab41737ba15e163f5da03697376b13238ea1decfe7ee4a7f31c7664a5 SHA512 95a202f76f6b68a35942750233bd09d372a9be843150d7ec02824da13c6b9a7c8da7a752ac69f66776e7ccfb6176473745dc46a7baadfe77c99c0596fbc2ffeb DIST rocprofiler-5.1.3.tar.gz 1402172 BLAKE2B 16e9b127ede94a3f96056e84a2942b6c9f3aec90579fb12796ab8ba385160aa020e3dc77f7a475dadbc0a813a823ae733ca9560f6a09e55c4c82b13dd792dfa4 SHA512 6e9932a425eaaa2a1e1741280d7525c6360700f85edb3bcf4967fe9be4fed662bae0d2ba609701f0d9733769c340e93e32076024b27bab3303449c1d68d9e1ce DIST roctracer-5.7.1.tar.gz 354686 BLAKE2B 2e72d8df5cf53a913102a715dab55f7c6d33b2d4a9cad7647a61824deba0363cf3dbf96d8de3469a78d6b5c8e517c163c303bf6aa12eeaf8e43f82ac8381ef97 SHA512 62cf62fc505955426596bd6d539c92f4d730d90d820d817343525f1b7be693290727c8c447ca98b1a0e46d1d188b62b3f4fafcf6bffbf2479fc5d937fb354e13 +DIST roctracer-6.1.1.tar.gz 396688 BLAKE2B e332c3a6056d1678e3da511878fd2710a4eaa02526cd1e7353dd1dbcba776cb77e6e431d90daf5f238ec7793fc8e9f51afd7f09992f70b26c7e3aab28bb319a9 SHA512 d59c367953b1d5df0daae96746095e2e19f706f43b5ebed3d45c15d23697e9c99c1623bbb8dfa001648fdeda172a3c1d820d884b6da3946addec8f4b9a86e5dc EBUILD roctracer-5.1.3-r1.ebuild 2414 BLAKE2B 177f01dc1079d29a764541b00b1df66763691cf42a6115c6c7f76a525605c928852d485271f5812efeb5b9aaa752c83213db6d874386e2a8e6796d32a01ea443 SHA512 2860674405c36b699c633737549a03382acd113be07371dbde78c25ec965208618218f85e940aba6280676918f34c7e6d3a8181c71f9b1f57ff976406e46f75a EBUILD roctracer-5.3.3-r1.ebuild 1659 BLAKE2B d8b729531db35650b674f30e2c9aeb2c494d82705bd46c784365dbe7d6396dfdba9339af5e378a4eec35a40f93fded8b2df4c0d583b976bc689d51d087d6900f SHA512 7efbf7deaf110325d6df22f1180609f7ffa54bf3b34ca50a9c2fa2b4c4b0359ff2c4aa881e4c36d8a11db3946bf6cc8746f9c384811635beed945b35565cc1ae EBUILD roctracer-5.7.1-r1.ebuild 2230 BLAKE2B a2a1f033a011244d6039107c7f121b39965abfe12c362eedcb0d1e13c63e09dc7a8214b9115fd59ea5c4c5faced21f4e8ead45277ad9f5d49b1f3145f0abfca2 SHA512 ef63e786f59130b2b4bbe071d598b44d04aa66a932f17739908f41dfc4029debcbcc139cd4693a970ed7e7b2a2d70d497806c651fe634dec775991fdbe06e0c3 -MISC metadata.xml 620 BLAKE2B 305256592e98101accc2200175ee94af58ac66f529fc01978972b9daeb33c1588751e242fc72a69860e5aada7a94f641c71d60d4b2ae48daca8f606f1336e8d9 SHA512 10b5b9a17a3696915eefc0602ff21b160ddd9c45390ae2bb35472c213f1b3d67b5f650c962218b6300d51284ca5086a439c8f5fea52272f81ef014025c48f4f7 +EBUILD roctracer-6.1.1.ebuild 2325 BLAKE2B 4038182909251dfc4d15b499e881fd555909f03886420c67ab2e52cdb9bec35c19bda6531e0af1aa60a76ed8c54b78261465675141cc8fcf49c363f3858a3024 SHA512 c90319f75e904475cc0bea9f06a26809eccf39551737b3443b1f08e3a41c924f0c958e1ff379ad10459e80cf7525940ad218f8cc61ca187275017384d79f7003 +MISC metadata.xml 717 BLAKE2B 9705d469093d1851c10e8f727b43300a1fbe1746057114ddeaa38520a094a8906c1a8bd13869e3f84ffff652b68823f63522685a97ab3d3f0fdcb52283fc27bd SHA512 d6ff1910d66ed3990e965826f0df28c74b9b6287f4dc4d619425c2803a1092bcd1c7d8dc9776e5ae3366a31f3a56d498b0ffaf8f7c336af623df02421de26430 diff --git a/dev-util/roctracer/metadata.xml b/dev-util/roctracer/metadata.xml index 872a2a3bdb22..a7f7157360b0 100644 --- a/dev-util/roctracer/metadata.xml +++ b/dev-util/roctracer/metadata.xml @@ -13,7 +13,11 @@ <email>gentoo@holzke.net</email> <name>Wilfried Holzke</name> </maintainer> + <maintainer type="person"> + <email>lockalsash@gmail.com</email> + <name>Sv. Lockal</name> + </maintainer> <upstream> - <remote-id type="github">ROCm-Developer-Tools/roctracer</remote-id> + <remote-id type="github">ROCm/roctracer</remote-id> </upstream> </pkgmetadata> diff --git a/dev-util/roctracer/roctracer-6.1.1.ebuild b/dev-util/roctracer/roctracer-6.1.1.ebuild new file mode 100644 index 000000000000..61a5b02149f2 --- /dev/null +++ b/dev-util/roctracer/roctracer-6.1.1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +LLVM_COMPAT=( 18 ) +ROCM_VERSION=${PV} + +inherit cmake prefix python-any-r1 rocm llvm-r1 + +DESCRIPTION="Callback/Activity Library for Performance tracing AMD GPU's" +HOMEPAGE="https://github.com/ROCm/roctracer" +SRC_URI="https://github.com/ROCm/roctracer/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/roctracer-rocm-${PV}" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-util/hip:${SLOT} + dev-libs/rocr-runtime +" +DEPEND="${RDEPEND}" +BDEPEND=" + $(python_gen_any_dep ' + dev-python/CppHeaderParser[${PYTHON_USEDEP}] + dev-python/ply[${PYTHON_USEDEP}] + ') +" + +PATCHES=( + "${FILESDIR}"/roctracer-5.7.1-with-tests.patch +) + +python_check_deps() { + python_has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]" \ + "dev-python/ply[${PYTHON_USEDEP}]" +} + +pkg_setup() { + python-any-r1_pkg_setup + llvm-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare + + hprefixify script/*.py + eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.3.3-rocm-path.patch) + + # Install libs directly into /usr/lib64 + sed -e 's:${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}:${CMAKE_INSTALL_LIBDIR}:g' \ + -i src/CMakeLists.txt plugin/file/CMakeLists.txt || die + + # Remove all install commands for tests + sed -E '/^ *install\(.+/d' -i test/CMakeLists.txt || die + + # Fix search path for HIP cmake + sed -e "s,\${ROCM_PATH}/lib/cmake,/usr/$(get_libdir)/cmake,g" -i test/CMakeLists.txt || die + + # bug #892732 + sed -i -e 's/-Werror//' CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/cmake/hip" + -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF + -DWITH_TESTS=$(usex test) + -DPython3_EXECUTABLE="${PYTHON}" + ) + use test && mycmakeargs+=( + -DHIP_ROOT_DIR="${EPREFIX}/usr" + -DHIP_CLANG_INSTALL_DIR="$(get_llvm_prefix)/bin" + -DGPU_TARGETS="$(get_amdgpu_flags)" + ) + + 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/$(get_libdir):${LD_LIBRARY_PATH}" bash run.sh || die +} + +src_install() { + cmake_src_install + + # remove unneeded copy + rm -r "${ED}/usr/share/doc/${PF}-asan" || die +} |