[gentoo-commits] repo/gentoo:master commit in: sci-libs/rocBLAS/files/, sci-libs/rocBLAS/

2023-02-01 Thread Andreas Sturmlechner
commit: af7fdf9acbb15c5faf4895fe027cd213ba17cf9f
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Jan 24 22:21:42 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Wed Feb  1 09:52:52 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af7fdf9a

sci-libs/rocBLAS: drop 5.0.2-r2

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 sci-libs/rocBLAS/Manifest  |   1 -
 .../files/rocBLAS-5.0.2-respect-makeopts.patch |  73 ---
 sci-libs/rocBLAS/rocBLAS-5.0.2-r2.ebuild   | 137 -
 3 files changed, 211 deletions(-)

diff --git a/sci-libs/rocBLAS/Manifest b/sci-libs/rocBLAS/Manifest
index 3ba6938bbd3c..e067ceef0a6c 100644
--- a/sci-libs/rocBLAS/Manifest
+++ b/sci-libs/rocBLAS/Manifest
@@ -1,5 +1,4 @@
 DIST rocBLAS-5.0.2-Tensile-asm_full-navi22.tar.gz 1110323 BLAKE2B 
80fab97c6f89fccf1f8829ad41baf15ad31313b48825841834c7ec1b9f8ece794aebdf9fda42b54a38f642beb1bc1e374f2f3b4e43d8ba9dfd1eb6e3ece5
 SHA512 
8f6946cf9d68afd195640ae7e0da8dc33341c67f28813813b5361a56531fa2af4453d075703ea52c66d93a1936cf74688b86aa2fa62b52a7ed5f03272290c232
 DIST rocBLAS-5.4.2-Tensile-asm_full-navi22.tar.gz 1057686 BLAKE2B 
aa755595bbcd48775713f1d94c18b9bfa6464cae97653dd5beda9e4ed600802b62c4159e6edef7fbd4c92e629bbda1c284e6c48e096c7eaf22bbaad86bdcdace
 SHA512 
cdc928528e7ce5bcc3ae32ec18e3aee48533f24e77c1e42f6e0398858eefebd52b8812caabe01a0ef7fa552e00118b862e025f1675a9642b009f1e38efbcdd53
-DIST rocm-rocBLAS-5.0.2.tar.gz 13295178 BLAKE2B 
e1abfa06b9ac1545732465857839dae3f3708af49439a306a2b5b1b1b392101c38c95815f2c05a0d9ed29d41b154bc2e16a4f9203a37f5e2f68ee12cc4b44a06
 SHA512 
2f4a74f49350ede0debcf32229a6b6b95505615723c3f2bee16e4c169a3bb966dfb1971819028f47c525f571bea5662b892e63f655b0d1d2b8f20746bc5fe770
 DIST rocm-rocBLAS-5.1.3.tar.gz 13741546 BLAKE2B 
af10d8cb69bee44ef5aab2dc350e1d9f3b6fddb3a840c17230c4b55b2649a4724c9f2e58c1eafdb3e2716eea016a72a35c3ddb498881b1ce682d780baa8d8b07
 SHA512 
5ab71838fdd0e9c5848cbf28a19d113353b619a878d8c7d05f64feb32faae2054169c95ed6e9dd6b05a2e807b57229dd2c361c4d289b6e6f17c196558640890f
 DIST rocm-rocBLAS-5.4.2.tar.gz 15938434 BLAKE2B 
14ebafa944fdac443800bb7f9b16f8ecf0f420b168d3c6534f68ad7d14bf058a4cc1673fce8f4b9be53e4a6c1cf05011e01853cd901bce0b59827d2aca4d029f
 SHA512 
e62bb80457c1e89454885499bdce9d60beecd706806724418983c78c65c2ae303550f9670b5a6e71dae6a61c0e42b223ab01b36b8406430731ebcbff54c4a8f4

