diff options
author | YiyangWu <xgreenlandforwyy@gmail.com> | 2022-05-02 14:16:07 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2022-05-03 13:41:33 +0800 |
commit | fcd1defe545055ec827cf020a27e0ae6458af829 (patch) | |
tree | 1be2c3e0d31d94e9d7c2a894e5a5852e02b0320d /sci-libs | |
parent | sci-libs/rocPRIM: bump version to 5.0.2 (diff) | |
download | gentoo-fcd1defe545055ec827cf020a27e0ae6458af829.tar.gz gentoo-fcd1defe545055ec827cf020a27e0ae6458af829.tar.bz2 gentoo-fcd1defe545055ec827cf020a27e0ae6458af829.zip |
sci-libs/hipCUB: bump to 5.0.2
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/hipCUB/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/hipCUB/hipCUB-5.0.2.ebuild | 74 |
2 files changed, 75 insertions, 0 deletions
diff --git a/sci-libs/hipCUB/Manifest b/sci-libs/hipCUB/Manifest index 4d4a1a030483..4038ecb82108 100644 --- a/sci-libs/hipCUB/Manifest +++ b/sci-libs/hipCUB/Manifest @@ -1,2 +1,3 @@ DIST hipCUB-4.0.0.tar.gz 137513 BLAKE2B b7ef4d53037fba04771162ae8993def648f5e1401654286ffc6987bbb4b25baa1b1b14bc37035e1afe46eeffe3e564f244e339cdfd0e5a242574d248bf4683db SHA512 e778b94c86e09bf3b0bc043fb15ed8725387b875e8631a7e8599aee8da2d8085190effc9681d742fc0d286cc0c20762341f1f24699c8a52e9734611c716530d5 DIST hipCUB-4.3.0.tar.gz 154097 BLAKE2B 68a46f1416c969e4bf8e245c2aa8aee626f1e8089182ffb8f5090d540efe98606a616499d52b14da3733b3a6f4da690ea1718ea58fb6166351f4b4807f1b8228 SHA512 7c0abcf034d885615a9a4f05e6ca906e99b0ffbe36ae3d4b9d9d79b01d21077dc86be659548b45dad8498b84bec24dc0a5be78040c1ab21ca458d22fa7fae43d +DIST hipCUB-5.0.2.tar.gz 243032 BLAKE2B 68256c0868bd23dbd78075ab286fc0738dc90f330a7e99186803e7920b3366f5608986dd9e3f4c5a045f9ec3f2461a66ab5b708d5d1d3fc748d042dd929a7993 SHA512 ae4d55fcf513eb5dd1316e335a0de30f6098eba70e877b41905bc59f3fb500ad9a46a28de77b74b914a15ffc38ad5c5f4dbdf36139505c26b94c43ffa5c90e01 diff --git a/sci-libs/hipCUB/hipCUB-5.0.2.ebuild b/sci-libs/hipCUB/hipCUB-5.0.2.ebuild new file mode 100644 index 000000000000..176c254b3384 --- /dev/null +++ b/sci-libs/hipCUB/hipCUB-5.0.2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Wrapper of rocPRIM or CUB for GPU parallel primitives" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/hipCUB" +SRC_URI="https://github.com/ROCmSoftwarePlatform/hipCUB/archive/rocm-${PV}.tar.gz -> hipCUB-${PV}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" +IUSE="benchmark test" +RESTRICT="!test? ( test )" + +RDEPEND="dev-util/hip + sci-libs/rocPRIM:${SLOT} + benchmark? ( dev-cpp/benchmark ) + test? ( dev-cpp/gtest ) +" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/hipCUB-rocm-${PV}" + +PATCHES="${FILESDIR}/${PN}-4.3.0-add-memory-header.patch" + +src_prepare() { + sed -e "/PREFIX hipcub/d" \ + -e "/DESTINATION/s:hipcub/include/:include/:" \ + -e "/rocm_install_symlink_subdir(hipcub)/d" \ + -e "/<INSTALL_INTERFACE/s:hipcub/include/:include/hipcub/:" -i hipcub/CMakeLists.txt || die + + sed -e "s:\${ROCM_INSTALL_LIBDIR}:\${CMAKE_INSTALL_LIBDIR}:" -i cmake/ROCMExportTargetsHeaderOnly.cmake || die + + # disable downloading googletest and googlebenchmark + sed -r -e '/Downloading/{:a;N;/\n *\)$/!ba; d}' -i cmake/Dependencies.cmake || die + + # remove GIT dependency + sed -r -e '/find_package\(Git/{:a;N;/\nendif/!ba; d}' -i cmake/Dependencies.cmake || die + + if use benchmark; then + sed -e "/get_filename_component/s,\${BENCHMARK_SOURCE},${PN}_\${BENCHMARK_SOURCE}," \ + -e "/add_executable/a\ install(TARGETS \${BENCHMARK_TARGET})" -i benchmark/CMakeLists.txt || die + fi + + eapply_user + cmake_src_prepare +} + +src_configure() { + # Grant access to the device + addwrite /dev/kfd + addpredict /dev/dri/ + + # Compiler to use + export CXX=hipcc + + local mycmakeargs=( + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARK=$(usex benchmark ON OFF) + ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"} + ) + + cmake_src_configure +} + +src_test() { + # Grant access to the device + addwrite /dev/kfd + addwrite /dev/dri/ + MAKEOPTS="-j1" cmake_src_test +} |