1 |
commit: ab9da0d1ba6e1e6437d4ccb844a8973703808829 |
2 |
Author: YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon May 2 08:03:35 2022 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 05:41:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab9da0d1 |
7 |
|
8 |
sci-libs/rocThrust: bump to 5.0.2 |
9 |
|
10 |
Observed one failed test on gfx1031 though: |
11 |
https://github.com/ROCmSoftwarePlatform/rocThrust/issues/233 |
12 |
|
13 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
14 |
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com> |
15 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
16 |
|
17 |
sci-libs/rocThrust/Manifest | 1 + |
18 |
sci-libs/rocThrust/rocThrust-5.0.2.ebuild | 76 +++++++++++++++++++++++++++++++ |
19 |
2 files changed, 77 insertions(+) |
20 |
|
21 |
diff --git a/sci-libs/rocThrust/Manifest b/sci-libs/rocThrust/Manifest |
22 |
index d94ba9ef58d4..1f55b8280b6b 100644 |
23 |
--- a/sci-libs/rocThrust/Manifest |
24 |
+++ b/sci-libs/rocThrust/Manifest |
25 |
@@ -1,2 +1,3 @@ |
26 |
DIST rocThrust-4.0.0.tar.gz 1166346 BLAKE2B 02c89e0c4ab2c888a20b7c956a73012157f2735e6ec76369a1f75fbc17bb3f995d1914106ec58562f28243fbe5f019ac230ac3313b6aacb4d8b868f3ac1f091e SHA512 476aa5706487c5801cc91908806a1a1fcb550171f63e0b2debd9b59b18c7435c484578ec456ccfabc140dd7bca7d9bb432a7ba223946b1fca22e72e7d053af2d |
27 |
DIST rocThrust-4.3.0.tar.gz 1156832 BLAKE2B a462cfaa31883253fabba584ca77622cc5a7234bd9979472a84ec77b91c60f48f1064149b86d624aaedd70262fb65fb6aadb03cc6e00939d4eed6cd11bfc0090 SHA512 8c6aa3aefd59c87cc8278930bf90021867f519c356c86a3c3ebfcdf90887b8631250b6a9a8156f77c0cbf7ddbad7881e5e1b802f1cd1305cc3a2e7d95ef4e6f3 |
28 |
+DIST rocThrust-5.0.2.tar.gz 1183550 BLAKE2B 88021266dc9ffcb8f5e803acfe767c52aaa04b2348d0dcb204eb74bdf44ed26eb6d98f8d85324b90fe73228b52a0ad22686b87274c868ef19ec8ded825b58ea9 SHA512 3599b9498db392d480c08873d9e84ff1c05e5417e14e43e56f190fe4490873fec37c944a3c252942d6275a4fa4af85c82d39b62b0fdb5daa82023a2df8a3228f |
29 |
|
30 |
diff --git a/sci-libs/rocThrust/rocThrust-5.0.2.ebuild b/sci-libs/rocThrust/rocThrust-5.0.2.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000000..8e043631657f |
33 |
--- /dev/null |
34 |
+++ b/sci-libs/rocThrust/rocThrust-5.0.2.ebuild |
35 |
@@ -0,0 +1,76 @@ |
36 |
+# Copyright 1999-2022 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=8 |
40 |
+ |
41 |
+inherit cmake |
42 |
+ |
43 |
+DESCRIPTION="HIP back-end for the parallel algorithm library Thrust" |
44 |
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocThrust" |
45 |
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rocThrust/archive/rocm-${PV}.tar.gz -> rocThrust-${PV}.tar.gz" |
46 |
+ |
47 |
+LICENSE="Apache-2.0" |
48 |
+KEYWORDS="~amd64" |
49 |
+SLOT="0/$(ver_cut 1-2)" |
50 |
+IUSE="benchmark test" |
51 |
+ |
52 |
+RESTRICT="!test? ( test )" |
53 |
+ |
54 |
+RDEPEND="dev-util/hip:${SLOT} |
55 |
+ sci-libs/rocPRIM:${SLOT} |
56 |
+ test? ( dev-cpp/gtest )" |
57 |
+DEPEND="${RDEPEND}" |
58 |
+BDEPEND=">=dev-util/cmake-3.22" |
59 |
+ |
60 |
+S="${WORKDIR}/rocThrust-rocm-${PV}" |
61 |
+ |
62 |
+PATCHES=( "${FILESDIR}/${PN}-4.0-operator_new.patch" ) |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ sed -e "/PREFIX rocthrust/d" \ |
66 |
+ -e "/DESTINATION/s:rocthrust/include/thrust:include/thrust:" \ |
67 |
+ -e "/rocm_install_symlink_subdir(rocthrust)/d" \ |
68 |
+ -e "/<INSTALL_INTERFACE/s:rocthrust/include/:include/:" -i thrust/CMakeLists.txt || die |
69 |
+ |
70 |
+ sed -e "s:\${CMAKE_INSTALL_INCLUDEDIR}:&/rocthrust:" \ |
71 |
+ -e "s:\${ROCM_INSTALL_LIBDIR}:\${CMAKE_INSTALL_LIBDIR}:" -i cmake/ROCMExportTargetsHeaderOnly.cmake || die |
72 |
+ |
73 |
+ # disable downloading googletest and googlebenchmark |
74 |
+ sed -r -e '/Downloading/{:a;N;/\n *\)$/!ba; d}' -i cmake/Dependencies.cmake || die |
75 |
+ |
76 |
+ # remove GIT dependency |
77 |
+ sed -r -e '/find_package\(Git/{:a;N;/\nendif/!ba; d}' -i cmake/Dependencies.cmake || die |
78 |
+ |
79 |
+ eapply_user |
80 |
+ cmake_src_prepare |
81 |
+} |
82 |
+ |
83 |
+src_configure() { |
84 |
+ # Grant access to the device |
85 |
+ addwrite /dev/kfd |
86 |
+ addpredict /dev/dri/ |
87 |
+ |
88 |
+ # Compiler to use |
89 |
+ export CXX=hipcc |
90 |
+ |
91 |
+ local mycmakeargs=( |
92 |
+ -DBUILD_TEST=$(usex test ON OFF) |
93 |
+ -DBUILD_BENCHMARKS=$(usex benchmark ON OFF) |
94 |
+ ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"} |
95 |
+ ) |
96 |
+ |
97 |
+ cmake_src_configure |
98 |
+} |
99 |
+ |
100 |
+src_test() { |
101 |
+ # Grant access to the device |
102 |
+ addwrite /dev/kfd |
103 |
+ addwrite /dev/dri/ |
104 |
+ cmake_src_test |
105 |
+} |
106 |
+ |
107 |
+src_install() { |
108 |
+ cmake_src_install |
109 |
+ |
110 |
+ use benchmark && dobin "${BUILD_DIR}"/benchmarks/benchmark_thrust_bench |
111 |
+} |