diff --git a/sci-libs/rocBLAS/files/rocBLAS-5.0.2-respect-makeopts.patch 
b/sci-libs/rocBLAS/files/rocBLAS-5.0.2-respect-makeopts.patch
deleted file mode 100644
index 649a98106646..
--- a/sci-libs/rocBLAS/files/rocBLAS-5.0.2-respect-makeopts.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Only retain CMakeLists patch. We don't need install.sh, rmake.py
-Suggested-By: Alessandro Barbieri 
-
-From 0ffee0626bf987bae6b81183a5c61569a489537a Mon Sep 17 00:00:00 2001
-From: Torre Zuk <42548444+torre...@users.noreply.github.com>
-Date: Thu, 4 Nov 2021 09:21:37 -0600
-Subject: [PATCH] Swdev 309014 add jobs arg (#953)
-
-* adds -j --jobs argment passing of cpu_threads for build

- CMakeLists.txt |  1 +
- install.sh | 16 
- library/src/CMakeLists.txt | 34 +-
- rmake.py   | 29 ++---
- 4 files changed, 56 insertions(+), 24 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 69cf8d586..40d88ea0a 100644
 a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -244,6 +244,7 @@ if(NOT SKIP_LIBRARY)
- set( Tensile_CODE_OBJECT_VERSION "V2" CACHE STRING "Tensile 
code_object_version")
- set( Tensile_COMPILER "hipcc" CACHE STRING "Tensile compiler")
- set( Tensile_LIBRARY_FORMAT "msgpack" CACHE STRING "Tensile library 
format")
-+set( Tensile_CPU_THREADS "" CACHE STRING "Number of threads for Tensile 
parallel build")
- 
- option( Tensile_MERGE_FILES "Tensile to merge kernels and solutions 
files?" ON )
- option( Tensile_SHORT_FILENAMES "Tensile to use short file names? Use if 
compiler complains they're too long." OFF )
-diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
-index 4f5e4572d..dedfe9794 100755
 a/library/src/CMakeLists.txt
-+++ b/library/src/CMakeLists.txt
-@@ -58,15 +58,31 @@ if( BUILD_WITH_TENSILE )
- 
-   # Add a build target for Tensile kernel library
-   # Runtime language is HIP by default
--  TensileCreateLibraryFiles(
--"${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/Logic/${Tensile_LOGIC}"
--"${PROJECT_BINARY_DIR}/Tensile"
--ARCHITECTURE${Tensile_ARCHITECTURE}
--CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION}
--COMPILER${Tensile_COMPILER}
--LIBRARY_FORMAT  ${Tensile_LIBRARY_FORMAT}
--${Tensile_Options}
--  )
-+  # warning our Tensile_ variables may shadow variable in 
TensileCreateLibraryFiles
-+  # thus bypassing the 

[gentoo-commits] repo/gentoo:master commit in: sci-libs/rocBLAS/files/, sci-libs/rocBLAS/

2023-01-31 Thread Benda XU
commit: f4dba4a5f9cb91c066086f6145d34bf53578f3d8
Author: Yiyang Wu  gmail  com>
AuthorDate: Sat Jan 28 12:32:37 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 14:26:51 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4dba4a5

sci-libs/rocBLAS: add 5.4.2

Closes: https://github.com/gentoo/gentoo/pull/29319
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 sci-libs/rocBLAS/Manifest  |   2 +
 .../files/rocBLAS-5.4.2-add-missing-header.patch   |  14 +++
 .../files/rocBLAS-5.4.2-cpp_lib_filesystem.patch   |  24 +
 .../rocBLAS/files/rocBLAS-5.4.2-link-cblas.patch   |  12 +++
 .../files/rocBLAS-5.4.2-unbundle-Tensile.patch |  26 +
 sci-libs/rocBLAS/rocBLAS-5.4.2.ebuild  | 107 +
 6 files changed, 185 insertions(+)

diff --git a/sci-libs/rocBLAS/Manifest b/sci-libs/rocBLAS/Manifest
index 8e328c26a78e..3ba6938bbd3c 100644
--- a/sci-libs/rocBLAS/Manifest
+++ b/sci-libs/rocBLAS/Manifest
@@ -1,3 +1,5 @@
 DIST rocBLAS-5.0.2-Tensile-asm_full-navi22.tar.gz 1110323 BLAKE2B 
80fab97c6f89fccf1f8829ad41baf15ad31313b48825841834c7ec1b9f8ece794aebdf9fda42b54a38f642beb1bc1e374f2f3b4e43d8ba9dfd1eb6e3ece5
 SHA512 
8f6946cf9d68afd195640ae7e0da8dc33341c67f28813813b5361a56531fa2af4453d075703ea52c66d93a1936cf74688b86aa2fa62b52a7ed5f03272290c232
+DIST rocBLAS-5.4.2-Tensile-asm_full-navi22.tar.gz 1057686 BLAKE2B 
aa755595bbcd48775713f1d94c18b9bfa6464cae97653dd5beda9e4ed600802b62c4159e6edef7fbd4c92e629bbda1c284e6c48e096c7eaf22bbaad86bdcdace
 SHA512 
cdc928528e7ce5bcc3ae32ec18e3aee48533f24e77c1e42f6e0398858eefebd52b8812caabe01a0ef7fa552e00118b862e025f1675a9642b009f1e38efbcdd53
 DIST rocm-rocBLAS-5.0.2.tar.gz 13295178 BLAKE2B 
e1abfa06b9ac1545732465857839dae3f3708af49439a306a2b5b1b1b392101c38c95815f2c05a0d9ed29d41b154bc2e16a4f9203a37f5e2f68ee12cc4b44a06
 SHA512 
2f4a74f49350ede0debcf32229a6b6b95505615723c3f2bee16e4c169a3bb966dfb1971819028f47c525f571bea5662b892e63f655b0d1d2b8f20746bc5fe770
 DIST rocm-rocBLAS-5.1.3.tar.gz 13741546 BLAKE2B 
af10d8cb69bee44ef5aab2dc350e1d9f3b6fddb3a840c17230c4b55b2649a4724c9f2e58c1eafdb3e2716eea016a72a35c3ddb498881b1ce682d780baa8d8b07
 SHA512 
5ab71838fdd0e9c5848cbf28a19d113353b619a878d8c7d05f64feb32faae2054169c95ed6e9dd6b05a2e807b57229dd2c361c4d289b6e6f17c196558640890f
+DIST rocm-rocBLAS-5.4.2.tar.gz 15938434 BLAKE2B 
14ebafa944fdac443800bb7f9b16f8ecf0f420b168d3c6534f68ad7d14bf058a4cc1673fce8f4b9be53e4a6c1cf05011e01853cd901bce0b59827d2aca4d029f
 SHA512 
e62bb80457c1e89454885499bdce9d60beecd706806724418983c78c65c2ae303550f9670b5a6e71dae6a61c0e42b223ab01b36b8406430731ebcbff54c4a8f4

diff --git a/sci-libs/rocBLAS/files/rocBLAS-5.4.2-add-missing-header.patch 
b/sci-libs/rocBLAS/files/rocBLAS-5.4.2-add-missing-header.patch
new file mode 100644
index ..cefad2bad61a
--- /dev/null
+++ b/sci-libs/rocBLAS/files/rocBLAS-5.4.2-add-missing-header.patch
@@ -0,0 +1,14 @@
+Mitigate compilation issue.
+
+std::bad_alloc is defined in 
+--- a/clients/include/host_alloc.hpp
 b/clients/include/host_alloc.hpp
+@@ -22,6 +22,8 @@
+ 
+ #pragma once
+ 
++#include 
++
+ //!
+ //! @brief Host free memory w/o swap.  Returns kB or -1 if unknown.
+ //!

diff --git a/sci-libs/rocBLAS/files/rocBLAS-5.4.2-cpp_lib_filesystem.patch 
b/sci-libs/rocBLAS/files/rocBLAS-5.4.2-cpp_lib_filesystem.patch
new file mode 100644
index ..688fe7eb5bc3
--- /dev/null
+++ b/sci-libs/rocBLAS/files/rocBLAS-5.4.2-cpp_lib_filesystem.patch
@@ -0,0 +1,24 @@
+Index: rocBLAS-rocm-5.4.2/clients/common/utility.cpp
+===
+--- rocBLAS-rocm-5.4.2.orig/clients/common/utility.cpp
 rocBLAS-rocm-5.4.2/clients/common/utility.cpp
+@@ -38,6 +38,7 @@
+ #ifdef WIN32
+ #define strcasecmp(A, B) _stricmp(A, B)
+ 
++#include 
+ #ifdef __cpp_lib_filesystem
+ #include 
+ namespace fs = std::filesystem;
+Index: rocBLAS-rocm-5.4.2/clients/include/singletons.hpp
+===
+--- rocBLAS-rocm-5.4.2.orig/clients/include/singletons.hpp
 rocBLAS-rocm-5.4.2/clients/include/singletons.hpp
+@@ -21,6 +21,6 @@
+  *  */
+ 
+ // global for device memory padding see d_vector.hpp
+-
++#include
+ extern size_t g_DVEC_PAD;
+ void  d_vector_set_pad_length(size_t pad);

diff --git a/sci-libs/rocBLAS/files/rocBLAS-5.4.2-link-cblas.patch 
b/sci-libs/rocBLAS/files/rocBLAS-5.4.2-link-cblas.patch
new file mode 100644
index ..a0a599ad0de8
--- /dev/null
+++ b/sci-libs/rocBLAS/files/rocBLAS-5.4.2-link-cblas.patch
@@ -0,0 +1,12 @@
+Fix CPU blas function not found linking issue
+--- a/clients/CMakeLists.txt
 b/clients/CMakeLists.txt
+@@ -119,7 +119,7 @@ if( BUILD_CLIENTS_BENCHMARKS OR BUILD_CLIENTS_TESTS)
+   set( BLIS_CPP ../common/blis_interface.cpp )
+   set( BLAS_LIBRARY ${BUILD_DIR}/deps/blis/lib/libblis.a 

[gentoo-commits] repo/gentoo:master commit in: sci-libs/rocBLAS/files/, sci-libs/rocBLAS/

2022-03-26 Thread Benda XU
commit: f1dcb1e8ba4936959138ccf747400d0d54d87b26
Author: YiyangWu  gmail  com>
AuthorDate: Mon Feb 21 15:03:56 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Sun Mar 27 03:12:51 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1dcb1e8

sci-libs/rocBLAS: bump version to 5.0.2

Enable nai22 chips (Radeon RX 6700/6700 XT / 6800M, gfx1031)
fix test issue when PORTAGE_USERNAME is not portage:
"[: too many arguments"

Closes: https://bugs.gentoo.org/834672
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 sci-libs/rocBLAS/Manifest  |   2 +
 ...-5.0.2-change-default-Tensile-library-dir.patch |  47 +++
 .../files/rocBLAS-5.0.2-cpp_lib_filesystem.patch   |  50 
 .../files/rocBLAS-5.0.2-unbundle-Tensile.patch |  25 
 sci-libs/rocBLAS/rocBLAS-5.0.2.ebuild  | 135 +
 5 files changed, 259 insertions(+)

diff --git a/sci-libs/rocBLAS/Manifest b/sci-libs/rocBLAS/Manifest
index 00865310a02d..e8bb583d38a1 100644
--- a/sci-libs/rocBLAS/Manifest
+++ b/sci-libs/rocBLAS/Manifest
@@ -1,2 +1,4 @@
+DIST rocBLAS-5.0.2-Tensile-asm_full-navi22.tar.gz 1110323 BLAKE2B 
80fab97c6f89fccf1f8829ad41baf15ad31313b48825841834c7ec1b9f8ece794aebdf9fda42b54a38f642beb1bc1e374f2f3b4e43d8ba9dfd1eb6e3ece5
 SHA512 
8f6946cf9d68afd195640ae7e0da8dc33341c67f28813813b5361a56531fa2af4453d075703ea52c66d93a1936cf74688b86aa2fa62b52a7ed5f03272290c232
 DIST rocm-Tensile-4.3.0.tar.gz 14250149 BLAKE2B 
030138eaca2a0aadd96801e6dbd72e510716dd90553ef3795c5e04e00a34a05ecae82b24f755e4033a4acfcdb1cf26291da1e7902bb090f89a010d403e832beb
 SHA512 
126db0b413c716fba8d5be9bff7a44fd1badacbf32f3db8d0db649819177db37ebd56fd22dd3c809655f5d29675be115e698cd10bc3d0b4b23878ae3726fce47
 DIST rocm-rocBLAS-4.3.0.tar.gz 11569970 BLAKE2B 
f11b0acf2bbd5737b036142d3b2cc1e18c38e088a8b7db58156d478dd6718befbb82bb7fd43a38fe64a5427124c5ad5241fa37977f094e6efd195d168d3e5f65
 SHA512 
490ab1c1e98a8b311ad5630515c448d9bb0a2bf588a08bcbebee345e2954d616b4ffe7c2e03dadca82c590438c42afccb98fe8ba00856aece101b5ffe62ef1e0
+DIST rocm-rocBLAS-5.0.2.tar.gz 13295178 BLAKE2B 
e1abfa06b9ac1545732465857839dae3f3708af49439a306a2b5b1b1b392101c38c95815f2c05a0d9ed29d41b154bc2e16a4f9203a37f5e2f68ee12cc4b44a06
 SHA512 
2f4a74f49350ede0debcf32229a6b6b95505615723c3f2bee16e4c169a3bb966dfb1971819028f47c525f571bea5662b892e63f655b0d1d2b8f20746bc5fe770

diff --git 
a/sci-libs/rocBLAS/files/rocBLAS-5.0.2-change-default-Tensile-library-dir.patch 
b/sci-libs/rocBLAS/files/rocBLAS-5.0.2-change-default-Tensile-library-dir.patch
new file mode 100644
index ..618847b8fb8d
--- /dev/null
+++ 
b/sci-libs/rocBLAS/files/rocBLAS-5.0.2-change-default-Tensile-library-dir.patch
@@ -0,0 +1,47 @@
+change the default rocm tensile library search path
+Index: rocBLAS-rocm-5.0.1/library/src/tensile_host.cpp
+===
+--- rocBLAS-rocm-5.0.1.orig/library/src/tensile_host.cpp
 rocBLAS-rocm-5.0.1/library/src/tensile_host.cpp
+@@ -558,40 +558,8 @@ namespace
+ // Find the location of librocblas.dll/.so
+ // Fall back on hard-coded path if static library or not found
+ 
+-#ifndef ROCBLAS_STATIC_LIB
+-#ifdef WIN32
+-// wchar_t wpath[MAX_PATH + 1] = {0};
+-// if(GetModuleFileNameW(GetModuleHandle("rocblas.dll"), 
wpath, MAX_PATH + 1))
+-// {
+-// std::wstring  wspath(wpath);
+-// std::string   tmp(wspath.begin(), 
wspath.end());
+ 
+-std::vector dll_path(MAX_PATH + 1);
+-if(GetModuleFileNameA(
+-   GetModuleHandleA("rocblas.dll"), dll_path.data(), 
MAX_PATH + 1))
+-{
+-std::string   tmp(dll_path.begin(), 
dll_path.end());
+-std::filesystem::path exepath = tmp;
+-if(exepath.has_filename())
+-{
+-path = exepath.remove_filename().string();
+-}
+-}
+-#else
+-dl_iterate_phdr(rocblas_dl_iterate_phdr_callback, NULL);
+-if(rocblas_so_path.size())
+-path = std::string{dirname(_so_path[0])};
+-#endif
+-#endif // ifndef ROCBLAS_STATIC_LIB
+-
+-// Find the location of the libraries
+-if(TestPath(path + "/../../Tensile/library"))
+-path += "/../../Tensile/library";
+-else
+-path += "/library";
+-
+-if(TestPath(path + "/" + processor))
+-path += "/" + processor;
++  
path="@GENTOO_PORTAGE_EPREFIX@/usr/lib64/rocblas/library";
+ }
+ 
+ // only load modules for the current architecture

diff --git