diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-31 08:59:54 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-31 08:59:54 +0100 |
commit | 3b08f674e3f771b49370edb144dab0958c8cf721 (patch) | |
tree | 3673eb62859b2343bc70589f2f9d670c2eee5cc8 /dev-util/hip | |
parent | b1c81de4fadbd00897700a7321f03b390d952b2e (diff) |
gentoo resync : 31.08.2021
Diffstat (limited to 'dev-util/hip')
-rw-r--r-- | dev-util/hip/Manifest | 4 | ||||
-rw-r--r-- | dev-util/hip/files/hip-4.3.0-hip_vector_types.patch | 11 | ||||
-rw-r--r-- | dev-util/hip/hip-4.3.0.ebuild | 107 |
3 files changed, 122 insertions, 0 deletions
diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest index 45f189f8a40a..9768fda9c37f 100644 --- a/dev-util/hip/Manifest +++ b/dev-util/hip/Manifest @@ -7,13 +7,17 @@ AUX hip-3.9.0-lpl_ca-add-include.patch 418 BLAKE2B 7d1439e51b1c5e20fcb1768c5f33b AUX hip-4.1.0-DisableTest.patch 2201 BLAKE2B 2e3ba78fe748312edad994d063c2a41e75ec988d8c04ca97bcec15b33cc8328e384b64e3be7bd43bbcb21b947db40a0e153b249921dab0f9e1ecc0926a16fd6d SHA512 8d98b0a53b7b10f7ce3e30ca969181aa01325da6f6627ab7e190e32fbfc6fc659ea07a0a7afe6f20732e7009b9a2da66d8788814d942dbbcdae3d5384c21b8da 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-4.3.0-hip_vector_types.patch 304 BLAKE2B 2821fb3bc7aa093a2f17fbb8baff8c5d68080f61a8636163d0c69463390f0ff553a0b67aa0a5879edbfd54a6afdae81325a8eaf58fb89cb6168cf6ccc5cc9208 SHA512 6d32cc886229d94b18b9779f30e81bb2e9cf51bd47385dc692ae49dd308de16e229a2fc560e5c40dad15f1c9c75038f13960754e0dbc57b3f281e5dfa6701f6c AUX hipvars.pm 598 BLAKE2B 1645b12179195b95757d207248c85b7c8d9eda0347caee5cb48bdc66e85fda517f607bcb69cdfc63657a0db04ad8e96494a0a80268df7c17d6bb0e689325c2e8 SHA512 6c4e71455341673a329b4b0163fefd7f2f4b7d62da3496643d0de096755899c99b3b5a80fffbdf29896c234cb4f617b368217f4eecfd005849b294ff434b79c6 DIST rocm-hip-4.0.0.tar.gz 1012154 BLAKE2B 02343239a5b27c42dafd241f2c9b6f5195c50f78bfd717ae72bcb16d384bd6cf97ff6f2b86bfcf323aaaf022d6897f46d0987826c80d6f6279be4cb4792e15be SHA512 cf840dbe28a9a15e3be14351bfa22d3c81e1654813a7aee55f53e71b2ee183f8dd0de14a79791617fabb5b357cadbf2ce2f476f78884b2843d30f206d65088f6 DIST rocm-hip-4.1.0.tar.gz 954215 BLAKE2B c4b75ab2158e6921be1c34820ab5d1a5e2eb36112834b0143c50023caa27de384e0497f4837947cc7fe05554c6c95201340b1979eb916b31ebb4ffec8c923735 SHA512 420ffd7b79e2b4506873cbfc56e96395f8ed9d9375ce28df51626601199d4d8dca6920528e255d39a48ad66ee11f4b653f3b9f659df489d32b21886fb86c64b5 DIST rocm-hip-4.2.0.tar.gz 918281 BLAKE2B 45c28289c8ff9e600bfd9daff8af162c897fcfdf41ce65d91d1761d58253d87a6385fd4a15e818619ca39d3413479bf043ab2758fead349a243105e979b64f7c SHA512 e620507321c949ded2eab6159099eef0eab267eb686b6ee0ed86022fffaa51fb8714a7f344b79acf76c876c55919360905d1bb3a7c00a87f40174774d6682ce8 +DIST rocm-hip-4.3.0.tar.gz 967550 BLAKE2B 263e8bbaa86198d3cb6a29f5597b56a3fe1e9338a8c485935070e6253816ccdba9671f33d8142c260aa3c36f43a71de7f2c1b7a15e1227f97aaf03ed10ce10dd SHA512 bc2d9597200405397387cc8f626f0cc734ee450c462bd7c7a0c655e3dfe2d1e09780328cbfa1c0d1e0db836e561fc450c5d514a6ad1a5828cb913c4c3c535ef1 +DIST rocm-opencl-runtime-4.3.0.tar.gz 1006792 BLAKE2B 29fd5843bb0153c7d3fe5250898f0fbdd089db6304122698c9ec9a5436e3a6845916f241f1a1e79a614e369f000297ac12413620edec0660d859ccddaa978d07 SHA512 a514d626700350f2c663db468427479eaa9e39dd912266ac2db6830d712351ffbc18737b208fd37f7ab5afdc2c9f6412d8d765973d6c72759bf51f864fc6bf1d EBUILD hip-4.0.0-r1.ebuild 3817 BLAKE2B c01eb20493f27e9650d1cad3413b7fa14ef799d67e8b02de235d1e37a4f6633c8f0f6ea73fa8f075d0a10ffb2dbe0ccba4a65c4a505e665be7d657d5c773641a SHA512 2b5b58f13d832572f547f5ba4e67daf62b180523424e1e4605e96d1b7d834b700f8aebc95b047ab08ba36e16098aa07ddf7f9c91654672b00edc863bb5c25d68 EBUILD hip-4.0.0.ebuild 3451 BLAKE2B c219b26871ab9197ddd75a4d8e03bdb2d6f9c12cc9d8bd4b29e1babceb3572afb5f859288c395952befd8520fdf2875703566a4dd7280045f98f309af8c3756b SHA512 d7b82a954d9dfde559e48dcad266aa7d3cb204442045ea2c3eaeafa7513f0f549ca3a656d5d823e636600e3b9112fd276fbfb9e9ebac74f01024327de76276dd EBUILD hip-4.1.0-r1.ebuild 3366 BLAKE2B c8663bbba532bca211de1a8b8253e2df9544cc656ae47a0d8e651161f7e4186227b9cdc11e3b3b010bbb1d8a18ff36ece37d5a9ad4092ed496f3c9d1e7dc7791 SHA512 fc2145fad2fe1e5a28331a91959c591693cec497504344e6ae2587276d7b20e7895d94780273a0f83307efbb0e6099e0bdc1874bcefa2595590a736092502891 EBUILD hip-4.1.0.ebuild 3476 BLAKE2B 101bb84d3083388e6dc761dca7ccf0ef5393a44be7666831e83303d1dfbd50e81e3fa09d572f9c5cdf30c6fb738e0587bb9ddd0ccb0627bef543bd64648b66f0 SHA512 3af9dc2a5ab5735dfb0cd5341cfe1e99961858d40409ffb065231bea793b8faa3de3b305d28f2dce90e4535e0406f90a3f933b4cbab06933d83b04dd3e433023 EBUILD hip-4.2.0.ebuild 3634 BLAKE2B 6ab4a5d74b08a2dd765bae85bb91fa7174cb0fbe411c7f4b741db6e49b47d42277e5bbba7e86637b8481a24d2eb0f53b7cb096d4dea09f0a6fc31538a4250fbe SHA512 ad8e4ba2df35b36f96047bdf40e0f7420256eedaa9432249d3d6d184ccfb2d0acbec7d679dfbef8fd278dd6d748334de927a50e7c00f35ce4823af2297d14b5b +EBUILD hip-4.3.0.ebuild 3761 BLAKE2B 7fdd7e65a7b1b246ad94a1e5ee37e7c3199f9dcc02df575e774fdbacf9690ac7609f53c122eff5dd87cddf9afd9c4f52d66a5502b3ec311fd6e9db5f3889a895 SHA512 07d8317cae9f7b2f4c179938477eb00ff8d0a136c730bd18582a835c23a8d9934d03824c2bb520c53cb1c2525e26618236b12dfcbfe520612a60c191a1d2947b MISC metadata.xml 596 BLAKE2B 32b0fcf237a501e546584504ead6f5cc817f5f7891715df60d9e6a8863a87d779f6ccdb365536338440b3bdeb1f541dc481f2a29c014506519f6c62f9834ef0d SHA512 b67b87b25453471fe1337c78095341c00fe6e76a4d222390cb47d1b52226f7ebdf23c1f66f5926819a384ac1473cb1d6f22f5467ec1c600a5a96eef5e24fe1d2 diff --git a/dev-util/hip/files/hip-4.3.0-hip_vector_types.patch b/dev-util/hip/files/hip-4.3.0-hip_vector_types.patch new file mode 100644 index 000000000000..faad9629740f --- /dev/null +++ b/dev-util/hip/files/hip-4.3.0-hip_vector_types.patch @@ -0,0 +1,11 @@ +mitigate compilation error +--- a/include/hip/amd_detail/hip_vector_types.h ++++ b/include/hip/amd_detail/hip_vector_types.h +@@ -45,6 +45,7 @@ THE SOFTWARE. + + #if defined(__cplusplus) + #if !defined(__HIPCC_RTC__) ++ #include <new> + #include <array> + #include <iosfwd> + #include <type_traits> diff --git a/dev-util/hip/hip-4.3.0.ebuild b/dev-util/hip/hip-4.3.0.ebuild new file mode 100644 index 000000000000..7e522e9fb0e5 --- /dev/null +++ b/dev-util/hip/hip-4.3.0.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit cmake flag-o-matic prefix + +DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" +HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIP" +SRC_URI="https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz -> rocm-hip-${PV}.tar.gz + https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz" + +KEYWORDS="~amd64" +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" + +IUSE="debug profile" + +DEPEND="dev-libs/rocclr:${SLOT} + dev-util/rocminfo:${SLOT} + =sys-devel/llvm-roc-${PV}*[runtime] + profile? ( dev-util/roctracer:${SLOT} )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-4.1.0-DisableTest.patch" + "${FILESDIR}/${PN}-3.9.0-add-include-directories.patch" + "${FILESDIR}/${PN}-4.2.0-config-cmake-in.patch" + "${FILESDIR}/${PN}-4.3.0-hip_vector_types.patch" + "${FILESDIR}/${PN}-4.2.0-cancel-hcc-header-removal.patch" +) + +S="${WORKDIR}/HIP-rocm-${PV}" + +src_prepare() { + cmake_src_prepare + eapply_user + + # Use Gentoo slot number, otherwise git hash is attempted in vain. + sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING ${SLOT#*/})" -i CMakeLists.txt || die + + # disable PCH, because it results in a build error in ROCm 4.0.0 + sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i CMakeLists.txt || die + + # remove forcing set USE_PROF_API to 1 + sed -e '/set(USE_PROF_API "1")/d' -i rocclr/CMakeLists.txt || die + + # "hcc" is deprecated and not installed, new platform is "rocclr"; + # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include" + # which makes "stdlib.h" not found when using "#include_next" in header files; + sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \ + -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \ + -e "/rpath/s,--rpath=[^ ]*,," \ + -i bin/hipcc || die + + # correctly find HIP_CLANG_INCLUDE_PATH using cmake + sed -e "/set(HIP_CLANG_ROOT/s:\"\${ROCM_PATH}/llvm\":/usr/lib/llvm/roc:" -i hip-config.cmake.in || die + + # change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align with "dev-libs/rocm-device-libs" + sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \ + -i "${S}/hip-config.cmake.in" || die + + einfo "prefixing hipcc and its utils..." + hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}") + + cp "$(prefixify_ro "${FILESDIR}"/hipvars.pm)" bin/ || die "failed to replace hipvars.pm" + sed -e "s,@HIP_BASE_VERSION_MAJOR@,$(ver_cut 1)," -e "s,@HIP_BASE_VERSION_MINOR@,$(ver_cut 2)," \ + -e "s,@HIP_VERSION_PATCH@,$(ver_cut 3)," -i bin/hipvars.pm || die + + cp -a "${WORKDIR}"/ROCm-OpenCL-Runtime-rocm-${PV}/amdocl/cl_vk_amd.hpp amdocl/ || die +} + +src_configure() { + use debug && CMAKE_BUILD_TYPE="Debug" + + # TODO: Currently a GENTOO configuration is build, + # this is also used in the cmake configuration files + # which will be installed to find HIP; + # Other ROCm packages expect a "RELEASE" configuration, + # see "hipBLAS" + local mycmakeargs=( + -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/lib/llvm/roc" + -DCMAKE_BUILD_TYPE=${buildtype} + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/hip" + -DBUILD_HIPIFY_CLANG=OFF + -DHIP_PLATFORM=rocclr + -DHIP_COMPILER=clang + -DROCM_PATH="${EPREFIX}/usr" + -DHSA_PATH="${EPREFIX}/usr" + -DUSE_PROF_API=$(usex profile 1 0) + -DPROF_API_HEADER_PATH="${EPREFIX}"/usr/include/roctracer/ext + -DROCclr_DIR="${EPREFIX}"/usr/include/rocclr + ) + + cmake_src_configure +} + +src_install() { + echo "PATH=${EPREFIX}/usr/lib/hip/bin" >> 99hip || die + echo "LDPATH=${EPREFIX}/usr/lib/hip/lib" >> 99hip || die + echo "ROOTPATH=${EPREFIX}/usr/lib/hip/bin" >> 99hip || die + + doenvd 99hip + + cmake_src_install + + rm "${ED}/usr/lib/hip/include/hip/hcc_detail" || die +} |