Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/rocBLAS/files/, sci-libs/rocBLAS/
Date: Fri, 27 Aug 2021 07:33:47
Message-Id: 1630049594.3e457521cda2179e533d4f582134b67d972653c9.heroxbd@gentoo
1 commit: 3e457521cda2179e533d4f582134b67d972653c9
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 27 07:32:13 2021 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 27 07:33:14 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=3e457521
7
8 sci-libs/rocBLAS: landed to ::gentoo.
9
10 Bug: https://bugs.gentoo.org/732952
11 Bug: https://bugs.gentoo.org/804181
12 Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
13
14 .../files/Tensile-4.0.0-locate-commands.patch | 32 ------
15 .../files/Tensile-4.1.0-output-EnabledISA.patch | 65 -----------
16 .../files/Tensile-4.1.0-output-commands.patch | 36 -------
17 .../files/rocBLAS-4.0.0-use-system-tensile.patch | 30 ------
18 .../files/rocBLAS-4.1.0-fix-Ninja-build.patch | 24 -----
19 .../rocBLAS-4.1.0-fix-glibc-2.32-and-above.patch | 25 -----
20 .../files/rocBLAS-4.1.0-link-system-blas.patch | 42 --------
21 sci-libs/rocBLAS/metadata.xml | 15 ---
22 sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild | 88 ---------------
23 sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild | 76 -------------
24 sci-libs/rocBLAS/rocBLAS-4.1.0.ebuild | 120 ---------------------
25 11 files changed, 553 deletions(-)
26
27 diff --git a/sci-libs/rocBLAS/files/Tensile-4.0.0-locate-commands.patch b/sci-libs/rocBLAS/files/Tensile-4.0.0-locate-commands.patch
28 deleted file mode 100644
29 index 461a736a2..000000000
30 --- a/sci-libs/rocBLAS/files/Tensile-4.0.0-locate-commands.patch
31 +++ /dev/null
32 @@ -1,32 +0,0 @@
33 -Index: Tensile-rocm-4.0.0/Tensile/Common.py
34 -===================================================================
35 ---- Tensile-rocm-4.0.0.orig/Tensile/Common.py
36 -+++ Tensile-rocm-4.0.0/Tensile/Common.py
37 -@@ -1521,14 +1521,14 @@ def assignGlobalParameters( config ):
38 - print2(" %24s: %8s (unspecified)" % (key, defaultValue))
39 -
40 - # ROCm Agent Enumerator Path
41 -- globalParameters["ROCmAgentEnumeratorPath"] = locateExe("/opt/rocm/bin", "rocm_agent_enumerator")
42 -+ globalParameters["ROCmAgentEnumeratorPath"] = locateExe("", "rocm_agent_enumerator")
43 - if "CxxCompiler" in config:
44 - globalParameters["CxxCompiler"] = config["CxxCompiler"]
45 -
46 - if "TENSILE_ROCM_ASSEMBLER_PATH" in os.environ:
47 - globalParameters["AssemblerPath"] = os.environ.get("TENSILE_ROCM_ASSEMBLER_PATH")
48 - elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hipcc":
49 -- globalParameters["AssemblerPath"] = locateExe("/opt/rocm/llvm/bin", "clang++")
50 -+ globalParameters["AssemblerPath"] = locateExe("", "clang++")
51 - elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hcc":
52 - globalParameters["AssemblerPath"] = locateExe("/opt/rocm/bin", "hcc")
53 -
54 -@@ -1536,8 +1536,8 @@ def assignGlobalParameters( config ):
55 - if globalParameters["CxxCompiler"] == "hcc":
56 - globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/bin", "extractkernel")
57 - else:
58 -- globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/hip/bin", "extractkernel")
59 -- globalParameters["ClangOffloadBundlerPath"] = locateExe("/opt/rocm/llvm/bin", "clang-offload-bundler")
60 -+ globalParameters["ExtractKernelPath"] = locateExe("", "extractkernel")
61 -+ globalParameters["ClangOffloadBundlerPath"] = locateExe("", "clang-offload-bundler")
62 -
63 - if "ROCmAgentEnumeratorPath" in config:
64 - globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]
65
66 diff --git a/sci-libs/rocBLAS/files/Tensile-4.1.0-output-EnabledISA.patch b/sci-libs/rocBLAS/files/Tensile-4.1.0-output-EnabledISA.patch
67 deleted file mode 100644
68 index 047da78c6..000000000
69 --- a/sci-libs/rocBLAS/files/Tensile-4.1.0-output-EnabledISA.patch
70 +++ /dev/null
71 @@ -1,65 +0,0 @@
72 -Add a parameter called EnabledISA (list) with empty default value. If empty, auto detect supported GPU ISA
73 -
74 -kernels for ISA in EnabledISA will be generated and compiled, then merged in to codeobjects
75 -
76 ---- Tensile-rocm-4.1.0/Tensile/Common.py
77 -+++ Tensile-rocm-4.1.0/Tensile/Common.py
78 -@@ -209,6 +209,7 @@ globalParameters["ClientExecutionLockPat
79 -
80 - # internal, i.e., gets set during startup
81 - globalParameters["CurrentISA"] = (0,0,0)
82 -+globalParameters["EnabledISA"] = []
83 - globalParameters["ROCmAgentEnumeratorPath"] = None # /opt/rocm/bin/rocm_agent_enumerator
84 - globalParameters["ROCmSMIPath"] = None # /opt/rocm/bin/rocm-smi
85 - globalParameters["AssemblerPath"] = None # /opt/rocm/hip/bin/hipcc
86 -@@ -1644,6 +1645,7 @@ def assignGlobalParameters( config ):
87 - globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]
88 -
89 - # read current gfx version
90 -+ auto_detect_ISA = globalParameters["EnabledISA"] == []
91 - if os.name != "nt" and globalParameters["CurrentISA"] == (0,0,0) and globalParameters["ROCmAgentEnumeratorPath"]:
92 - process = Popen([globalParameters["ROCmAgentEnumeratorPath"], "-t", "GPU"], stdout=PIPE)
93 - line = process.stdout.readline().decode()
94 -@@ -1653,7 +1655,9 @@ def assignGlobalParameters( config ):
95 - if arch in globalParameters["SupportedISA"]:
96 - print1("# Detected local GPU with ISA: gfx" + ''.join(map(str,arch)))
97 - globalParameters["CurrentISA"] = arch
98 -+ if auto_detect_ISA : globalParameters["EnabledISA"].append(arch)
99 - line = process.stdout.readline().decode()
100 -+ print1("# kernels for " + ', '.join('gfx' + ''.join(map(str,arch)) for arch in globalParameters["EnabledISA"]) + " will be generated and compiled.")
101 - if globalParameters["CurrentISA"] == (0,0,0):
102 - printWarning("Did not detect SupportedISA: %s; cannot benchmark assembly kernels." % globalParameters["SupportedISA"])
103 - if process.returncode:
104 -
105 ---- Tensile-rocm-4.1.0/Tensile/TensileCreateLibrary.py
106 -+++ Tensile-rocm-4.1.0/Tensile/TensileCreateLibrary.py
107 -@@ -169,7 +169,7 @@ def buildSourceCodeObjectFile(CxxCompile
108 -
109 - archs = []
110 - cmdlineArchs = []
111 -- for arch in globalParameters['SupportedISA']:
112 -+ for arch in globalParameters['EnabledISA']:
113 - if isSupported(arch):
114 - if (arch == (9,0,6) or arch == (9,0,8)):
115 - archs += ['gfx'+''.join(map(str,arch))+'-xnack-']
116 -@@ -1067,7 +1067,7 @@ def buildObjectFileNames(solutionWriter,
117 - if isSupported(arch)]
118 - elif (cxxCompiler == 'hipcc'):
119 - sourceArchs = []
120 -- for arch in globalParameters['SupportedISA']:
121 -+ for arch in globalParameters['EnabledISA']:
122 - if isSupported(arch):
123 - if (arch == (9,0,6) or arch == (9,0,8)):
124 - sourceArchs += ['gfx'+''.join(map(str,arch))+'-xnack-']
125 -@@ -1249,8 +1249,9 @@ def generateKernelObjectsFromSolutions(s
126 - for solution in solutions:
127 - solutionKernels = solution.getKernels()
128 - for kernel in solutionKernels:
129 -- if kernel not in kernels:
130 -- kernels.append(kernel)
131 -+ if kernel["ISA"] in globalParameters["EnabledISA"] or kernel["KernelLanguage"] == "Source" :
132 -+ if kernel not in kernels:
133 -+ kernels.append(kernel)
134 - solutionHelperKernels = solution.getHelperKernelObjects()
135 - for ko in solutionHelperKernels:
136 - kname = ko.getKernelName()
137
138 diff --git a/sci-libs/rocBLAS/files/Tensile-4.1.0-output-commands.patch b/sci-libs/rocBLAS/files/Tensile-4.1.0-output-commands.patch
139 deleted file mode 100644
140 index 152142d59..000000000
141 --- a/sci-libs/rocBLAS/files/Tensile-4.1.0-output-commands.patch
142 +++ /dev/null
143 @@ -1,36 +0,0 @@
144 -Print Code objects generation commands
145 -
146 -Cancel running dpkg to check existence of hip
147 -
148 ---- Tensile-rocm-4.1.0/Tensile/Common.py
149 -+++ Tensile-rocm-4.1.0/Tensile/Common.py
150 -@@ -175,7 +175,7 @@ globalParameters["PrintTensorD"] = 0
151 - globalParameters["PrintTensorRef"] = 0 # Print reference tensor. 0x1=after init; 0x2=after copy-back; 0x3=both
152 - globalParameters["PrintIndexAssignments"] = 0 # Print the tensor index assignment info
153 - globalParameters["PrintWinnersOnly"] = False # Only print the solutions which become the fastest
154 --globalParameters["PrintCodeCommands"] = False # print the commands used to generate the code objects (asm,link,hip-clang, etc)
155 -+globalParameters["PrintCodeCommands"] = True # print the commands used to generate the code objects (asm,link,hip-clang, etc)
156 -
157 - # TODO - remove this when NewClient is mainstream
158 - globalParameters["OldClientSourceTmp"] = True # Use an intermediate sourceTmp dir to detect file changes and minimize rebuilds on old client
159 -@@ -1680,20 +1680,6 @@ def assignGlobalParameters( config ):
160 - # Due to platform.linux_distribution() being deprecated, just try to run dpkg regardless.
161 - # The alternative would be to install the `distro` package.
162 - # See https://docs.python.org/3.7/library/platform.html#platform.linux_distribution
163 -- try:
164 -- if globalParameters["CxxCompiler"] == "hipcc":
165 -- output = subprocess.run(["dpkg", "-l", "hip-rocclr"], check=True, stdout=subprocess.PIPE).stdout.decode()
166 -- elif globalParameters["CxxCompiler"] == "hcc":
167 -- output = subprocess.run(["dpkg", "-l", "hcc"], check=True, stdout=subprocess.PIPE).stdout.decode()
168 --
169 -- for line in output.split('\n'):
170 -- if 'hipcc' in line:
171 -- globalParameters['HipClangVersion'] = line.split()[2]
172 -- elif 'hcc' in line:
173 -- globalParameters['HccVersion'] = line.split()[2]
174 --
175 -- except (subprocess.CalledProcessError, OSError) as e:
176 -- printWarning("Error: {} looking for package {}: {}".format('dpkg', 'hip-rocclr', e))
177 -
178 - for key in config:
179 - value = config[key]
180
181 diff --git a/sci-libs/rocBLAS/files/rocBLAS-4.0.0-use-system-tensile.patch b/sci-libs/rocBLAS/files/rocBLAS-4.0.0-use-system-tensile.patch
182 deleted file mode 100644
183 index 3b8e44a99..000000000
184 --- a/sci-libs/rocBLAS/files/rocBLAS-4.0.0-use-system-tensile.patch
185 +++ /dev/null
186 @@ -1,30 +0,0 @@
187 -diff --color -uprN rocBLAS-rocm-4.0.0/CMakeLists.txt new/CMakeLists.txt
188 ---- rocBLAS-rocm-4.0.0/CMakeLists.txt 2020-11-11 00:56:04.000000000 +0800
189 -+++ new/CMakeLists.txt 2021-01-20 15:23:09.570222990 +0800
190 -@@ -208,25 +208,7 @@ if( BUILD_WITH_TENSILE )
191 - option(TENSILE_USE_MSGPACK "Use msgpack for parsing config files." ON)
192 - endif()
193 -
194 -- include(virtualenv)
195 -- if (Tensile_TEST_LOCAL_PATH)
196 -- virtualenv_install(${Tensile_TEST_LOCAL_PATH})
197 -- message (STATUS "using local Tensile from ${Tensile_TEST_LOCAL_PATH}, copied to ${Tensile_ROOT}")
198 -- else()
199 -- # Use the virtual-env setup and download package from specified repot:
200 -- set( tensile_fork "ROCmSoftwarePlatform" CACHE STRING "Tensile fork to use" )
201 -- file (STRINGS "tensile_tag.txt" read_tensile_tag)
202 -- set( tensile_tag ${read_tensile_tag} CACHE STRING "Tensile tag to download" )
203 -- virtualenv_install("git+https://github.com/${tensile_fork}/Tensile.git@${tensile_tag}")
204 -- message (STATUS "using GIT Tensile fork=${tensile_fork} from branch=${tensile_tag}")
205 -- endif()
206 -- message(STATUS "Adding ${VIRTUALENV_HOME_DIR} to CMAKE_PREFIX_PATH")
207 -- list(APPEND CMAKE_PREFIX_PATH ${VIRTUALENV_HOME_DIR})
208 -- if (TENSILE_VERSION)
209 -- find_package(Tensile ${TENSILE_VERSION} EXACT REQUIRED HIP LLVM OpenMP PATHS "${INSTALLED_TENSILE_PATH}")
210 -- else()
211 -- find_package(Tensile 4.24.0 EXACT REQUIRED HIP LLVM OpenMP PATHS "${INSTALLED_TENSILE_PATH}")
212 -- endif()
213 -+ find_package(Tensile 4.24.0 EXACT REQUIRED HIP LLVM OpenMP)
214 - endif()
215 -
216 - # Find HCC/HIP dependencies
217
218 diff --git a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-Ninja-build.patch b/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-Ninja-build.patch
219 deleted file mode 100644
220 index 3b9c3efdd..000000000
221 --- a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-Ninja-build.patch
222 +++ /dev/null
223 @@ -1,24 +0,0 @@
224 -https://github.com/ROCmSoftwarePlatform/rocBLAS/commit/b90e6ef22166b72e73a830aa83e9bbe342d5e676
225 -
226 ---- rocBLAS-rocm-4.1.0/library/src/CMakeLists.txt
227 -+++ rocBLAS-rocm-4.1.0/library/src/CMakeLists.txt
228 -@@ -447,10 +447,18 @@ set_target_properties( rocblas PROPERTIE
229 - generate_export_header( rocblas EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/internal/rocblas-export.h )
230 -
231 - # generate header with prototypes for export reuse
232 -+file( GLOB rocblas_prototype_inputs
233 -+ LIST_DIRECTORIES OFF
234 -+ CONFIGURE_DEPENDS
235 -+ ${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/*.hpp
236 -+ ${CMAKE_CURRENT_SOURCE_DIR}/blas3/*.hpp
237 -+ ${CMAKE_CURRENT_SOURCE_DIR}/blas2/*.hpp
238 -+ ${CMAKE_CURRENT_SOURCE_DIR}/blas1/*.hpp
239 -+)
240 - set( ROCBLAS_PROTO_TEMPLATES "${PROJECT_BINARY_DIR}/include/internal/rocblas-exported-proto.hpp" )
241 - add_custom_command(OUTPUT ${ROCBLAS_PROTO_TEMPLATES}
242 - COMMAND python3 template-proto.py ${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas3/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas2/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas1/*.hpp > ${ROCBLAS_PROTO_TEMPLATES}
243 -- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas3/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas2/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/blas1/*.hpp
244 -+ DEPENDS ${rocblas_prototype_inputs}
245 - COMMENT "Generating prototypes from ${CMAKE_CURRENT_SOURCE_DIR}."
246 - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
247 - )
248
249 diff --git a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-glibc-2.32-and-above.patch b/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-glibc-2.32-and-above.patch
250 deleted file mode 100644
251 index a4d9f0bab..000000000
252 --- a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-fix-glibc-2.32-and-above.patch
253 +++ /dev/null
254 @@ -1,25 +0,0 @@
255 -https://sourceware.org/glibc/wiki/Release/2.32#Deprectation_sys_siglist.2C__sys_siglist.2C_sys_sigabbrev
256 -
257 ---- rocBLAS-rocm-4.1.0/clients/gtest/rocblas_test.cpp
258 -+++ rocBLAS-rocm-4.1.0/clients/gtest/rocblas_test.cpp
259 -@@ -173,7 +173,7 @@ void catch_signals_and_exceptions_as_fai
260 - // Set up the return point, and handle siglongjmp returning back to here
261 - if(sigsetjmp(t_handler.sigjmp_buf, true))
262 - {
263 -- FAIL() << "Received " << sys_siglist[t_handler.signal] << " signal";
264 -+ FAIL() << "Received " << strsignal(t_handler.signal) << " signal";
265 - }
266 - else
267 - {
268 -
269 ---- rocBLAS-rocm-4.1.0/clients/include/utility.hpp
270 -+++ rocBLAS-rocm-4.1.0/clients/include/utility.hpp
271 -@@ -39,7 +39,7 @@
272 - // puts, putchar, fputs, printf, fprintf, vprintf, vfprintf: Use rocblas_cout or rocblas_cerr
273 - // sprintf, vsprintf: Possible buffer overflows; us snprintf or vsnprintf instead
274 - // strerror: Thread-unsafe; use snprintf / dprintf with %m or strerror_* alternatives
275 --// strsignal: Thread-unsafe; use sys_siglist[signal] instead
276 -+// strsignal: Thread-unsafe; use strsignal(signal) instead
277 - // strtok: Thread-unsafe; use strtok_r
278 - // gmtime, ctime, asctime, localtime: Thread-unsafe
279 - // tmpnam: Thread-unsafe; use mkstemp or related functions instead
280
281 diff --git a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-link-system-blas.patch b/sci-libs/rocBLAS/files/rocBLAS-4.1.0-link-system-blas.patch
282 deleted file mode 100644
283 index 082d8313f..000000000
284 --- a/sci-libs/rocBLAS/files/rocBLAS-4.1.0-link-system-blas.patch
285 +++ /dev/null
286 @@ -1,42 +0,0 @@
287 -Link system blas libraries against rocblas-bench and rocblas-test
288 -
289 ---- rocBLAS-rocm-4.1.0/clients/benchmarks/CMakeLists.txt
290 -+++ rocBLAS-rocm-4.1.0/clients/benchmarks/CMakeLists.txt
291 -@@ -83,7 +83,7 @@ if( OS_ID_rhel OR OS_ID_sles OR OS_ID_ce
292 - if(LINK_BLIS)
293 - target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas cblas lapack ${BLIS_LIBRARY} ${OPENMP_LIBRARY} )
294 - else()
295 -- target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas cblas lapack ${OPENMP_LIBRARY} )
296 -+ target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas cblas lapack -lblas ${OPENMP_LIBRARY} )
297 - endif()
298 - else()
299 - # External header includes included as system files
300 -@@ -97,7 +97,7 @@ else()
301 - if(LINK_BLIS)
302 - target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${BLIS_LIBRARY} )
303 - else()
304 -- target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas lapack cblas )
305 -+ target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas lapack cblas -lblas )
306 - endif()
307 - endif()
308 -
309 ---- rocBLAS-rocm-4.1.0/clients/gtest/CMakeLists.txt
310 -+++ rocBLAS-rocm-4.1.0/clients/gtest/CMakeLists.txt
311 -@@ -163,7 +163,7 @@ if( OS_ID_rhel OR OS_ID_sles OR OS_ID_ce
312 - if(LINK_BLIS)
313 - target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${BLIS_LIBRARY} ${GTEST_LIBRARIES} ${OPENMP_LIBRARY} )
314 - else()
315 -- target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${GTEST_LIBRARIES} ${OPENMP_LIBRARY} )
316 -+ target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas -lblas ${GTEST_LIBRARIES} ${OPENMP_LIBRARY} )
317 - endif()
318 - else()
319 - # External header includes included as system files
320 -@@ -177,7 +177,7 @@ else()
321 - if(LINK_BLIS)
322 - target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${BLIS_LIBRARY} ${GTEST_LIBRARIES} )
323 - else()
324 -- target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${GTEST_LIBRARIES} )
325 -+ target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas -lblas ${GTEST_LIBRARIES} )
326 - endif()
327 - endif()
328 -
329
330 diff --git a/sci-libs/rocBLAS/metadata.xml b/sci-libs/rocBLAS/metadata.xml
331 deleted file mode 100644
332 index 189545382..000000000
333 --- a/sci-libs/rocBLAS/metadata.xml
334 +++ /dev/null
335 @@ -1,15 +0,0 @@
336 -<?xml version="1.0" encoding="UTF-8"?>
337 -<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
338 -<pkgmetadata>
339 - <maintainer type="project">
340 - <email>sci@g.o</email>
341 - </maintainer>
342 - <maintainer type="person">
343 - <email>gentoo@××××××.net</email>
344 - <name>Wilfried Holzke</name>
345 - </maintainer>
346 - <use>
347 - <flag name="test">Perform rocblas-test to compare the result between rocBLAS and system BLAS.</flag>
348 - <flag name="benchmark">Build and install rocblas-bench.</flag>
349 - </use>
350 -</pkgmetadata>
351
352 diff --git a/sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild b/sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild
353 deleted file mode 100644
354 index ca0fcfd8c..000000000
355 --- a/sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild
356 +++ /dev/null
357 @@ -1,88 +0,0 @@
358 -# Copyright 1999-2021 Gentoo Authors
359 -# Distributed under the terms of the GNU General Public License v2
360 -
361 -EAPI=7
362 -
363 -inherit cmake
364 -
365 -DESCRIPTION="AMD's library for BLAS on ROCm."
366 -HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS"
367 -SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-rocBLAS-${PV}.tar.gz"
368 -
369 -LICENSE="MIT"
370 -KEYWORDS="~amd64"
371 -SLOT="0"
372 -
373 -IUSE="debug"
374 -
375 -RDEPEND="=dev-util/hip-$(ver_cut 1-2)*"
376 -DEPEND="${RDEPEND}
377 - dev-util/cmake
378 - dev-util/rocm-cmake
379 - dev-libs/msgpack
380 - dev-perl/File-Which"
381 -
382 -# stripped library is not working
383 -RESTRICT="strip"
384 -
385 -S="${WORKDIR}/rocBLAS-rocm-${PV}"
386 -
387 -rocBLAS_V="0.1"
388 -
389 -PATCHES="${FILESDIR}/${PN}-4.0.0-use-system-tensile.patch"
390 -
391 -src_prepare() {
392 - eapply_user
393 -
394 - sed -e "/PREFIX rocblas/d" \
395 - -e "/<INSTALL_INTERFACE/s:include:include/rocblas:" \
396 - -e "s:rocblas/include:include/rocblas:" \
397 - -e "s:\\\\\${CPACK_PACKAGING_INSTALL_PREFIX}rocblas/lib:${EPREFIX}/usr/$(get_libdir)/rocblas:" \
398 - -e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die
399 -
400 - cmake_src_prepare
401 -}
402 -
403 -src_configure() {
404 - # allow acces to hardware
405 - addwrite /dev/kfd
406 - addpredict /dev/dri/
407 -
408 - # Compiler to use
409 - export CXX="hipcc"
410 -
411 - if use debug; then
412 - buildtype="Debug"
413 - else
414 - buildtype="Release"
415 - fi
416 -
417 - local mycmakeargs=(
418 - -DTensile_LOGIC="asm_full"
419 - -DTensile_COMPILER="hipcc"
420 - -DTensile_ARCHITECTURE="all"
421 - -DTensile_LIBRARY_FORMAT="msgpack"
422 - -DTensile_CODE_OBJECT_VERSION="V3"
423 - -DTensile_TEST_LOCAL_PATH="${WORKDIR}/Tensile-rocm-${PV}"
424 - -DBUILD_WITH_TENSILE=ON
425 - -DBUILD_WITH_TENSILE_HOST=ON
426 - -DCMAKE_BUILD_TYPE="${buildtype}"
427 - -DCMAKE_CXX_FLAGS="--rocm-path=${EPREFIX}/usr"
428 - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
429 - -DCMAKE_INSTALL_INCLUDEDIR="include/rocblas"
430 - -DBUILD_TESTING=OFF
431 - -DBUILD_CLIENTS_SAMPLES=OFF
432 - -DBUILD_CLIENTS_TESTS=OFF
433 - -DBUILD_CLIENTS_BENCHMARKS=OFF
434 - )
435 -
436 - cmake_src_configure
437 -
438 - # do not rerun cmake and the build process in src_install
439 - sed -e '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
440 -}
441 -
442 -src_install() {
443 - cmake_src_install
444 - chrpath --delete "${ED}/usr/lib64/librocblas.so.${rocBLAS_V}"
445 -}
446
447 diff --git a/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild b/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild
448 deleted file mode 100644
449 index bb44363d3..000000000
450 --- a/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild
451 +++ /dev/null
452 @@ -1,76 +0,0 @@
453 -# Copyright 1999-2021 Gentoo Authors
454 -# Distributed under the terms of the GNU General Public License v2
455 -
456 -EAPI=7
457 -
458 -inherit cmake
459 -
460 -DESCRIPTION="AMD's library for BLAS on ROCm."
461 -HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS"
462 -SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-${PN}-${PV}.tar.gz"
463 -
464 -LICENSE="MIT"
465 -KEYWORDS="~amd64"
466 -SLOT="0"
467 -
468 -RDEPEND="=dev-util/hip-$(ver_cut 1-2)*"
469 -DEPEND="${RDEPEND}
470 - dev-perl/File-Which
471 - dev-libs/msgpack
472 - dev-util/cmake
473 - dev-util/rocm-cmake
474 - >=dev-util/Tensile-4.0.0-r1
475 - >=sys-devel/llvm-roc-4.0.0-r2
476 - "
477 -
478 -# stripped library is not working
479 -RESTRICT="strip"
480 -
481 -S="${WORKDIR}"/${PN}-rocm-${PV}
482 -
483 -rocBLAS_V="0.1"
484 -
485 -PATCHES=( "${FILESDIR}"/${PN}-4.0.0-use-system-tensile.patch )
486 -
487 -src_prepare() {
488 - eapply_user
489 -
490 - sed -e "/PREFIX rocblas/d" \
491 - -e "/<INSTALL_INTERFACE/s:include:include/rocblas:" \
492 - -e "s:rocblas/include:include/rocblas:" \
493 - -e "s:\\\\\${CPACK_PACKAGING_INSTALL_PREFIX}rocblas/lib:${EPREFIX}/usr/$(get_libdir)/rocblas:" \
494 - -e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die
495 -
496 - cmake_src_prepare
497 -}
498 -
499 -src_configure() {
500 - # allow acces to hardware
501 - addwrite /dev/kfd
502 - addwrite /dev/dri/
503 - addwrite /dev/random
504 -
505 - export PATH="${EPREFIX}/usr/lib/llvm/roc/bin:${PATH}"
506 -
507 - local mycmakeargs=(
508 - -DTensile_LOGIC="asm_full"
509 - -DTensile_COMPILER="hipcc"
510 - -DTensile_ARCHITECTURE="all"
511 - -DTensile_LIBRARY_FORMAT="msgpack"
512 - -DTensile_CODE_OBJECT_VERSION="V3"
513 - -DTensile_TEST_LOCAL_PATH="${WORKDIR}/Tensile-rocm-${PV}"
514 - -DBUILD_WITH_TENSILE=ON
515 - -DBUILD_WITH_TENSILE_HOST=ON
516 - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
517 - -DCMAKE_INSTALL_INCLUDEDIR="include/rocblas"
518 - -DBUILD_TESTING=OFF
519 - -DBUILD_CLIENTS_SAMPLES=OFF
520 - -DBUILD_CLIENTS_TESTS=OFF
521 - -DBUILD_CLIENTS_BENCHMARKS=OFF
522 - )
523 -
524 - CXX="hipcc" cmake_src_configure
525 -
526 - # do not rerun cmake and the build process in src_install
527 - sed -e '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
528 -}
529
530 diff --git a/sci-libs/rocBLAS/rocBLAS-4.1.0.ebuild b/sci-libs/rocBLAS/rocBLAS-4.1.0.ebuild
531 deleted file mode 100644
532 index 43867c1ef..000000000
533 --- a/sci-libs/rocBLAS/rocBLAS-4.1.0.ebuild
534 +++ /dev/null
535 @@ -1,120 +0,0 @@
536 -# Copyright 1999-2021 Gentoo Authors
537 -# Distributed under the terms of the GNU General Public License v2
538 -
539 -EAPI=7
540 -
541 -PYTHON_COMPAT=( python3_{8,9} )
542 -
543 -inherit cmake python-any-r1
544 -
545 -DESCRIPTION="AMD's library for BLAS on ROCm."
546 -HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS"
547 -SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-${P}.tar.gz
548 - https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-${PV}.tar.gz -> rocm-Tensile-${PV}.tar.gz"
549 -
550 -LICENSE="MIT"
551 -KEYWORDS="~amd64"
552 -IUSE="benchmark test"
553 -SLOT="0"
554 -
555 -BDEPEND="
556 - dev-util/rocm-cmake
557 - !dev-util/Tensile
558 - $(python_gen_any_dep '
559 - dev-python/msgpack[${PYTHON_USEDEP}]
560 - dev-python/pyyaml[${PYTHON_USEDEP}]
561 - ')
562 -"
563 -
564 -RDEPEND="
565 - =dev-util/hip-$(ver_cut 1-2)*
566 - benchmark? ( virtual/blas )
567 -"
568 -
569 -DEPEND="${RDEPEND}
570 - test? ( virtual/blas )
571 -"
572 -
573 -# stripped library is not working
574 -RESTRICT="strip !test? ( test )"
575 -
576 -python_check_deps() {
577 - has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" &&
578 - has_version "dev-python/msgpack[${PYTHON_USEDEP}]"
579 -}
580 -
581 -S="${WORKDIR}"/${PN}-rocm-${PV}
582 -
583 -PATCHES=( "${FILESDIR}"/${PN}-4.1.0-fix-Ninja-build.patch
584 - "${FILESDIR}"/${PN}-4.1.0-fix-glibc-2.32-and-above.patch
585 - "${FILESDIR}"/${PN}-4.1.0-link-system-blas.patch )
586 -
587 -src_prepare() {
588 - eapply_user
589 -
590 - pushd "${WORKDIR}"/Tensile-rocm-${PV} || die
591 - eapply "${FILESDIR}/Tensile-4.1.0-output-commands.patch"
592 - eapply "${FILESDIR}/Tensile-4.1.0-output-EnabledISA.patch"
593 - popd || die
594 -
595 - sed -e "/PREFIX rocblas/d" \
596 - -e "/<INSTALL_INTERFACE/s:include:include/rocblas:" \
597 - -e "s:rocblas/include:include/rocblas:" \
598 - -e "s:\\\\\${CPACK_PACKAGING_INSTALL_PREFIX}rocblas/lib:${EPREFIX}/usr/$(get_libdir)/rocblas:" \
599 - -e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die
600 -
601 - # Use setup.py to install Tensile rather than pip
602 - sed -r -e "/pip install/s:([^ \"\(]*python) -m pip install ([^ \"\)]*):\1 setup.py install --single-version-externally-managed --root / WORKING_DIRECTORY \2:g" -i cmake/virtualenv.cmake
603 -
604 - cmake_src_prepare
605 -}
606 -
607 -src_configure() {
608 - # allow acces to hardware
609 - addwrite /dev/kfd
610 - addwrite /dev/dri/
611 - addwrite /dev/random
612 -
613 - export PATH="${EPREFIX}/usr/lib/llvm/roc/bin:${PATH}"
614 -
615 - local mycmakeargs=(
616 - -DTensile_LOGIC="asm_full"
617 - -DTensile_COMPILER="hipcc"
618 - -DTensile_ARCHITECTURE="all"
619 - -DTensile_LIBRARY_FORMAT="msgpack"
620 - -DTensile_CODE_OBJECT_VERSION="V3"
621 - -DTensile_TEST_LOCAL_PATH="${WORKDIR}/Tensile-rocm-${PV}"
622 - -DBUILD_WITH_TENSILE=ON
623 - -DBUILD_WITH_TENSILE_HOST=ON
624 - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
625 - -DCMAKE_INSTALL_INCLUDEDIR="include/rocblas"
626 - -DBUILD_TESTING=OFF
627 - -DBUILD_CLIENTS_SAMPLES=OFF
628 - -DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
629 - -DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF)
630 - )
631 -
632 - CXX="hipcc" cmake_src_configure
633 -
634 - # do not rerun cmake and the build process in src_install
635 - sed -e '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
636 -}
637 -
638 -src_test() {
639 - cd "${BUILD_DIR}/clients/staging" || die
640 - ROCBLAS_TENSILE_LIBPATH="${BUILD_DIR}/Tensile/library" ./rocblas-test
641 -}
642 -
643 -src_install() {
644 - echo "ROCBLAS_TENSILE_LIBPATH=${EPREFIX}/usr/$(get_libdir)/rocblas/library" >> 99rocblas || die
645 - doenvd 99rocblas
646 -
647 - cmake_src_install
648 -
649 - if use benchmark; then
650 - cd "${BUILD_DIR}" || die
651 - dolib.so clients/librocblas_fortran_client.so
652 - dobin clients/staging/rocblas-bench
653 - chrpath -d "${ED}/usr/bin/rocblas-bench" || die
654 - fi
655 -}