commit:     56c61822dbdf76f1e2eff9630c3604cc1387127e
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Mon Dec  9 18:07:40 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 21:46:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56c61822

sci-libs/hipSOLVER: add 6.3.0

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/hipSOLVER/Manifest                        |  1 +
 .../files/hipSOLVER-6.3.0-find-cholmod.patch       | 56 ++++++++++++++++++++++
 sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild          |  2 +-
 ...pSOLVER-6.1.1.ebuild => hipSOLVER-6.3.0.ebuild} |  4 +-
 sci-libs/hipSOLVER/metadata.xml                    |  2 +-
 5 files changed, 61 insertions(+), 4 deletions(-)

diff --git a/sci-libs/hipSOLVER/Manifest b/sci-libs/hipSOLVER/Manifest
index bb01207f1e20..e017ef01d115 100644
--- a/sci-libs/hipSOLVER/Manifest
+++ b/sci-libs/hipSOLVER/Manifest
@@ -1,2 +1,3 @@
 DIST hipSOLVER-rocm-5.7.1.tar.gz 1516012 BLAKE2B 
8d0966d34877978784b9872150283719602465c85036c3a74a72a2fe7c516b6029af3f4aefbc022088b2cf37bb1e0a450c0221aef0ac3227018020de340adfcd
 SHA512 
f9c14b51ea582f17d1b323c7d066d9c0c95f4250f08515768d7a11067774fd2841fa3dec7354d3c98e56bd8dd53cff3b993c68b1d7df4b24f562b3afe9c4625e
 DIST hipSOLVER-rocm-6.1.1.tar.gz 2553462 BLAKE2B 
77731b876a7fe5f80f79e5af5128a84d8a5d4dee6d511f3e1cf4964845b636380f7f1e19f07e84ed24b98e99c3bdfbba623b97b48cf4ea1bc09a4c1bd3dccaed
 SHA512 
4f28ecd807717013318f293df8c48d7674f64fd3a538c2b827f4188a00a36165f48277d5ac50e806461d52a8a3b6d626cab91ff7c6687b17fea2580461e08de9
+DIST hipSOLVER-rocm-6.3.0.tar.gz 2575560 BLAKE2B 
293a149e162e74bbf5ddc143bb5bb3fffe52fbe0a53f7ad2d3141fb91cd2fe1108f6a12c976e5b4b91de98b146a84f7290f073d6226214e2dbc13ccd1ddca26c
 SHA512 
a648472695c917e3eab49414ceb6eb9a1c4a6dc3f667907f7d9a67f873d8826588dad823f74b8498bc81c23741a52b745451d13e78079e86d95b36da9b789a7b

