summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2021-01-21 20:43:31 +0800
committerBenda Xu <heroxbd@gentoo.org>2021-01-24 15:45:43 +0800
commit0a666c2a83b012e5a414a1593cbf10c9199a904e (patch)
tree18c1ca1fc53ff0210533c5a0dbdeafa48eb252a8
parentsci-libs/hipCUB: wrapper library of rocPRIM or CUB. (diff)
downloadgentoo-0a666c2a83b012e5a414a1593cbf10c9199a904e.tar.gz
gentoo-0a666c2a83b012e5a414a1593cbf10c9199a904e.tar.bz2
gentoo-0a666c2a83b012e5a414a1593cbf10c9199a904e.zip
sci-libs/rocSPARSE: BLAS for sparse computation.
Bug: https://bugs.gentoo.org/650804 Bug: https://github.com/gentoo/gentoo/pull/10724 Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Suggested-by: Wilfried Holzke <gentoo@holzke.net> Package-Manager: Portage-3.0.12, Repoman-3.0.1 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
-rw-r--r--sci-libs/rocSPARSE/Manifest1
-rw-r--r--sci-libs/rocSPARSE/metadata.xml19
-rw-r--r--sci-libs/rocSPARSE/rocSPARSE-4.0.0-r1.ebuild51
3 files changed, 71 insertions, 0 deletions
diff --git a/sci-libs/rocSPARSE/Manifest b/sci-libs/rocSPARSE/Manifest
new file mode 100644
index 000000000000..a9b843595f7e
--- /dev/null
+++ b/sci-libs/rocSPARSE/Manifest
@@ -0,0 +1 @@
+DIST rocSPARSE-4.0.0.tar.gz 587761 BLAKE2B 25f9f0183c06b574505fe6e9011b32ea4fbe48c0a1883b8991baf45b8a2238312f352e614c0069531c986e548453b6e7b7a77f883dffea82ed41df488964b55d SHA512 4a4acf24a789ea58b53a8d06ea528a6aed8eabac21a7a3cd73011e9b31d03dceb488cc72f29c5513205f2b538d24e9dbaccda1a932bcc466cd04a65606a77b3b
diff --git a/sci-libs/rocSPARSE/metadata.xml b/sci-libs/rocSPARSE/metadata.xml
new file mode 100644
index 000000000000..73cc3d7be191
--- /dev/null
+++ b/sci-libs/rocSPARSE/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>gentoo@holzke.net</email>
+ <name>Wilfried Holzke</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ROCmSoftwarePlatform/rocSPARSE</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-libs/rocSPARSE/rocSPARSE-4.0.0-r1.ebuild b/sci-libs/rocSPARSE/rocSPARSE-4.0.0-r1.ebuild
new file mode 100644
index 000000000000..14e2518eb4a7
--- /dev/null
+++ b/sci-libs/rocSPARSE/rocSPARSE-4.0.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Basic Linear Algebra Subroutines for sparse computation"
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocSPARSE"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rocSPARSE/archive/rocm-${PV}.tar.gz -> rocSPARSE-${PV}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="~amd64"
+SLOT="0"
+
+RDEPEND="=dev-util/hip-$(ver_cut 1-2)*
+ =sci-libs/rocPRIM-$(ver_cut 1-2)*"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/rocSPARSE-rocm-${PV}"
+
+rocSPARSE_V="0.1"
+
+BUILD_DIR="${S}/build/release"
+
+src_prepare() {
+ sed -e "s/PREFIX rocsparse//" \
+ -e "/<INSTALL_INTERFACE/s,include,include/rocsparse," \
+ -e "/rocm_install_symlink_subdir(rocsparse)/d" \
+ -e "s:rocsparse/include:include/rocsparse:" \
+ -i "${S}/library/CMakeLists.txt" || die
+
+ eapply_user
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Grant access to the device to omit a sandbox violation
+ addwrite /dev/kfd
+ addpredict /dev/dri/
+
+ # Compiler to use
+ export CXX=hipcc
+
+ local mycmakeargs=(
+ -DBUILD_CLIENTS_SAMPLES=OFF
+ -DCMAKE_INSTALL_INCLUDEDIR="include/rocsparse"
+ )
+
+ cmake_src_configure
+}