diff options
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/rocBLAS/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/rocBLAS/rocBLAS-5.1.3.ebuild | 114 |
2 files changed, 115 insertions, 0 deletions
diff --git a/sci-libs/rocBLAS/Manifest b/sci-libs/rocBLAS/Manifest index e8bb583d38a1..ca44e7ca5686 100644 --- a/sci-libs/rocBLAS/Manifest +++ b/sci-libs/rocBLAS/Manifest @@ -2,3 +2,4 @@ DIST rocBLAS-5.0.2-Tensile-asm_full-navi22.tar.gz 1110323 BLAKE2B 80fab97c6f89fc DIST rocm-Tensile-4.3.0.tar.gz 14250149 BLAKE2B 030138eaca2a0aadd96801e6dbd72e510716dd90553ef3795c5e04e00a34a05ecae82b24f755e4033a4acfcdb1cf26291da1e7902bb090f89a010d403e832beb SHA512 126db0b413c716fba8d5be9bff7a44fd1badacbf32f3db8d0db649819177db37ebd56fd22dd3c809655f5d29675be115e698cd10bc3d0b4b23878ae3726fce47 DIST rocm-rocBLAS-4.3.0.tar.gz 11569970 BLAKE2B f11b0acf2bbd5737b036142d3b2cc1e18c38e088a8b7db58156d478dd6718befbb82bb7fd43a38fe64a5427124c5ad5241fa37977f094e6efd195d168d3e5f65 SHA512 490ab1c1e98a8b311ad5630515c448d9bb0a2bf588a08bcbebee345e2954d616b4ffe7c2e03dadca82c590438c42afccb98fe8ba00856aece101b5ffe62ef1e0 DIST rocm-rocBLAS-5.0.2.tar.gz 13295178 BLAKE2B e1abfa06b9ac1545732465857839dae3f3708af49439a306a2b5b1b1b392101c38c95815f2c05a0d9ed29d41b154bc2e16a4f9203a37f5e2f68ee12cc4b44a06 SHA512 2f4a74f49350ede0debcf32229a6b6b95505615723c3f2bee16e4c169a3bb966dfb1971819028f47c525f571bea5662b892e63f655b0d1d2b8f20746bc5fe770 +DIST rocm-rocBLAS-5.1.3.tar.gz 13741546 BLAKE2B af10d8cb69bee44ef5aab2dc350e1d9f3b6fddb3a840c17230c4b55b2649a4724c9f2e58c1eafdb3e2716eea016a72a35c3ddb498881b1ce682d780baa8d8b07 SHA512 5ab71838fdd0e9c5848cbf28a19d113353b619a878d8c7d05f64feb32faae2054169c95ed6e9dd6b05a2e807b57229dd2c361c4d289b6e6f17c196558640890f diff --git a/sci-libs/rocBLAS/rocBLAS-5.1.3.ebuild b/sci-libs/rocBLAS/rocBLAS-5.1.3.ebuild new file mode 100644 index 000000000000..d9316725fe8c --- /dev/null +++ b/sci-libs/rocBLAS/rocBLAS-5.1.3.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DOCS_BUILDER="doxygen" +DOCS_DIR="docs" +DOCS_DEPEND="media-gfx/graphviz" +ROCM_VERSION=${PV} +inherit cmake docs edo multiprocessing prefix rocm + +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-${P}.tar.gz + https://media.githubusercontent.com/media/littlewu2508/littlewu2508.github.io/main/gentoo-distfiles/${PN}-5.0.2-Tensile-asm_full-navi22.tar.gz" +S="${WORKDIR}/${PN}-rocm-${PV}" + +LICENSE="BSD" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" +IUSE="benchmark test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +BDEPEND=" + dev-util/rocm-cmake:${SLOT} + dev-util/Tensile:${SLOT} +" + +DEPEND=" + dev-util/hip + dev-libs/msgpack + test? ( + virtual/blas + dev-cpp/gtest + sys-libs/libomp + ) + benchmark? ( + virtual/blas + sys-libs/libomp + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.3.0-fix-glibc-2.32-and-above.patch + "${FILESDIR}"/${PN}-5.0.2-change-default-Tensile-library-dir.patch + "${FILESDIR}"/${PN}-5.0.2-cpp_lib_filesystem.patch + "${FILESDIR}"/${PN}-5.0.2-unbundle-Tensile.patch + ) + +src_prepare() { + cmake_src_prepare + cp -a "${WORKDIR}/asm_full/" library/src/blas3/Tensile/Logic/ || die + # Fit for Gentoo FHS rule + 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 "s:share/doc/rocBLAS:share/doc/${P}:" \ + -e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die + + sed -e "s:,-rpath=.*\":\":" -i clients/CMakeLists.txt || die + + eprefixify library/src/tensile_host.cpp +} + +src_configure() { + addpredict /dev/random + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=On + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DTensile_LOGIC="asm_full" + -DTensile_COMPILER="hipcc" + -DTensile_LIBRARY_FORMAT="msgpack" + -DTensile_CODE_OBJECT_VERSION="V3" + -DTensile_TEST_LOCAL_PATH="${EPREFIX}/usr/share/Tensile" + -DTensile_ROOT="${EPREFIX}/usr/share/Tensile" + -DBUILD_WITH_TENSILE=ON + -DCMAKE_INSTALL_INCLUDEDIR="include/rocblas" + -DBUILD_TESTING=OFF + -DBUILD_CLIENTS_SAMPLES=OFF + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + -DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF) + -DTensile_CPU_THREADS=$(makeopts_jobs) + ) + + CXX=hipcc cmake_src_configure +} + +src_compile() { + docs_compile + cmake_src_compile +} + +src_test() { + check_amdgpu + cd "${BUILD_DIR}"/clients/staging || die + export ROCBLAS_TEST_TIMEOUT=3600 ROCBLAS_TENSILE_LIBPATH="${BUILD_DIR}/Tensile/library" + export LD_LIBRARY_PATH="${BUILD_DIR}/clients:${BUILD_DIR}/library/src" + edob ./${PN,,}-test +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}" || die + dolib.so clients/librocblas_fortran_client.so + dobin clients/staging/rocblas-bench + fi +} |