diff --git a/sci-libs/hipSOLVER/files/hipSOLVER-6.3.0-find-cholmod.patch 
b/sci-libs/hipSOLVER/files/hipSOLVER-6.3.0-find-cholmod.patch
new file mode 100644
index 000000000000..32c049c5947f
--- /dev/null
+++ b/sci-libs/hipSOLVER/files/hipSOLVER-6.3.0-find-cholmod.patch
@@ -0,0 +1,56 @@
+Builds with -DBUILD_WITH_SPARSE=ON are broken
+Upstream bug: https://github.com/ROCm/hipSOLVER/issues/347
+--- a/library/src/amd_detail/dlopen/cholmod.hpp
++++ b/library/src/amd_detail/dlopen/cholmod.hpp
+@@ -24,7 +24,7 @@
+ #include "lib_macros.hpp"
+ 
+ #ifdef HAVE_ROCSPARSE
+-#include <suitesparse/cholmod.h>
++#include <cholmod.h>
+ #else
+ 
+ // constants
+--- a/library/src/CMakeLists.txt
++++ b/library/src/CMakeLists.txt
+@@ -42,8 +42,6 @@ prepend_path(".." hipsolver_headers_public 
relative_hipsolver_headers_public)
+ 
+ if(NOT USE_CUDA)
+   set(hipsolver_source
+-    "${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/dlopen/cholmod.cpp"
+-    "${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/dlopen/rocsparse.cpp"
+     "${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/hipsolver_conversions.cpp"
+     "${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/hipsolver.cpp"
+     "${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/hipsolver_dense.cpp"
+@@ -52,6 +50,12 @@ if(NOT USE_CUDA)
+     "${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/hipsolver_sparse.cpp"
+     "${CMAKE_CURRENT_SOURCE_DIR}/common/hipsolver_dense_common.cpp"
+   )
++  if (NOT BUILD_WITH_SPARSE)
++    list(APPEND hipsolver_source
++      "${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/dlopen/cholmod.cpp"
++      "${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/dlopen/rocsparse.cpp"
++    )
++  endif()
+ else()
+   set(hipsolver_source
+     "${CMAKE_CURRENT_SOURCE_DIR}/nvidia_detail/hipsolver_conversions.cpp"
+@@ -149,14 +153,11 @@ if(NOT USE_CUDA)
+       list(APPEND static_depends PACKAGE rocsparse)
+     endif()
+ 
+-    find_package(CHOLMOD QUIET)
+-    if(NOT TARGET SuiteSparse::CHOLMOD)
+-      # try again with the custom find modules for older versions of 
suitesparse
+-      list(APPEND CMAKE_MODULE_PATH 
${CMAKE_CURRENT_SOURCE_DIR}/cmake/suitesparse)
+-      find_package(CHOLMOD REQUIRED)
+-    endif()
++    find_package(PkgConfig REQUIRED)
++    pkg_check_modules(CHOLMOD REQUIRED IMPORTED_TARGET cholmod)
++
++    target_link_libraries(hipsolver PRIVATE roc::rocsparse PkgConfig::CHOLMOD)
+ 
+-    target_link_libraries( hipsolver PRIVATE roc::rocsparse 
SuiteSparse::CHOLMOD)
+     set_source_files_properties(${hipsolver_source}
+       PROPERTIES
+         COMPILE_DEFINITIONS HAVE_ROCSPARSE

diff --git a/sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild 
b/sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild
index 99c4a9c0ca41..1a010790ca8d 100644
--- a/sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild
+++ b/sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild
@@ -22,7 +22,7 @@ IUSE="sparse"
 RESTRICT="test"
 
 RDEPEND="
-       dev-util/hip
+       dev-util/hip:${SLOT}
        sci-libs/rocSOLVER:${SLOT}[${ROCM_USEDEP}]
        sparse? (
                sci-libs/suitesparseconfig

diff --git a/sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild 
b/sci-libs/hipSOLVER/hipSOLVER-6.3.0.ebuild
similarity index 93%
copy from sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild
copy to sci-libs/hipSOLVER/hipSOLVER-6.3.0.ebuild
index 99c4a9c0ca41..ea8bafabf7c5 100644
--- a/sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild
+++ b/sci-libs/hipSOLVER/hipSOLVER-6.3.0.ebuild
@@ -22,7 +22,7 @@ IUSE="sparse"
 RESTRICT="test"
 
 RDEPEND="
-       dev-util/hip
+       dev-util/hip:${SLOT}
        sci-libs/rocSOLVER:${SLOT}[${ROCM_USEDEP}]
        sparse? (
                sci-libs/suitesparseconfig
@@ -32,7 +32,7 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 
 PATCHES=(
-       "${FILESDIR}"/${PN}-6.1.1-find-cholmod.patch
+       "${FILESDIR}"/${PN}-6.3.0-find-cholmod.patch
 )
 
 src_configure() {

diff --git a/sci-libs/hipSOLVER/metadata.xml b/sci-libs/hipSOLVER/metadata.xml
index 9aa1438b519c..426f234221d8 100644
--- a/sci-libs/hipSOLVER/metadata.xml
+++ b/sci-libs/hipSOLVER/metadata.xml
@@ -14,7 +14,7 @@
     <name>Sv. Lockal</name>
   </maintainer>
   <upstream>
-    <remote-id type="github">ROCmSoftwarePlatform/hipSOLVER</remote-id>
+    <remote-id type="github">ROCm/hipSOLVER</remote-id>
   </upstream>
   <use>
     <flag name="sparse">Build hipSOLVER with sparse functionality 
(sci-libs/cholmod)</flag>

Reply via email to