summaryrefslogtreecommitdiff
path: root/sci-libs/rocSOLVER
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
commitfcc5224904648a8e6eb528d7603154160a20022f (patch)
tree3bfce096b38a9cea8eed13fc70c1526c456e9abd /sci-libs/rocSOLVER
parent2fd57282f0262ca084e05b0f2c63fbada395d02b (diff)
gentoo resync : 02.02.2022
Diffstat (limited to 'sci-libs/rocSOLVER')
-rw-r--r--sci-libs/rocSOLVER/Manifest5
-rw-r--r--sci-libs/rocSOLVER/files/rocSOLVER-4.2.0-add-stdint-header.patch12
-rw-r--r--sci-libs/rocSOLVER/files/rocSOLVER-4.3.0-link-blas.patch21
-rw-r--r--sci-libs/rocSOLVER/metadata.xml19
-rw-r--r--sci-libs/rocSOLVER/rocSOLVER-4.3.0.ebuild75
5 files changed, 132 insertions, 0 deletions
diff --git a/sci-libs/rocSOLVER/Manifest b/sci-libs/rocSOLVER/Manifest
new file mode 100644
index 000000000000..d73f88e8e7ad
--- /dev/null
+++ b/sci-libs/rocSOLVER/Manifest
@@ -0,0 +1,5 @@
+AUX rocSOLVER-4.2.0-add-stdint-header.patch 475 BLAKE2B 268a1813d4e26dbaaa2360d0a187ce2a1448da075ae5f98a4a829c979411ab7e0c06f150ddcb445c9b295268a1e9f1770adbe7e68a1c3f84edde3c3477a57610 SHA512 ede56f9579e655ddd098ca9006612537f8ed61dc585274afe6b2b0bdee875431b62e0c6da6bc01e2cabeeb5244a91bb1e00b442bb549c075a286eefd8d9edc09
+AUX rocSOLVER-4.3.0-link-blas.patch 604 BLAKE2B 863c1807d281e219b429a58c9e9e582a346e72be6004fb3f5a818479ae02b4efd896873f7c689084eefc50c331d8734c5dbf2dcb9e9756a54ce092e5ace22da5 SHA512 413692c2a7e40cb3bb169eef078fc4caa0ebaba760f535fb27afafcc49713fae26c9ca5c82793c54d4e07ccafe43a0d7d65b7e76d0207bdd20a5581bd71216d9
+DIST rocSOLVER-4.3.0.tar.gz 454249 BLAKE2B 727ae416d85c5a19983257d2a0b01836013c1d69cddf3334b2c1b808b96b401db938b46b7ecf1e7faf26ff555374d1d3abed74abbe7be47110a36b44019469ee SHA512 2910e1cfad4d17a2877e2ae572d80179b84903c632652571c01bd12856c92c22e073ea1005ed9aac04244b4c502a7e0c18d96445e57658ae8eb5b320bada549b
+EBUILD rocSOLVER-4.3.0.ebuild 1932 BLAKE2B fd43a3ab1cfb130e3c0374c84a73bf3ebfa5cc15a9c71e7bc9bdd4d1d8bc637e73441a33d14a9116177c44750a92e4edb9242434194cc7a4532cd05d498f8891 SHA512 11aa4a4584cf1eb16951b8b2ffb645db7f12bf0bced58a0ce80543fb094a7a5e0feb2c486125f6b9e835e50c5318802c9cde3e2e3ee84a8ee60ead315543f181
+MISC metadata.xml 662 BLAKE2B 6dc116ac630fbd30c5f6c18d716bcd12bc994bfa0b2aea4eacf65e31507c24bb1eeed55942ee8e0b5bed8e361d28950d433c13136771673308dbf96906e270c9 SHA512 cc5cc6401303169dd423234615b748b38a58191b058befe0f40e8b8996fe50b3554b99a14f2f63c3596227aab43558f23c64ddce88172157366cc78d4aeefb56
diff --git a/sci-libs/rocSOLVER/files/rocSOLVER-4.2.0-add-stdint-header.patch b/sci-libs/rocSOLVER/files/rocSOLVER-4.2.0-add-stdint-header.patch
new file mode 100644
index 000000000000..4afff8f467ea
--- /dev/null
+++ b/sci-libs/rocSOLVER/files/rocSOLVER-4.2.0-add-stdint-header.patch
@@ -0,0 +1,12 @@
+fix compilation error rocsolver-extra-types.h:11:9: error: unknown type name 'uint32_t'
+--- a/library/include/rocsolver-extra-types.h
++++ b/library/include/rocsolver-extra-types.h
+@@ -5,6 +5,8 @@
+ #ifndef ROCSOLVER_EXTRAS_H_
+ #define ROCSOLVER_EXTRAS_H_
+
++#include "stdint.h"
++
+ /*! \brief Used to specify the logging layer mode using a bitwise combination
+ *of rocblas_layer_mode values.
+ ********************************************************************************/
diff --git a/sci-libs/rocSOLVER/files/rocSOLVER-4.3.0-link-blas.patch b/sci-libs/rocSOLVER/files/rocSOLVER-4.3.0-link-blas.patch
new file mode 100644
index 000000000000..407582831142
--- /dev/null
+++ b/sci-libs/rocSOLVER/files/rocSOLVER-4.3.0-link-blas.patch
@@ -0,0 +1,21 @@
+Should link blas otherwise ld return error adding symbols: DSO missing from command line
+--- orig/clients/benchmarks/CMakeLists.txt
++++ rocSOLVER-rocm-4.3.0/clients/benchmarks/CMakeLists.txt
+@@ -17,6 +17,7 @@ target_include_directories( rocsolver-be
+ )
+
+ target_link_libraries( rocsolver-bench PRIVATE
++ blas
+ cblas
+ lapack
+ Threads::Threads
+--- orig/clients/gtest/CMakeLists.txt
++++ rocSOLVER-rocm-4.3.0/clients/gtest/CMakeLists.txt
+@@ -87,6 +87,7 @@ target_include_directories( rocsolver-te
+ )
+
+ target_link_libraries( rocsolver-test PRIVATE
++ blas
+ cblas
+ lapack
+ GTest::GTest
diff --git a/sci-libs/rocSOLVER/metadata.xml b/sci-libs/rocSOLVER/metadata.xml
new file mode 100644
index 000000000000..344dd1337031
--- /dev/null
+++ b/sci-libs/rocSOLVER/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>gentoo@holzke.net</email>
+ <name>Wilfried Holzke</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>xgreenlandforwyy@gmail.com</email>
+ <name>Yiyang Wu</name>
+ </maintainer>
+ <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>
+ </use>
+</pkgmetadata>
diff --git a/sci-libs/rocSOLVER/rocSOLVER-4.3.0.ebuild b/sci-libs/rocSOLVER/rocSOLVER-4.3.0.ebuild
new file mode 100644
index 000000000000..c017b7ad31a0
--- /dev/null
+++ b/sci-libs/rocSOLVER/rocSOLVER-4.3.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Implementation of a subset of LAPACK functionality on the ROCm platform"
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocSOLVER"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rocSOLVER/archive/rocm-${PV}.tar.gz -> rocSOLVER-${PV}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64"
+SLOT="0/$(ver_cut 1-2)"
+
+IUSE="test benchmark"
+
+RDEPEND="dev-util/hip:${SLOT}
+ sci-libs/rocBLAS:${SLOT}
+ benchmark? ( virtual/blas )"
+DEPEND="${RDEPEND}"
+BDEPEND="test? ( dev-cpp/gtest
+ virtual/blas )"
+
+PATCHES=(
+ "${FILESDIR}/rocSOLVER-4.2.0-add-stdint-header.patch"
+ "${FILESDIR}/rocSOLVER-4.3.0-link-blas.patch"
+)
+
+RESTRICT="!test? ( test )"
+
+S=${WORKDIR}/${PN}-rocm-${PV}
+
+src_prepare() {
+ sed -e "s: PREFIX rocsolver:# PREFIX rocsolver:" -i library/src/CMakeLists.txt
+ sed -e "s:\$<INSTALL_INTERFACE\:include>:\$<INSTALL_INTERFACE\:include/rocsolver>:" -i library/src/CMakeLists.txt
+ sed -e "s:rocm_install_symlink_subdir( rocsolver ):#rocm_install_symlink_subdir( rocsolver ):" -i library/src/CMakeLists.txt
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Grant access to the device
+ addwrite /dev/kfd
+ addpredict /dev/dri/
+
+ local mycmakeargs=(
+ -Wno-dev
+ -DCMAKE_SKIP_RPATH=ON
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/"
+ -DCMAKE_INSTALL_INCLUDEDIR="${EPREFIX}/usr/include/rocsolver"
+ -DBUILD_CLIENTS_SAMPLES=NO
+ -DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
+ -DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF)
+ ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"}
+ )
+
+ CXX="hipcc" cmake_src_configure
+}
+
+src_test() {
+ addwrite /dev/kfd
+ addwrite /dev/dri/
+ cd "${BUILD_DIR}/clients/staging" || die
+ LD_LIBRARY_PATH="${BUILD_DIR}/library/src" ./rocsolver-test || die
+}
+
+src_install() {
+ cmake_src_install
+
+ if use benchmark; then
+ cd "${BUILD_DIR}" || die
+ dobin clients/staging/rocsolver-bench
+ fi
+}