public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: sci-libs/magma/
@ 2022-05-25 12:17 Alessandro Barbieri
  0 siblings, 0 replies; 5+ messages in thread
From: Alessandro Barbieri @ 2022-05-25 12:17 UTC (permalink / raw
  To: gentoo-commits

commit:     887d4459a5c668b2a3639259e6262bf6639556ef
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed May 25 05:47:00 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed May 25 12:17:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=887d4459

sci-libs/magma: allow multiple gpu implementations

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sci-libs/magma/magma-2.6.2.ebuild | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/sci-libs/magma/magma-2.6.2.ebuild b/sci-libs/magma/magma-2.6.2.ebuild
index 95bcf8ca4..a8c48659f 100644
--- a/sci-libs/magma/magma-2.6.2.ebuild
+++ b/sci-libs/magma/magma-2.6.2.ebuild
@@ -30,6 +30,7 @@ IUSE_AMDGPU="
 "
 IUSE="doc openblas test ${IUSE_AMDGPU}"
 
+# TODO: do not enforce openblas
 RDEPEND="
 	openblas? ( sci-libs/openblas )
 	!openblas? (
@@ -47,7 +48,7 @@ BDEPEND="
 	doc? ( >=app-doc/doxygen-1.8.14-r1[dot] )
 "
 
-REQUIRED_USE="^^ ( ${IUSE_AMDGPU/+/} )"
+REQUIRED_USE="|| ( ${IUSE_AMDGPU/+/} )"
 RESTRICT="!test? ( test )"
 
 pkg_setup() {
@@ -83,12 +84,16 @@ src_configure() {
 	# other options: Intel10_64lp, Intel10_64lp_seq, Intel10_64ilp, Intel10_64ilp_seq, Intel10_32, FLAME, ACML, Apple, NAS
 	local blasvendor="Generic"
 	use openblas && blasvendor="OpenBLAS"
+
+	local gpu=""
 	for u in ${IUSE_AMDGPU} ; do
 		if use ${u} ; then
-			gpu="${u/amdgpu_/}"
-			break
+			gpu="${gpu},${u/amdgpu_/}"
 		fi
 	done
+	#remove first character (,)
+	gpu="${gpu:1}"
+
 	local mycmakeargs=(
 		-DBUILD_SHARED_LIBS=ON
 		-DCMAKE_CXX_COMPILER=hipcc


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

* [gentoo-commits] repo/proj/guru:dev commit in: sci-libs/magma/
@ 2022-05-25 12:32 Alessandro Barbieri
  0 siblings, 0 replies; 5+ messages in thread
From: Alessandro Barbieri @ 2022-05-25 12:32 UTC (permalink / raw
  To: gentoo-commits

commit:     8238a71a0001ca47cc67445f0d4547c6f528821b
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed May 25 12:31:18 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed May 25 12:31:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8238a71a

sci-libs/magma: add commented code for waebbl

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sci-libs/magma/magma-2.6.2-r1.ebuild | 138 +++++++++++++++++++++++++++++++++++
 1 file changed, 138 insertions(+)

diff --git a/sci-libs/magma/magma-2.6.2-r1.ebuild b/sci-libs/magma/magma-2.6.2-r1.ebuild
new file mode 100644
index 000000000..71bc4f6d7
--- /dev/null
+++ b/sci-libs/magma/magma-2.6.2-r1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_STANDARD="77 90"
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit cmake fortran-2 python-any-r1 toolchain-funcs
+
+MY_PV=$(ver_rs 3 '-')
+
+DESCRIPTION="Matrix Algebra on GPU and Multicore Architectures"
+HOMEPAGE="
+	https://icl.cs.utk.edu/magma/
+	https://bitbucket.org/icl/magma
+"
+SRC_URI="https://icl.cs.utk.edu/projectsfiles/${PN}/downloads/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE_AMDGPU="
+	amdgpu_gfx600 amdgpu_gfx601 amdgpu_gfx602
+	amdgpu_gfx700 amdgpu_gfx701 amdgpu_gfx702 amdgpu_gfx703 amdgpu_gfx704 amdgpu_gfx705
+	amdgpu_gfx801 amdgpu_gfx802 amdgpu_gfx803 amdgpu_gfx805 amdgpu_gfx810
+	amdgpu_gfx900 amdgpu_gfx902 amdgpu_gfx904 amdgpu_gfx906 amdgpu_gfx908 amdgpu_gfx909 amdgpu_gfx90a amdgpu_gfx90c amdgpu_gfx940
+	amdgpu_gfx1010 amdgpu_gfx1011 amdgpu_gfx1012 amdgpu_gfx1013 amdgpu_gfx1030 amdgpu_gfx1031 amdgpu_gfx1032 amdgpu_gfx1033 amdgpu_gfx1034 amdgpu_gfx1035 amdgpu_gfx1036
+	amdgpu_gfx1100 amdgpu_gfx1101 amdgpu_gfx1102 amdgpu_gfx1103
+"
+IUSE="doc openblas test ${IUSE_AMDGPU}"
+#IUSE="doc cuda hip openblas test ${IUSE_AMDGPU}"
+
+# TODO: do not enforce openblas
+RDEPEND="
+	openblas? ( sci-libs/openblas )
+	!openblas? (
+		virtual/blas
+		virtual/lapack
+	)
+"
+DEPEND="
+	${RDEPEND}
+	${PYTHON_DEPS}
+	dev-util/hip
+"
+#	hip? ( dev-util/hip )
+BDEPEND="
+	virtual/pkgconfig
+	doc? ( >=app-doc/doxygen-1.8.14-r1[dot] )
+"
+
+REQUIRED_USE="
+	|| ( ${IUSE_AMDGPU/+/} )
+"
+#	^^ ( cuda hip )
+RESTRICT="!test? ( test )"
+
+pkg_setup() {
+	fortran-2_pkg_setup
+	python-any-r1_pkg_setup
+	tc-check-openmp || die "Need OpenMP to compile ${P}"
+}
+
+src_prepare() {
+	rm -r blas_fix || die
+	# distributed pc file not so useful so replace it
+	cat <<-EOF > ${PN}.pc
+		prefix=${EPREFIX}/usr
+		libdir=\${prefix}/$(get_libdir)
+		includedir=\${prefix}/include/${PN}
+		Name: ${PN}
+		Description: ${DESCRIPTION}
+		Version: ${PV}
+		URL: ${HOMEPAGE}
+		Libs: -L\${libdir} -lmagma
+		Libs.private: -lm -lpthread -ldl
+		Cflags: -I\${includedir}
+		Requires: $(usex openblas "openblas" "blas lapack")
+	EOF
+
+	#use cuda && echo -e 'BACKEND = cuda' > make.inc
+	#use hip && echo -e 'BACKEND = hip' > make.inc
+	echo -e 'BACKEND = hip' > make.inc
+	echo -e 'FORT = true' >> make.inc
+	emake generate
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# other options: Intel10_64lp, Intel10_64lp_seq, Intel10_64ilp, Intel10_64ilp_seq, Intel10_32, FLAME, ACML, Apple, NAS
+	local blasvendor="Generic"
+	use openblas && blasvendor="OpenBLAS"
+
+	local gpu=""
+	#if use hip ; then
+		for u in ${IUSE_AMDGPU} ; do
+			if use ${u} ; then
+				gpu="${gpu},${u/amdgpu_/}"
+			fi
+		done
+	#fi
+	# remove first character (,)
+	gpu="${gpu:1}"
+
+	local mycmakeargs=(
+		-DBUILD_SHARED_LIBS=ON
+		-DCMAKE_CXX_COMPILER=hipcc
+		-DMAGMA_ENABLE_CUDA=OFF
+		-DMAGMA_ENABLE_HIP=ON
+		-DUSE_FORTRAN=ON
+
+		-DBLA_VENDOR=${blasvendor}
+		-DGPU_TARGET=${gpu}
+	)
+	#	-DMAGMA_ENABLE_CUDA=$(usex cuda)
+	#	-DMAGMA_ENABLE_HIP=$(usex hip)
+
+	#use fortran || mycmakeargs+=( "-DFORTRAN_CONVENTION=-DADD_"
+	#use hip && mycmakeargs+=( "-DCMAKE_CXX_COMPILER=hipcc" )
+	cmake_src_configure
+}
+
+src_compile() {
+	cmake_src_compile
+}
+
+src_install() {
+	cmake_src_install
+	insinto "/usr/include/${PN}"
+	doins include/*.h
+	insinto "/usr/$(get_libdir)/pkgconfig"
+	doins "${PN}.pc"
+	local DOCS=( README ReleaseNotes )
+	use doc && local HTML_DOCS=( docs/html/. )
+	einstalldocs
+}


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

* [gentoo-commits] repo/proj/guru:dev commit in: sci-libs/magma/
@ 2022-05-25 19:21 Alessandro Barbieri
  0 siblings, 0 replies; 5+ messages in thread
From: Alessandro Barbieri @ 2022-05-25 19:21 UTC (permalink / raw
  To: gentoo-commits

commit:     de02a30d537b4165256b5d8185ecd03eed266086
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed May 25 19:20:11 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed May 25 19:21:46 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=de02a30d

sci-libs/magma: cleanup AMDGPU

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sci-libs/magma/magma-2.6.2-r1.ebuild | 11 +++++------
 sci-libs/magma/magma-2.6.2.ebuild    | 11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/sci-libs/magma/magma-2.6.2-r1.ebuild b/sci-libs/magma/magma-2.6.2-r1.ebuild
index 71bc4f6d7..431d3ad52 100644
--- a/sci-libs/magma/magma-2.6.2-r1.ebuild
+++ b/sci-libs/magma/magma-2.6.2-r1.ebuild
@@ -21,12 +21,11 @@ LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64"
 IUSE_AMDGPU="
-	amdgpu_gfx600 amdgpu_gfx601 amdgpu_gfx602
-	amdgpu_gfx700 amdgpu_gfx701 amdgpu_gfx702 amdgpu_gfx703 amdgpu_gfx704 amdgpu_gfx705
-	amdgpu_gfx801 amdgpu_gfx802 amdgpu_gfx803 amdgpu_gfx805 amdgpu_gfx810
-	amdgpu_gfx900 amdgpu_gfx902 amdgpu_gfx904 amdgpu_gfx906 amdgpu_gfx908 amdgpu_gfx909 amdgpu_gfx90a amdgpu_gfx90c amdgpu_gfx940
-	amdgpu_gfx1010 amdgpu_gfx1011 amdgpu_gfx1012 amdgpu_gfx1013 amdgpu_gfx1030 amdgpu_gfx1031 amdgpu_gfx1032 amdgpu_gfx1033 amdgpu_gfx1034 amdgpu_gfx1035 amdgpu_gfx1036
-	amdgpu_gfx1100 amdgpu_gfx1101 amdgpu_gfx1102 amdgpu_gfx1103
+	amdgpu_gfx701 amdgpu_gfx702 amdgpu_gfx704
+	amdgpu_gfx802 amdgpu_gfx803 amdgpu_gfx805 amdgpu_gfx810
+	amdgpu_gfx900 amdgpu_gfx904 amdgpu_gfx906 amdgpu_gfx908 amdgpu_gfx909 amdgpu_gfx90a amdgpu_gfx940
+	amdgpu_gfx1010 amdgpu_gfx1011 amdgpu_gfx1012 amdgpu_gfx1030 amdgpu_gfx1031 amdgpu_gfx1032 amdgpu_gfx1034
+	amdgpu_gfx1100 amdgpu_gfx1101 amdgpu_gfx1102
 "
 IUSE="doc openblas test ${IUSE_AMDGPU}"
 #IUSE="doc cuda hip openblas test ${IUSE_AMDGPU}"

diff --git a/sci-libs/magma/magma-2.6.2.ebuild b/sci-libs/magma/magma-2.6.2.ebuild
index a8c48659f..374515069 100644
--- a/sci-libs/magma/magma-2.6.2.ebuild
+++ b/sci-libs/magma/magma-2.6.2.ebuild
@@ -21,12 +21,11 @@ LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64"
 IUSE_AMDGPU="
-	amdgpu_gfx600 amdgpu_gfx601 amdgpu_gfx602
-	amdgpu_gfx700 amdgpu_gfx701 amdgpu_gfx702 amdgpu_gfx703 amdgpu_gfx704 amdgpu_gfx705
-	amdgpu_gfx801 amdgpu_gfx802 amdgpu_gfx803 amdgpu_gfx805 amdgpu_gfx810
-	amdgpu_gfx900 amdgpu_gfx902 amdgpu_gfx904 amdgpu_gfx906 amdgpu_gfx908 amdgpu_gfx909 amdgpu_gfx90a amdgpu_gfx90c amdgpu_gfx940
-	amdgpu_gfx1010 amdgpu_gfx1011 amdgpu_gfx1012 amdgpu_gfx1013 amdgpu_gfx1030 amdgpu_gfx1031 amdgpu_gfx1032 amdgpu_gfx1033 amdgpu_gfx1034 amdgpu_gfx1035 amdgpu_gfx1036
-	amdgpu_gfx1100 amdgpu_gfx1101 amdgpu_gfx1102 amdgpu_gfx1103
+	amdgpu_gfx701 amdgpu_gfx702 amdgpu_gfx704
+	amdgpu_gfx802 amdgpu_gfx803 amdgpu_gfx805 amdgpu_gfx810
+	amdgpu_gfx900 amdgpu_gfx904 amdgpu_gfx906 amdgpu_gfx908 amdgpu_gfx909 amdgpu_gfx90a amdgpu_gfx940
+	amdgpu_gfx1010 amdgpu_gfx1011 amdgpu_gfx1012 amdgpu_gfx1030 amdgpu_gfx1031 amdgpu_gfx1032 amdgpu_gfx1034
+	amdgpu_gfx1100 amdgpu_gfx1101 amdgpu_gfx1102
 "
 IUSE="doc openblas test ${IUSE_AMDGPU}"
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: sci-libs/magma/
@ 2022-05-26 21:20 Alessandro Barbieri
  0 siblings, 0 replies; 5+ messages in thread
From: Alessandro Barbieri @ 2022-05-26 21:20 UTC (permalink / raw
  To: gentoo-commits

commit:     c3c79a8cf0face5a5267b783e280f11df5b77c33
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu May 26 15:33:16 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu May 26 21:20:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c3c79a8c

sci-libs/magma: use ; as separator

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sci-libs/magma/magma-2.6.2-r1.ebuild | 4 ++--
 sci-libs/magma/magma-2.6.2.ebuild    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sci-libs/magma/magma-2.6.2-r1.ebuild b/sci-libs/magma/magma-2.6.2-r1.ebuild
index 431d3ad52..05b6ad90f 100644
--- a/sci-libs/magma/magma-2.6.2-r1.ebuild
+++ b/sci-libs/magma/magma-2.6.2-r1.ebuild
@@ -96,11 +96,11 @@ src_configure() {
 	#if use hip ; then
 		for u in ${IUSE_AMDGPU} ; do
 			if use ${u} ; then
-				gpu="${gpu},${u/amdgpu_/}"
+				gpu="${gpu};${u/amdgpu_/}"
 			fi
 		done
 	#fi
-	# remove first character (,)
+	# remove first character (;)
 	gpu="${gpu:1}"
 
 	local mycmakeargs=(

diff --git a/sci-libs/magma/magma-2.6.2.ebuild b/sci-libs/magma/magma-2.6.2.ebuild
index 374515069..edaa8a3f3 100644
--- a/sci-libs/magma/magma-2.6.2.ebuild
+++ b/sci-libs/magma/magma-2.6.2.ebuild
@@ -87,10 +87,10 @@ src_configure() {
 	local gpu=""
 	for u in ${IUSE_AMDGPU} ; do
 		if use ${u} ; then
-			gpu="${gpu},${u/amdgpu_/}"
+			gpu="${gpu};${u/amdgpu_/}"
 		fi
 	done
-	#remove first character (,)
+	#remove first character (;)
 	gpu="${gpu:1}"
 
 	local mycmakeargs=(


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

* [gentoo-commits] repo/proj/guru:dev commit in: sci-libs/magma/
@ 2022-05-30 17:51 Alessandro Barbieri
  0 siblings, 0 replies; 5+ messages in thread
From: Alessandro Barbieri @ 2022-05-30 17:51 UTC (permalink / raw
  To: gentoo-commits

commit:     98dabfd6d95a616f9d0fb0489679d0440bc54340
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon May 30 17:50:22 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Mon May 30 17:51:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=98dabfd6

sci-libs/magma: fixes

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sci-libs/magma/magma-2.6.2-r1.ebuild | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/sci-libs/magma/magma-2.6.2-r1.ebuild b/sci-libs/magma/magma-2.6.2-r1.ebuild
index 05b6ad90f..aa31ea80a 100644
--- a/sci-libs/magma/magma-2.6.2-r1.ebuild
+++ b/sci-libs/magma/magma-2.6.2-r1.ebuild
@@ -31,7 +31,9 @@ IUSE="doc openblas test ${IUSE_AMDGPU}"
 #IUSE="doc cuda hip openblas test ${IUSE_AMDGPU}"
 
 # TODO: do not enforce openblas
+#	hip? ( sci-libs/hipBLAS )
 RDEPEND="
+	sci-libs/hipBLAS
 	openblas? ( sci-libs/openblas )
 	!openblas? (
 		virtual/blas
@@ -62,7 +64,18 @@ pkg_setup() {
 }
 
 src_prepare() {
-	rm -r blas_fix || die
+	gpu=""
+	#if use hip ; then
+		for u in ${IUSE_AMDGPU} ; do
+			if use ${u} ; then
+				gpu="${gpu};${u/amdgpu_/}"
+			fi
+		done
+	#fi
+	# remove first character (;)
+	gpu="${gpu:1}"
+	export gpu
+
 	# distributed pc file not so useful so replace it
 	cat <<-EOF > ${PN}.pc
 		prefix=${EPREFIX}/usr
@@ -82,8 +95,11 @@ src_prepare() {
 	#use hip && echo -e 'BACKEND = hip' > make.inc
 	echo -e 'BACKEND = hip' > make.inc
 	echo -e 'FORT = true' >> make.inc
+	echo -e "GPU_TARGET = ${gpu}" >> make.inc
 	emake generate
 
+	rm -r blas_fix || die
+
 	cmake_src_prepare
 }
 
@@ -92,17 +108,6 @@ src_configure() {
 	local blasvendor="Generic"
 	use openblas && blasvendor="OpenBLAS"
 
-	local gpu=""
-	#if use hip ; then
-		for u in ${IUSE_AMDGPU} ; do
-			if use ${u} ; then
-				gpu="${gpu};${u/amdgpu_/}"
-			fi
-		done
-	#fi
-	# remove first character (;)
-	gpu="${gpu:1}"
-
 	local mycmakeargs=(
 		-DBUILD_SHARED_LIBS=ON
 		-DCMAKE_CXX_COMPILER=hipcc


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

end of thread, other threads:[~2022-05-30 17:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-30 17:51 [gentoo-commits] repo/proj/guru:dev commit in: sci-libs/magma/ Alessandro Barbieri
  -- strict thread matches above, loose matches on Subject: below --
2022-05-26 21:20 Alessandro Barbieri
2022-05-25 19:21 Alessandro Barbieri
2022-05-25 12:32 Alessandro Barbieri
2022-05-25 12:17 Alessandro Barbieri

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