diff options
author | Sv. Lockal <lockalsash@gmail.com> | 2023-10-31 14:51:43 +0000 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2023-11-27 22:34:56 +0800 |
commit | 6aa1f9f5786ee1e26310591066c45252addb3cca (patch) | |
tree | 81bfda805a7d0e95175132d0b8f9cebfb577a4d7 /sci-libs | |
parent | sci-libs/rocThrust: add 5.7.1 (diff) | |
download | gentoo-6aa1f9f5786ee1e26310591066c45252addb3cca.tar.gz gentoo-6aa1f9f5786ee1e26310591066c45252addb3cca.tar.bz2 gentoo-6aa1f9f5786ee1e26310591066c45252addb3cca.zip |
sci-libs/hipCUB: add 5.7.1
Bug: https://github.com/gentoo/gentoo/pull/33400
Signed-off-by: Sv. Lockal <lockalsash@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.7.1.ebuild | 71 |
2 files changed, 72 insertions, 0 deletions
diff --git a/sci-libs/hipCUB/Manifest b/sci-libs/hipCUB/Manifest index bca0363ed4ca..7d95be621dad 100644 --- a/sci-libs/hipCUB/Manifest +++ b/sci-libs/hipCUB/Manifest @@ -1 +1,2 @@ DIST hipCUB-5.1.3.tar.gz 278021 BLAKE2B f30e567370fea80ef63a455c2c27b3f4ff241e7e405688fa4dc33d1e0ce3dffb016a1a1523b20613a7963bff061758eac0c0d110243a9a6cedbc100bb087d7d4 SHA512 dd3ca341b78cf6985ba723feeeb560c0503ab283b63067e9a5e68d12ad42f752a7f56fd60f0f0c26c2853538853e09a102cfc6006c18c31c3162fa7b536ffb9f +DIST hipCUB-5.7.1.tar.gz 322980 BLAKE2B a9b2a69b47661532858f18e7296ef37be41da814bb4886f7b8b444829e6ad1374d1c3117b57e7599095253ed56ea2403c895bb820dbde9cec77c28a041af3898 SHA512 7cf7dc819a3d8bac2cf70aa077616e65d785d76bae3ad3991db7b940a061f694ac82b1e4219aa16476351f1329e3f0d09a818b0ff0b9c5ad261937879c21dca8 diff --git a/sci-libs/hipCUB/hipCUB-5.7.1.ebuild b/sci-libs/hipCUB/hipCUB-5.7.1.ebuild new file mode 100644 index 000000000000..0674d33b6ed5 --- /dev/null +++ b/sci-libs/hipCUB/hipCUB-5.7.1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake rocm + +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" +REQUIRED_USE="${ROCM_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND="dev-util/hip + sci-libs/rocPRIM:${SLOT}[${ROCM_USEDEP}] + benchmark? ( dev-cpp/benchmark ) + test? ( dev-cpp/gtest ) +" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/hipCUB-rocm-${PV}" + +# 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() { + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARK=$(usex benchmark ON OFF) + -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + # uses HMM to fit tests to default <512M iGPU VRAM + MAKEOPTS="-j1" HIPCUB_USE_HMM="1" cmake_src_test +} |