commit:     76702f78fdba29b157d1fcd0c2d92f53e78b0e3e
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Sun Oct 12 17:46:30 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 21 18:47:35 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76702f78

sci-libs/rocSOLVER: add 7.0.2

Bug: https://bugs.gentoo.org/964799

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44165
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/rocSOLVER/Manifest                        |  1 +
 .../files/rocSOLVER-7.0.1-fix-includes.patch       | 12 ++++
 sci-libs/rocSOLVER/metadata.xml                    |  3 +-
 sci-libs/rocSOLVER/rocSOLVER-7.0.2.ebuild          | 79 ++++++++++++++++++++++
 4 files changed, 94 insertions(+), 1 deletion(-)

diff --git a/sci-libs/rocSOLVER/Manifest b/sci-libs/rocSOLVER/Manifest
index a5b9ce791e8c..c2e29447bd93 100644
--- a/sci-libs/rocSOLVER/Manifest
+++ b/sci-libs/rocSOLVER/Manifest
@@ -1,2 +1,3 @@
 DIST rocSOLVER-6.3.3.tar.gz 3077208 BLAKE2B 
b3c5a8377b503b2639f81ae7457d233dd225f8422a9134148826d875cacac2cb03429734915c25ca8971c651c31071daccfad9ad4fcb66a034f38b5b991380aa
 SHA512 
5effc07c9ed5a22bfbb114fc9777e61e9b524c439ea98e0802e63490a27d4e17747de5eee74df59138bf8dcb8700b00a9074079ee3666bba630af2bab800a541
 DIST rocSOLVER-6.4.3.tar.gz 3151118 BLAKE2B 
84e533a9af91a6b12c1b7f967c7879c5a3d59a46e12aacb6814905f99f7de7c2cd1b429dd41e5b33b0eb63a5fae1ef6fb7d20a0508466b960a2d5c59b81c7a9a
 SHA512 
84a37d94ca55edfc5038425f1dc6f6658e34fbbfdd3e32be3f3668307e5590895c09c4e0769e4cd89af74a2a651c6311df7124b1bedf1a7375fa519560d95e9f
+DIST rocSOLVER-7.0.2.tar.gz 3195696 BLAKE2B 
65dae68611804184f82e6828dfd54905f7da0ad4cd56d1aa72f24e35b546e827884965d7acc94d8aba875db84726cb5da92ca8c5676777bfbd9250ccb8c37687
 SHA512 
8b4f9aa74dbb744daa33536872ae8c78098875533779ea7f5439a3422a0d1fdbb5d8158d3705946e6f19640ace847258b48fe0b612582f4037786dd845d7dae0

diff --git a/sci-libs/rocSOLVER/files/rocSOLVER-7.0.1-fix-includes.patch 
b/sci-libs/rocSOLVER/files/rocSOLVER-7.0.1-fix-includes.patch
new file mode 100644
index 000000000000..013be39f53fd
--- /dev/null
+++ b/sci-libs/rocSOLVER/files/rocSOLVER-7.0.1-fix-includes.patch
@@ -0,0 +1,12 @@
+Upstream commit: 
https://github.com/ROCm/rocm-libraries/commit/7c8d53fee5b3670fa49fb1c09fca506a62cbf724
+--- a/library/src/include/lib_device_helpers.hpp
++++ b/library/src/include/lib_device_helpers.hpp
+@@ -27,6 +27,8 @@
+ 
+ #pragma once
+ 
++#include <cassert>
++
+ #include <hip/hip_runtime.h>
+ 
+ #include "ideal_sizes.hpp"

diff --git a/sci-libs/rocSOLVER/metadata.xml b/sci-libs/rocSOLVER/metadata.xml
index 97b4749ddd6d..9879e7cab402 100644
--- a/sci-libs/rocSOLVER/metadata.xml
+++ b/sci-libs/rocSOLVER/metadata.xml
@@ -17,10 +17,11 @@
     <name>Sv. Lockal</name>
   </maintainer>
   <upstream>
-    <remote-id type="github">ROCm/rocSOLVER</remote-id>
+    <remote-id type="github">ROCm/rocm-libraries</remote-id>
   </upstream>
   <use>
     <flag name="test">Perform rocsolver-test to compare the result between 
rocSOLVER and system LAPACK.</flag>
     <flag name="benchmark">Build and install rocsolver-bench.</flag>
+    <flag name="sparse">Install and link with <pkg>sci-libs/rocSPARSE</pkg> 
instead of loading it with dlopen</flag>
   </use>
 </pkgmetadata>

diff --git a/sci-libs/rocSOLVER/rocSOLVER-7.0.2.ebuild 
b/sci-libs/rocSOLVER/rocSOLVER-7.0.2.ebuild
new file mode 100644
index 000000000000..1a84090e9976
--- /dev/null
+++ b/sci-libs/rocSOLVER/rocSOLVER-7.0.2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ROCM_VERSION=${PV}
+
+inherit cmake edo flag-o-matic rocm
+
+DESCRIPTION="Implementation of a subset of LAPACK functionality on the ROCm 
platform"
+HOMEPAGE="https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocsolver";
+SRC_URI="https://github.com/ROCm/rocSOLVER/archive/rocm-${PV}.tar.gz -> 
rocSOLVER-${PV}.tar.gz"
+S=${WORKDIR}/${PN}-rocm-${PV}
+
+LICENSE="BSD"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+IUSE="benchmark sparse test"
+REQUIRED_USE="${ROCM_REQUIRED_USE}"
+
+RDEPEND="dev-util/hip:${SLOT}
+       sci-libs/rocBLAS:${SLOT}
+       benchmark? ( virtual/blas )
+       sparse? ( sci-libs/rocSPARSE:${SLOT} )
+"
+DEPEND="
+       ${RDEPEND}
+       dev-libs/libfmt
+"
+BDEPEND="test? ( dev-cpp/gtest
+       >=dev-build/cmake-3.22
+       virtual/blas )"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-7.0.1-fix-includes.patch
+)
+
+src_configure() {
+       rocm_use_clang
+
+       # too many warnings
+       append-cxxflags -Wno-explicit-specialization-storage-class
+
+       local mycmakeargs=(
+               -DCMAKE_SKIP_RPATH=ON
+               -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
+               -Wno-dev
+               -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
+               -DROCM_SYMLINK_LIBS=OFF
+               -DBUILD_CLIENTS_SAMPLES=OFF
+               -DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
+               -DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF)
+               -DBUILD_WITH_SPARSE=$(usex sparse ON OFF)
+       )
+
+       cmake_src_configure
+}
+
+src_test() {
+       check_amdgpu
+       cd "${BUILD_DIR}"/clients/staging || die
+       # No filters: 64m28s on gfx1100
+       # 'checkin*-*known_bug*': 1m35s
+       HIP_VISIBLE_DEVICES=0 LD_LIBRARY_PATH="${BUILD_DIR}/library/src" \
+               edob ./rocsolver-test \
+               
--gtest_filter='checkin*-*known_bug*:*GVD*batched*:*STEDCX*/74:*BDSVDX*:*SYGVDX_INPLACE.__float*'
+}
+
+src_install() {
+       cmake_src_install
+
+       if use benchmark; then
+               cd "${BUILD_DIR}" || die
+               dobin clients/staging/rocsolver-bench
+       fi
+}

Reply via email to