summaryrefslogtreecommitdiff
path: root/sci-libs/rocThrust
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-11-13 13:10:00 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-11-13 13:10:00 +0000
commite9d044d4b9b71200a96adfa280848858c0f468c9 (patch)
tree1bd8ef816043a8cd340f1d774e79553a1a7d31d8 /sci-libs/rocThrust
parentfc2f1018fc323ef2c6572734a9b130427cba76a6 (diff)
gentoo resync : 13.11.2021
Diffstat (limited to 'sci-libs/rocThrust')
-rw-r--r--sci-libs/rocThrust/Manifest5
-rw-r--r--sci-libs/rocThrust/files/rocThrust-4.3.0-deprecate-hcc_detail.patch13
-rw-r--r--sci-libs/rocThrust/metadata.xml3
-rw-r--r--sci-libs/rocThrust/rocThrust-4.3.0.ebuild76
4 files changed, 96 insertions, 1 deletions
diff --git a/sci-libs/rocThrust/Manifest b/sci-libs/rocThrust/Manifest
index 082ab6c321d4..04f35fcdfd10 100644
--- a/sci-libs/rocThrust/Manifest
+++ b/sci-libs/rocThrust/Manifest
@@ -1,4 +1,7 @@
AUX rocThrust-4.0-operator_new.patch 1699 BLAKE2B 1f8e4eb035768acd424cc2bae173c2c107b15b7f670c430ff5db5bb3657fdcafcea7933890176537c6147c1bee3cb675464d6d948724ba186868ff277eaa71f2 SHA512 5d9d48561e7feabc9341f13877d7e6bd49b59b140fe249956e87e785ed8afd1222aa1e7d77759af6ad8843e87d21362ba85ac9204bfcf160f30a4bcfb3d2e88b
+AUX rocThrust-4.3.0-deprecate-hcc_detail.patch 492 BLAKE2B cde3fb2210e482f6b76e2d38375141b11998c05101518dbc5d75c34da3343dae6448c88cb27e5d67b23cd986f712651f9cc8fe7632b8440bc171385ed1da6de2 SHA512 5f2783ae20d4870860c812b3b996ef6b7aeb7f45bfba5482b80eba3acb9347fd3bf63e8acae21a69f700721371eb1f3a115a0f59a5f93941fe3af8990d2f9ca9
DIST rocThrust-4.0.0.tar.gz 1166346 BLAKE2B 02c89e0c4ab2c888a20b7c956a73012157f2735e6ec76369a1f75fbc17bb3f995d1914106ec58562f28243fbe5f019ac230ac3313b6aacb4d8b868f3ac1f091e SHA512 476aa5706487c5801cc91908806a1a1fcb550171f63e0b2debd9b59b18c7435c484578ec456ccfabc140dd7bca7d9bb432a7ba223946b1fca22e72e7d053af2d
+DIST rocThrust-4.3.0.tar.gz 1156832 BLAKE2B a462cfaa31883253fabba584ca77622cc5a7234bd9979472a84ec77b91c60f48f1064149b86d624aaedd70262fb65fb6aadb03cc6e00939d4eed6cd11bfc0090 SHA512 8c6aa3aefd59c87cc8278930bf90021867f519c356c86a3c3ebfcdf90887b8631250b6a9a8156f77c0cbf7ddbad7881e5e1b802f1cd1305cc3a2e7d95ef4e6f3
EBUILD rocThrust-4.0.0-r1.ebuild 1244 BLAKE2B 4f8019ccf296a915a305a405d3e80d2de348ac7717782671b76306882872a6e356bdbdb63316094ce8ccc8410fced42db56423b4d96f8d690ec6838d3721612e SHA512 40671932493ab5a2a2597a4181d03c666a9272ed881d053ecc8d8285aa8a5b68b9527b4fa0e29b6acff3f31fdfafd9cc060b9e098b16a12a7370eaa37542f5de
-MISC metadata.xml 563 BLAKE2B a96cf6946f31d7ffbdbc3b4400d0fad1f74e7945d3bb7f9a9e38663a38632d94e450a72c7b9b96a04253440a44920194601fe877e8473ef718b65ed147cf8506 SHA512 7ece69fd5af7f009799f1a7b8fa9b63efb23e8339363d2bc8c5479c32bd2b61a0c79f594408686575acc527aae7bf2387adbc5775325c1bae3281deefa0c4318
+EBUILD rocThrust-4.3.0.ebuild 2082 BLAKE2B 414354d8137a09e987b908bc901d404c0025cdd77df7753a602a04b14391637f9c04cb831f0819f61b53b01e12ad01e883547fb7135034dee57a4cd22980b444 SHA512 77fbb475bceb103df10f6dfe50fc74631337fb6e72473edb7a3db03f98ce5f1f66458a501cde22f6c79232107b810a0496323166fd11814e4ee4b694f8206a4d
+MISC metadata.xml 656 BLAKE2B cdcee7af9e0c2f8e0553cc0d41ea208dbaa27aae0847f90b048e4c8791a9be511a84c7fb5ba8dc4c0409266d5a8a855fd4ebf578ad55c5882a000fbb4c5b05c0 SHA512 adefa0bbe1487a7c29a3b175c8d27e694c5464b0f7a3f20afcfd07952ef95cb54a789f7ae174053493d893338f52cf175f4b1939b998e850b62a7fd435dc592a
diff --git a/sci-libs/rocThrust/files/rocThrust-4.3.0-deprecate-hcc_detail.patch b/sci-libs/rocThrust/files/rocThrust-4.3.0-deprecate-hcc_detail.patch
new file mode 100644
index 000000000000..a923a016f96c
--- /dev/null
+++ b/sci-libs/rocThrust/files/rocThrust-4.3.0-deprecate-hcc_detail.patch
@@ -0,0 +1,13 @@
+https://github.com/ROCmSoftwarePlatform/rocThrust/issues/180
+
+--- orig/thrust/system/hip/detail/guarded_driver_types.h
++++ rocThrust-rocm-4.3.0/thrust/system/hip/detail/guarded_driver_types.h
+@@ -47,7 +47,7 @@
+ # endif // __DRIVER_TYPES_H__
+ #endif // __GNUC__
+
+-#include <hip/hcc_detail/host_defines.h>
++#include <hip/amd_detail/host_defines.h>
+
+ #if !defined(__GNUC__) || ((10000 * __GNUC__ + 100 * __GNUC_MINOR__ + __GNUC_PATCHLEVEL__) >= 40500)
+ # ifdef THRUST_HOST_NEEDS_RESTORATION
diff --git a/sci-libs/rocThrust/metadata.xml b/sci-libs/rocThrust/metadata.xml
index 2de21c17fe60..20ece3c2955e 100644
--- a/sci-libs/rocThrust/metadata.xml
+++ b/sci-libs/rocThrust/metadata.xml
@@ -15,4 +15,7 @@
<upstream>
<remote-id type="github">ROCm-Developer-Tools/rocThrust</remote-id>
</upstream>
+ <use>
+ <flag name="benchmark">Build and install benchmark binary.</flag>
+ </use>
</pkgmetadata>
diff --git a/sci-libs/rocThrust/rocThrust-4.3.0.ebuild b/sci-libs/rocThrust/rocThrust-4.3.0.ebuild
new file mode 100644
index 000000000000..5063cf4dbce5
--- /dev/null
+++ b/sci-libs/rocThrust/rocThrust-4.3.0.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="HIP back-end for the parallel algorithm library Thrust"
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocThrust"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rocThrust/archive/rocm-${PV}.tar.gz -> rocThrust-${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="benchmark test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-util/hip:${SLOT}
+ sci-libs/rocPRIM:${SLOT}"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/rocThrust-rocm-${PV}"
+
+PATCHES=( "${FILESDIR}/${PN}-4.0-operator_new.patch"
+ "${FILESDIR}/${P}-deprecate-hcc_detail.patch" )
+
+src_prepare() {
+ sed -e "/PREFIX rocthrust/d" \
+ -e "/DESTINATION/s:rocthrust/include/thrust:include/rocthrust/thrust:" \
+ -e "/rocm_install_symlink_subdir(rocthrust)/d" \
+ -e "/<INSTALL_INTERFACE/s:rocthrust/include/:include/rocthrust/:" -i thrust/CMakeLists.txt || die
+
+ sed -e "s:\${CMAKE_INSTALL_INCLUDEDIR}:&/rocthrust:" \
+ -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
+
+ 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_BENCHMARKS=$(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
+}
+
+src_install() {
+ cmake_src_install
+
+ use benchmark && dobin "${BUILD_DIR}"/benchmarks/benchmark_thrust_bench
+}