diff options
author | YiyangWu <xgreenlandforwyy@gmail.com> | 2021-08-26 11:50:11 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2021-11-15 14:32:27 +0800 |
commit | 50340439b0bf3de2a9c264e18220656ed337e74e (patch) | |
tree | 75b2069eb4d76cf2245003c971c7fb6c8dafb98c /sci-libs | |
parent | dev-lang/python: stable 3.9.8 for hppa, bug #823738 (diff) | |
download | gentoo-50340439b0bf3de2a9c264e18220656ed337e74e.tar.gz gentoo-50340439b0bf3de2a9c264e18220656ed337e74e.tar.bz2 gentoo-50340439b0bf3de2a9c264e18220656ed337e74e.zip |
sci-libs/hipCUB: bump version to 4.3.0
Enable benchmark and test
Closes: https://github.com/gentoo/gentoo/pull/22941
Package-Manager: Portage-3.0.20, 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/files/hipCUB-4.3.0-add-memory-header.patch | 12 | ||||
-rw-r--r-- | sci-libs/hipCUB/hipCUB-4.3.0.ebuild | 74 | ||||
-rw-r--r-- | sci-libs/hipCUB/metadata.xml | 31 |
4 files changed, 104 insertions, 14 deletions
diff --git a/sci-libs/hipCUB/Manifest b/sci-libs/hipCUB/Manifest index e81dcfbc89c2..4d4a1a030483 100644 --- a/sci-libs/hipCUB/Manifest +++ b/sci-libs/hipCUB/Manifest @@ -1 +1,2 @@ DIST hipCUB-4.0.0.tar.gz 137513 BLAKE2B b7ef4d53037fba04771162ae8993def648f5e1401654286ffc6987bbb4b25baa1b1b14bc37035e1afe46eeffe3e564f244e339cdfd0e5a242574d248bf4683db SHA512 e778b94c86e09bf3b0bc043fb15ed8725387b875e8631a7e8599aee8da2d8085190effc9681d742fc0d286cc0c20762341f1f24699c8a52e9734611c716530d5 +DIST hipCUB-4.3.0.tar.gz 154097 BLAKE2B 68a46f1416c969e4bf8e245c2aa8aee626f1e8089182ffb8f5090d540efe98606a616499d52b14da3733b3a6f4da690ea1718ea58fb6166351f4b4807f1b8228 SHA512 7c0abcf034d885615a9a4f05e6ca906e99b0ffbe36ae3d4b9d9d79b01d21077dc86be659548b45dad8498b84bec24dc0a5be78040c1ab21ca458d22fa7fae43d diff --git a/sci-libs/hipCUB/files/hipCUB-4.3.0-add-memory-header.patch b/sci-libs/hipCUB/files/hipCUB-4.3.0-add-memory-header.patch new file mode 100644 index 000000000000..c9991944101a --- /dev/null +++ b/sci-libs/hipCUB/files/hipCUB-4.3.0-add-memory-header.patch @@ -0,0 +1,12 @@ +resolves compilation error: no template named 'shared_ptr' in namespace 'std' + +--- orig/benchmark/benchmark_device_radix_sort.cpp 2021-08-26 11:37:12.587196186 +0800 ++++ hipCUB-rocm-4.3.0/benchmark/benchmark_device_radix_sort.cpp 2021-08-26 11:37:27.459196285 +0800 +@@ -21,6 +21,7 @@ + // SOFTWARE. + + #include "common_benchmark_header.hpp" ++#include <memory> + + // HIP API + #include "hipcub/device/device_radix_sort.hpp" diff --git a/sci-libs/hipCUB/hipCUB-4.3.0.ebuild b/sci-libs/hipCUB/hipCUB-4.3.0.ebuild new file mode 100644 index 000000000000..0b57014f6d15 --- /dev/null +++ b/sci-libs/hipCUB/hipCUB-4.3.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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:${SLOT} + sci-libs/rocPRIM:${SLOT} + benchmark? ( dev-cpp/benchmark )" +DEPEND="${RDEPEND}" +BDEPEND="test? ( dev-cpp/gtest )" + +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}"} + -D__skip_rocmclang="ON" ## fix cmake-3.21 configuration issue caused by officialy support programming language "HIP" + ) + + cmake_src_configure +} + +src_test() { + # Grant access to the device + addwrite /dev/kfd + addwrite /dev/dri/ + cmake_src_test +} diff --git a/sci-libs/hipCUB/metadata.xml b/sci-libs/hipCUB/metadata.xml index 427b06185367..5e18b914d070 100644 --- a/sci-libs/hipCUB/metadata.xml +++ b/sci-libs/hipCUB/metadata.xml @@ -1,18 +1,21 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="project"> - <email>sci@gentoo.org</email> - </maintainer> - <maintainer type="person"> - <email>candrews@gentoo.org</email> - <name>Craig Andrews</name> - </maintainer> - <maintainer type="person" proxied="yes"> - <email>gentoo@holzke.net</email> - <name>Wilfried Holzke</name> - </maintainer> - <upstream> - <remote-id type="github">ROCm-Developer-Tools/hipCUB</remote-id> - </upstream> + <maintainer type="project"> + <email>sci@gentoo.org</email> + </maintainer> + <maintainer type="person"> + <email>candrews@gentoo.org</email> + <name>Craig Andrews</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>gentoo@holzke.net</email> + <name>Wilfried Holzke</name> + </maintainer> + <upstream> + <remote-id type="github">ROCm-Developer-Tools/hipCUB</remote-id> + </upstream> + <use> + <flag name="benchmark">Build and install benchmark binaries.</flag> + </use> </pkgmetadata> |