public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/hipSOLVER/files/, sci-libs/hipSOLVER/
@ 2024-06-26  9:21 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-06-26  9:21 UTC (permalink / raw
  To: gentoo-commits

commit:     1f2509f3c9b9fff1b310259ded9ffd8145f9373f
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Wed Mar 20 12:06:34 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 26 09:19:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f2509f3

sci-libs/hipSOLVER: add 6.1.1

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.1.1-find-cholmod.patch       | 29 +++++++++++++
 sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild          | 47 ++++++++++++++++++++++
 sci-libs/hipSOLVER/metadata.xml                    |  3 ++
 4 files changed, 80 insertions(+)

diff --git a/sci-libs/hipSOLVER/Manifest b/sci-libs/hipSOLVER/Manifest
index 44e9bd41301a..bb01207f1e20 100644
--- a/sci-libs/hipSOLVER/Manifest
+++ b/sci-libs/hipSOLVER/Manifest
@@ -1 +1,2 @@
 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

diff --git a/sci-libs/hipSOLVER/files/hipSOLVER-6.1.1-find-cholmod.patch b/sci-libs/hipSOLVER/files/hipSOLVER-6.1.1-find-cholmod.patch
new file mode 100644
index 000000000000..da43f4ff116b
--- /dev/null
+++ b/sci-libs/hipSOLVER/files/hipSOLVER-6.1.1-find-cholmod.patch
@@ -0,0 +1,29 @@
+cholmod.h is in /usr/include in Gentoo, use pkg-config to find it
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -221,11 +221,9 @@ if( NOT USE_CUDA )
+   if( BUILD_WITH_SPARSE )
+     list(APPEND hipsolver_pkgdeps "rocsparse >= 2.3.0")
+ 
+-    if( SYSTEM_OS STREQUAL "centos" OR SYSTEM_OS STREQUAL "rhel" )
+-      list(APPEND hipsolver_pkgdeps "suitesparse")
+-    else()
+-      list(APPEND hipsolver_pkgdeps "libcholmod3" "libsuitesparseconfig5")
+-    endif()
++    find_package(PkgConfig REQUIRED)
++    pkg_check_modules(CHOLMOD REQUIRED IMPORTED_TARGET cholmod)
++    target_link_libraries(hipsolver-common INTERFACE PkgConfig::CHOLMOD)
+   endif( )
+ 
+   rocm_package_add_dependencies(DEPENDS ${hipsolver_pkgdeps})
+--- a/library/src/amd_detail/hipsolver_sparse.cpp
++++ b/library/src/amd_detail/hipsolver_sparse.cpp
+@@ -45,7 +45,7 @@
+ 
+ #ifdef HAVE_ROCSPARSE
+ #include <rocsparse/rocsparse.h>
+-#include <suitesparse/cholmod.h>
++#include <cholmod.h>
+ #endif
+ 
+ #undef TRUE

diff --git a/sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild b/sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild
new file mode 100644
index 000000000000..be450babaed3
--- /dev/null
+++ b/sci-libs/hipSOLVER/hipSOLVER-6.1.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ROCM_VERSION=${PV}
+
+inherit cmake rocm
+
+DESCRIPTION="CU / ROCM agnostic marshalling library for LAPACK routines on the GPU"
+HOMEPAGE="https://github.com/ROCm/hipSOLVER"
+SRC_URI="https://github.com/ROCm/hipSOLVER/archive/refs/tags/rocm-${PV}.tar.gz -> hipSOLVER-rocm-${PV}.tar.gz"
+S="${WORKDIR}/hipSOLVER-rocm-${PV}"
+
+REQUIRED_USE="${ROCM_REQUIRED_USE}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+IUSE="sparse"
+
+RESTRICT="test"
+
+RDEPEND="
+	dev-util/hip
+	sci-libs/rocSOLVER:${SLOT}[${ROCM_USEDEP}]
+	sparse? (
+		sci-libs/suitesparseconfig
+		sci-libs/cholmod
+	)
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.1.1-find-cholmod.patch
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DAMDGPU_TARGETS="$(get_amdgpu_flags)"
+		-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
+		-DROCM_SYMLINK_LIBS=OFF
+		-DBUILD_WITH_SPARSE=$(usex sparse ON OFF)
+	)
+
+	CXX=hipcc cmake_src_configure
+}

diff --git a/sci-libs/hipSOLVER/metadata.xml b/sci-libs/hipSOLVER/metadata.xml
index dfd45574f216..9aa1438b519c 100644
--- a/sci-libs/hipSOLVER/metadata.xml
+++ b/sci-libs/hipSOLVER/metadata.xml
@@ -16,4 +16,7 @@
   <upstream>
     <remote-id type="github">ROCmSoftwarePlatform/hipSOLVER</remote-id>
   </upstream>
+  <use>
+    <flag name="sparse">Build hipSOLVER with sparse functionality (sci-libs/cholmod)</flag>
+  </use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/hipSOLVER/files/, sci-libs/hipSOLVER/
@ 2025-01-05 21:49 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-01-05 21:49 UTC (permalink / raw
  To: gentoo-commits

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>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-05 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-05 21:49 [gentoo-commits] repo/gentoo:master commit in: sci-libs/hipSOLVER/files/, sci-libs/hipSOLVER/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-06-26  9:21 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox