summaryrefslogtreecommitdiff
path: root/sci-libs/hipCUB
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /sci-libs/hipCUB
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'sci-libs/hipCUB')
-rw-r--r--sci-libs/hipCUB/Manifest5
-rw-r--r--sci-libs/hipCUB/files/hipCUB-4.3.0-add-memory-header.patch12
-rw-r--r--sci-libs/hipCUB/hipCUB-4.3.0.ebuild74
-rw-r--r--sci-libs/hipCUB/metadata.xml31
4 files changed, 107 insertions, 15 deletions
diff --git a/sci-libs/hipCUB/Manifest b/sci-libs/hipCUB/Manifest
index 7c68b18a0357..053911d0ddf3 100644
--- a/sci-libs/hipCUB/Manifest
+++ b/sci-libs/hipCUB/Manifest
@@ -1,3 +1,6 @@
+AUX hipCUB-4.3.0-add-memory-header.patch 421 BLAKE2B cd05a027dbf75098fd199783c0abc2c37627e5b55b92f1b4ffb828995fbdb7ebf46f3f1d66a87c37eb35ddd16bd472541537d1ea250474c541bd01b10bd386c5 SHA512 7865f3942b7b157095c477da8790bf9632a630aa3456cde3b1a7b267e62db720a257e1c0e0501b88f8a0b187aa8ec520c4e7693e97af72358a6ff518be1f10a3
DIST hipCUB-4.0.0.tar.gz 137513 BLAKE2B b7ef4d53037fba04771162ae8993def648f5e1401654286ffc6987bbb4b25baa1b1b14bc37035e1afe46eeffe3e564f244e339cdfd0e5a242574d248bf4683db SHA512 e778b94c86e09bf3b0bc043fb15ed8725387b875e8631a7e8599aee8da2d8085190effc9681d742fc0d286cc0c20762341f1f24699c8a52e9734611c716530d5
+DIST hipCUB-4.3.0.tar.gz 154097 BLAKE2B 68a46f1416c969e4bf8e245c2aa8aee626f1e8089182ffb8f5090d540efe98606a616499d52b14da3733b3a6f4da690ea1718ea58fb6166351f4b4807f1b8228 SHA512 7c0abcf034d885615a9a4f05e6ca906e99b0ffbe36ae3d4b9d9d79b01d21077dc86be659548b45dad8498b84bec24dc0a5be78040c1ab21ca458d22fa7fae43d
EBUILD hipCUB-4.0.0-r1.ebuild 1099 BLAKE2B 93fb8305ce51fa26eae6be6d26ef05fa5916c7c7f8975d1694209e25d9bb5d69b55ef45175b65a957b79b32f61de6a76b7661f1cca1e2248dce0ce3b7048e6e5 SHA512 59440f40bc7f8600665c30f6098afd18d9219ad9e18db2a43edf654ad4a3d86241f0e12680721d16d056573d690ceae96f0bcb08b6d251d7963c829c9807fa3b
-MISC metadata.xml 560 BLAKE2B e877a0fed373ba33491bbe6567da11aa41d2efb2e60587c85e1c2256c6cd910a1b3f160496ee54cc62e5326f125a1a5dfdf0c2e8cc7908032e44dbecb53c7018 SHA512 5b0e7106e0721576cb46a92d805a8c318ac28013e34773ad18061cef38fa4d3d675a40ddd3b83119a5d201ac08ed78707f97a6f512ca625d986e98108ec87506
+EBUILD hipCUB-4.3.0.ebuild 2100 BLAKE2B 662199083665c19b5af56354dab656f55e8a814d08bab527e2a54a6dd36ffba6ccc0ee89a350337561263464dfab3fcf673b1f0f37454bf725f1723a520535c9 SHA512 44699b75b4be7ed839971d1de56f72bb04a9bde58d0d5d9526d3ecf58a05e56c32134d36982e34b9e5ff7d6a4e78af76c31f759b78d58ae3a321b5646bf40502
+MISC metadata.xml 625 BLAKE2B 7f927357a005110b37accb6841e4248e22e8080d0e0d6eb28e50e96c84807f663faf2f85dd222e5f5af448211cc05004d371a6d57ac6f17393609e76980bda81 SHA512 7d16cebc8c7df7dcc5d63e02e88e9d16d2321485de688621fd8628b8473d5ae614d63b0578363ee3b47f5e0aa7f45da9a00950b6a09a8cc9c6e3c77ae856c798
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>