aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild')
-rw-r--r--sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild b/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild
new file mode 100644
index 000000000..ba8f4c0e6
--- /dev/null
+++ b/sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="AMD's library for BLAS on ROCm."
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-${PN}-${PV}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="~amd64"
+SLOT="0"
+
+RDEPEND="=dev-util/hip-$(ver_cut 1-2)*"
+DEPEND="${RDEPEND}
+ dev-perl/File-Which
+ dev-libs/msgpack
+ dev-util/cmake
+ dev-util/rocm-cmake
+ >=dev-util/Tensile-4.0.0-r1
+ "
+
+# stripped library is not working
+RESTRICT="strip"
+
+S="${WORKDIR}"/${PN}-rocm-${PV}
+
+rocBLAS_V="0.1"
+
+PATCHES=( "${FILESDIR}"/${PN}-4.0.0-use-system-tensile.patch )
+
+src_prepare() {
+ eapply_user
+
+ sed -e "/PREFIX rocblas/d" \
+ -e "/<INSTALL_INTERFACE/s:include:include/rocblas:" \
+ -e "s:rocblas/include:include/rocblas:" \
+ -e "s:\\\\\${CPACK_PACKAGING_INSTALL_PREFIX}rocblas/lib:${EPREFIX}/usr/$(get_libdir)/rocblas:" \
+ -e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # allow acces to hardware
+ addwrite /dev/kfd
+ addwrite /dev/dri/
+ addwrite /dev/random
+
+ export PATH="${EPREFIX}/usr/lib/llvm/roc/bin:${PATH}"
+
+ local mycmakeargs=(
+ -DTensile_LOGIC="asm_full"
+ -DTensile_COMPILER="hipcc"
+ -DTensile_ARCHITECTURE="all"
+ -DTensile_LIBRARY_FORMAT="msgpack"
+ -DTensile_CODE_OBJECT_VERSION="V3"
+ -DTensile_TEST_LOCAL_PATH="${WORKDIR}/Tensile-rocm-${PV}"
+ -DBUILD_WITH_TENSILE=ON
+ -DBUILD_WITH_TENSILE_HOST=ON
+ -DCMAKE_CXX_FLAGS="--rocm-path=${EPREFIX}/usr"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DCMAKE_INSTALL_INCLUDEDIR="include/rocblas"
+ -DBUILD_TESTING=OFF
+ -DBUILD_CLIENTS_SAMPLES=OFF
+ -DBUILD_CLIENTS_TESTS=OFF
+ -DBUILD_CLIENTS_BENCHMARKS=OFF
+ )
+
+ CXX="hipcc" cmake_src_configure
+
+ # do not rerun cmake and the build process in src_install
+ sed -e '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die
+}