1 |
commit: 317b5671286e85ab9a197195d4751248efa882e4 |
2 |
Author: YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun May 1 09:18:16 2022 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 05:41:32 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=317b5671 |
7 |
|
8 |
sci-libs/rocSOLVER: bump version to 5.0.2 |
9 |
|
10 |
According to https://github.com/ROCmSoftwarePlatform/rocSOLVER/issues/367#issuecomment-1099821708 |
11 |
hip and low-level runtimes of rocm does not need to be the same version |
12 |
with high-level libraries. Loosen dev-util/hip SLOT dependencies |
13 |
All tests passed on single Radeon RX 6700XT |
14 |
|
15 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
16 |
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com> |
17 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
18 |
|
19 |
sci-libs/rocSOLVER/Manifest | 1 + |
20 |
.../rocSOLVER/files/rocSOLVER-5.0.2-libfmt8.patch | 173 +++++++++++++++++++++ |
21 |
sci-libs/rocSOLVER/rocSOLVER-5.0.2.ebuild | 77 +++++++++ |
22 |
3 files changed, 251 insertions(+) |
23 |
|
24 |
diff --git a/sci-libs/rocSOLVER/Manifest b/sci-libs/rocSOLVER/Manifest |
25 |
index e0d75a8c6951..4a48b1da3b26 100644 |
26 |
--- a/sci-libs/rocSOLVER/Manifest |
27 |
+++ b/sci-libs/rocSOLVER/Manifest |
28 |
@@ -1 +1,2 @@ |
29 |
DIST rocSOLVER-4.3.0.tar.gz 454249 BLAKE2B 727ae416d85c5a19983257d2a0b01836013c1d69cddf3334b2c1b808b96b401db938b46b7ecf1e7faf26ff555374d1d3abed74abbe7be47110a36b44019469ee SHA512 2910e1cfad4d17a2877e2ae572d80179b84903c632652571c01bd12856c92c22e073ea1005ed9aac04244b4c502a7e0c18d96445e57658ae8eb5b320bada549b |
30 |
+DIST rocSOLVER-5.0.2.tar.gz 530085 BLAKE2B f3c3594b5ee2703424da289cc0c520a589da28f9d3f4c04d81cace35a4f77f3ca79ff9a1e7139d83d7a2ae1907083aded99b5d9fbe216d81b225dc1b9fc4105b SHA512 ab349044aba0c1b6b7d0019d15f2bdf068805d2da73790f424ae90835f2d7dd4137d0a641d8edbf98fcb190989f0d0fa57dfc448a376a19e21fd62940046b3a1 |
31 |
|
32 |
diff --git a/sci-libs/rocSOLVER/files/rocSOLVER-5.0.2-libfmt8.patch b/sci-libs/rocSOLVER/files/rocSOLVER-5.0.2-libfmt8.patch |
33 |
new file mode 100644 |
34 |
index 000000000000..3f2c0553689b |
35 |
--- /dev/null |
36 |
+++ b/sci-libs/rocSOLVER/files/rocSOLVER-5.0.2-libfmt8.patch |
37 |
@@ -0,0 +1,173 @@ |
38 |
+Backported from upstream to fix dev-cpp/libfmt-8 compatibility |
39 |
+ |
40 |
+remove changes of CHANGELOG.md from original git commit |
41 |
+ |
42 |
+From 2bbfb8976f6e4d667499c77e41a6433850063e88 Mon Sep 17 00:00:00 2001 |
43 |
+From: Cory Bloor <Cordell.Bloor@×××.com> |
44 |
+Date: Tue, 8 Feb 2022 23:53:57 -0700 |
45 |
+Subject: [PATCH] Fix compatibility with fmt v8.1 (#371) |
46 |
+ |
47 |
+* Make rocsolver_logvalue fmt specializations const |
48 |
+ |
49 |
+This allows for compile-time format string processing in fmt v8.0. |
50 |
+ |
51 |
+* Fix compatibility with fmt v7.1 |
52 |
+ |
53 |
+* Update CHANGELOG.md |
54 |
+--- |
55 |
+ CHANGELOG.md | 2 ++ |
56 |
+ library/src/include/rocsolver_logvalue.hpp | 38 +++++++++++++--------- |
57 |
+ 2 files changed, 25 insertions(+), 15 deletions(-) |
58 |
+ |
59 |
+diff --git a/library/src/include/rocsolver_logvalue.hpp b/library/src/include/rocsolver_logvalue.hpp |
60 |
+index 199f8d57d..9b3791031 100644 |
61 |
+--- a/library/src/include/rocsolver_logvalue.hpp |
62 |
++++ b/library/src/include/rocsolver_logvalue.hpp |
63 |
+@@ -1,5 +1,5 @@ |
64 |
+ /* ************************************************************************ |
65 |
+- * Copyright (c) 2021 Advanced Micro Devices, Inc. |
66 |
++ * Copyright (c) 2021-2022 Advanced Micro Devices, Inc. |
67 |
+ * ************************************************************************ */ |
68 |
+ |
69 |
+ #pragma once |
70 |
+@@ -8,6 +8,14 @@ |
71 |
+ |
72 |
+ #include "rocsolver_datatype2string.hpp" |
73 |
+ |
74 |
++/* The format function for user-defined types cannot be const before fmt v8.0 |
75 |
++ but must be const in fmt v8.1 if the type is used in a tuple. */ |
76 |
++#if FMT_VERSION < 80000 |
77 |
++#define ROCSOLVER_FMT_CONST |
78 |
++#else |
79 |
++#define ROCSOLVER_FMT_CONST const |
80 |
++#endif |
81 |
++ |
82 |
+ /*************************************************************************** |
83 |
+ * Wrapper for types passed to logger, so we can more easily adjust the |
84 |
+ * default way of printing built-in types without doing it globally. (e.g. |
85 |
+@@ -37,7 +45,7 @@ template <typename T> |
86 |
+ struct formatter<rocsolver_logvalue<T>> : formatter<T> |
87 |
+ { |
88 |
+ template <typename FormatCtx> |
89 |
+- auto format(rocsolver_logvalue<T> wrapper, FormatCtx& ctx) |
90 |
++ auto format(rocsolver_logvalue<T> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
91 |
+ { |
92 |
+ return formatter<T>::format(wrapper.value, ctx); |
93 |
+ } |
94 |
+@@ -49,7 +57,7 @@ template <> |
95 |
+ struct formatter<rocsolver_logvalue<bool>> : formatter<char> |
96 |
+ { |
97 |
+ template <typename FormatCtx> |
98 |
+- auto format(rocsolver_logvalue<bool> wrapper, FormatCtx& ctx) |
99 |
++ auto format(rocsolver_logvalue<bool> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
100 |
+ { |
101 |
+ return formatter<char>::format(wrapper.value ? '1' : '0', ctx); |
102 |
+ } |
103 |
+@@ -58,7 +66,7 @@ template <> |
104 |
+ struct formatter<rocsolver_logvalue<rocblas_operation>> : formatter<char> |
105 |
+ { |
106 |
+ template <typename FormatCtx> |
107 |
+- auto format(rocsolver_logvalue<rocblas_operation> wrapper, FormatCtx& ctx) |
108 |
++ auto format(rocsolver_logvalue<rocblas_operation> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
109 |
+ { |
110 |
+ return formatter<char>::format(rocblas2char_operation(wrapper.value), ctx); |
111 |
+ } |
112 |
+@@ -67,7 +75,7 @@ template <> |
113 |
+ struct formatter<rocsolver_logvalue<rocblas_fill>> : formatter<char> |
114 |
+ { |
115 |
+ template <typename FormatCtx> |
116 |
+- auto format(rocsolver_logvalue<rocblas_fill> wrapper, FormatCtx& ctx) |
117 |
++ auto format(rocsolver_logvalue<rocblas_fill> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
118 |
+ { |
119 |
+ return formatter<char>::format(rocblas2char_fill(wrapper.value), ctx); |
120 |
+ } |
121 |
+@@ -76,7 +84,7 @@ template <> |
122 |
+ struct formatter<rocsolver_logvalue<rocblas_diagonal>> : formatter<char> |
123 |
+ { |
124 |
+ template <typename FormatCtx> |
125 |
+- auto format(rocsolver_logvalue<rocblas_diagonal> wrapper, FormatCtx& ctx) |
126 |
++ auto format(rocsolver_logvalue<rocblas_diagonal> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
127 |
+ { |
128 |
+ return formatter<char>::format(rocblas2char_diagonal(wrapper.value), ctx); |
129 |
+ } |
130 |
+@@ -85,7 +93,7 @@ template <> |
131 |
+ struct formatter<rocsolver_logvalue<rocblas_side>> : formatter<char> |
132 |
+ { |
133 |
+ template <typename FormatCtx> |
134 |
+- auto format(rocsolver_logvalue<rocblas_side> wrapper, FormatCtx& ctx) |
135 |
++ auto format(rocsolver_logvalue<rocblas_side> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
136 |
+ { |
137 |
+ return formatter<char>::format(rocblas2char_side(wrapper.value), ctx); |
138 |
+ } |
139 |
+@@ -94,7 +102,7 @@ template <> |
140 |
+ struct formatter<rocsolver_logvalue<rocblas_direct>> : formatter<char> |
141 |
+ { |
142 |
+ template <typename FormatCtx> |
143 |
+- auto format(rocsolver_logvalue<rocblas_direct> wrapper, FormatCtx& ctx) |
144 |
++ auto format(rocsolver_logvalue<rocblas_direct> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
145 |
+ { |
146 |
+ return formatter<char>::format(rocblas2char_direct(wrapper.value), ctx); |
147 |
+ } |
148 |
+@@ -104,7 +112,7 @@ template <> |
149 |
+ struct formatter<rocsolver_logvalue<rocblas_storev>> : formatter<char> |
150 |
+ { |
151 |
+ template <typename FormatCtx> |
152 |
+- auto format(rocsolver_logvalue<rocblas_storev> wrapper, FormatCtx& ctx) |
153 |
++ auto format(rocsolver_logvalue<rocblas_storev> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
154 |
+ { |
155 |
+ return formatter<char>::format(rocblas2char_storev(wrapper.value), ctx); |
156 |
+ } |
157 |
+@@ -113,7 +121,7 @@ template <> |
158 |
+ struct formatter<rocsolver_logvalue<rocblas_workmode>> : formatter<char> |
159 |
+ { |
160 |
+ template <typename FormatCtx> |
161 |
+- auto format(rocsolver_logvalue<rocblas_workmode> wrapper, FormatCtx& ctx) |
162 |
++ auto format(rocsolver_logvalue<rocblas_workmode> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
163 |
+ { |
164 |
+ return formatter<char>::format(rocblas2char_workmode(wrapper.value), ctx); |
165 |
+ } |
166 |
+@@ -122,7 +130,7 @@ template <> |
167 |
+ struct formatter<rocsolver_logvalue<rocblas_svect>> : formatter<char> |
168 |
+ { |
169 |
+ template <typename FormatCtx> |
170 |
+- auto format(rocsolver_logvalue<rocblas_svect> wrapper, FormatCtx& ctx) |
171 |
++ auto format(rocsolver_logvalue<rocblas_svect> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
172 |
+ { |
173 |
+ return formatter<char>::format(rocblas2char_svect(wrapper.value), ctx); |
174 |
+ } |
175 |
+@@ -131,7 +139,7 @@ template <> |
176 |
+ struct formatter<rocsolver_logvalue<rocblas_evect>> : formatter<char> |
177 |
+ { |
178 |
+ template <typename FormatCtx> |
179 |
+- auto format(rocsolver_logvalue<rocblas_evect> wrapper, FormatCtx& ctx) |
180 |
++ auto format(rocsolver_logvalue<rocblas_evect> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
181 |
+ { |
182 |
+ return formatter<char>::format(rocblas2char_evect(wrapper.value), ctx); |
183 |
+ } |
184 |
+@@ -140,7 +148,7 @@ template <> |
185 |
+ struct formatter<rocsolver_logvalue<rocblas_eform>> : formatter<char> |
186 |
+ { |
187 |
+ template <typename FormatCtx> |
188 |
+- auto format(rocsolver_logvalue<rocblas_eform> wrapper, FormatCtx& ctx) |
189 |
++ auto format(rocsolver_logvalue<rocblas_eform> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
190 |
+ { |
191 |
+ return formatter<char>::format(rocblas2char_eform(wrapper.value), ctx); |
192 |
+ } |
193 |
+@@ -149,7 +157,7 @@ template <> |
194 |
+ struct formatter<rocsolver_logvalue<rocblas_datatype>> : formatter<string_view> |
195 |
+ { |
196 |
+ template <typename FormatCtx> |
197 |
+- auto format(rocsolver_logvalue<rocblas_datatype> wrapper, FormatCtx& ctx) |
198 |
++ auto format(rocsolver_logvalue<rocblas_datatype> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
199 |
+ { |
200 |
+ return formatter<string_view>::format(rocblas2string_datatype(wrapper.value), ctx); |
201 |
+ } |
202 |
+@@ -158,7 +166,7 @@ template <> |
203 |
+ struct formatter<rocsolver_logvalue<rocblas_initialization>> : formatter<string_view> |
204 |
+ { |
205 |
+ template <typename FormatCtx> |
206 |
+- auto format(rocsolver_logvalue<rocblas_initialization> wrapper, FormatCtx& ctx) |
207 |
++ auto format(rocsolver_logvalue<rocblas_initialization> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST |
208 |
+ { |
209 |
+ return formatter<string_view>::format(rocblas2string_initialization(wrapper.value), ctx); |
210 |
+ } |
211 |
|
212 |
diff --git a/sci-libs/rocSOLVER/rocSOLVER-5.0.2.ebuild b/sci-libs/rocSOLVER/rocSOLVER-5.0.2.ebuild |
213 |
new file mode 100644 |
214 |
index 000000000000..3a09969c0867 |
215 |
--- /dev/null |
216 |
+++ b/sci-libs/rocSOLVER/rocSOLVER-5.0.2.ebuild |
217 |
@@ -0,0 +1,77 @@ |
218 |
+# Copyright 1999-2022 Gentoo Authors |
219 |
+# Distributed under the terms of the GNU General Public License v2 |
220 |
+ |
221 |
+EAPI=8 |
222 |
+ |
223 |
+inherit cmake |
224 |
+ |
225 |
+DESCRIPTION="Implementation of a subset of LAPACK functionality on the ROCm platform" |
226 |
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocSOLVER" |
227 |
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rocSOLVER/archive/rocm-${PV}.tar.gz -> rocSOLVER-${PV}.tar.gz" |
228 |
+ |
229 |
+LICENSE="BSD" |
230 |
+KEYWORDS="~amd64" |
231 |
+SLOT="0/$(ver_cut 1-2)" |
232 |
+ |
233 |
+IUSE="test benchmark" |
234 |
+ |
235 |
+RDEPEND="dev-util/hip |
236 |
+ sci-libs/rocBLAS:${SLOT} |
237 |
+ >=dev-libs/libfmt-8 |
238 |
+ benchmark? ( virtual/blas )" |
239 |
+DEPEND="${RDEPEND}" |
240 |
+BDEPEND="test? ( dev-cpp/gtest |
241 |
+ >=dev-util/cmake-3.22 |
242 |
+ virtual/blas )" |
243 |
+ |
244 |
+PATCHES=( |
245 |
+ "${FILESDIR}/${PN}-4.2.0-add-stdint-header.patch" |
246 |
+ "${FILESDIR}/${P}-libfmt8.patch" |
247 |
+) |
248 |
+ |
249 |
+RESTRICT="!test? ( test )" |
250 |
+ |
251 |
+S=${WORKDIR}/${PN}-rocm-${PV} |
252 |
+ |
253 |
+src_prepare() { |
254 |
+ sed -e "s: PREFIX rocsolver:# PREFIX rocsolver:" -i library/src/CMakeLists.txt |
255 |
+ sed -e "s:\$<INSTALL_INTERFACE\:include>:\$<INSTALL_INTERFACE\:include/rocsolver>:" -i library/src/CMakeLists.txt |
256 |
+ sed -e "s:rocm_install_symlink_subdir( rocsolver ):#rocm_install_symlink_subdir( rocsolver ):" -i library/src/CMakeLists.txt |
257 |
+ |
258 |
+ cmake_src_prepare |
259 |
+} |
260 |
+ |
261 |
+src_configure() { |
262 |
+ # Grant access to the device |
263 |
+ addwrite /dev/kfd |
264 |
+ addpredict /dev/dri/ |
265 |
+ |
266 |
+ local mycmakeargs=( |
267 |
+ -Wno-dev |
268 |
+ -DCMAKE_SKIP_RPATH=ON |
269 |
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/" |
270 |
+ -DCMAKE_INSTALL_INCLUDEDIR="${EPREFIX}/usr/include/rocsolver" |
271 |
+ -DBUILD_CLIENTS_SAMPLES=NO |
272 |
+ -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) |
273 |
+ -DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF) |
274 |
+ ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"} |
275 |
+ ) |
276 |
+ |
277 |
+ CXX="hipcc" cmake_src_configure |
278 |
+} |
279 |
+ |
280 |
+src_test() { |
281 |
+ addwrite /dev/kfd |
282 |
+ addwrite /dev/dri/ |
283 |
+ cd "${BUILD_DIR}/clients/staging" || die |
284 |
+ LD_LIBRARY_PATH="${BUILD_DIR}/library/src" ./rocsolver-test || die |
285 |
+} |
286 |
+ |
287 |
+src_install() { |
288 |
+ cmake_src_install |
289 |
+ |
290 |
+ if use benchmark; then |
291 |
+ cd "${BUILD_DIR}" || die |
292 |
+ dobin clients/staging/rocsolver-bench |
293 |
+ fi |
294 |
+} |