public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Benda XU" <heroxbd@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocBLAS/
Date: Thu, 22 Sep 2022 01:08:51 +0000 (UTC)	[thread overview]
Message-ID: <1663808796.2046001a098a8879a61e70f289c992ec12f70777.heroxbd@gentoo> (raw)

commit:     2046001a098a8879a61e70f289c992ec12f70777
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sun Jun 26 07:10:39 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 01:06:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2046001a

sci-libs/rocBLAS: add 5.1.3, using rocm.eclass

No need to rebuilt rocBLAS when hip upgrade because librocblas is
dynamically linked to libhipamd, while llvm SLOT does not matter because
it is only used to produce GPU kernels, libclang and libLLVM does not
linked in.

Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 sci-libs/rocBLAS/Manifest             |   1 +
 sci-libs/rocBLAS/rocBLAS-5.1.3.ebuild | 114 ++++++++++++++++++++++++++++++++++
 2 files changed, 115 insertions(+)

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
+}


             reply	other threads:[~2022-09-22  1:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  1:08 Benda XU [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-09 18:20 [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocBLAS/ Sam James
2024-03-08 19:22 Sam James
2024-03-08 19:22 Sam James
2024-03-08 19:22 Sam James
2023-11-27 14:35 Benda XU
2023-07-30  7:49 Benda XU
2023-03-30 22:41 Marek Szuba
2023-02-24 16:50 Marek Szuba
2023-02-07 20:13 Marek Szuba
2023-01-31 14:30 Benda XU
2022-10-15 15:01 Sam James
2022-08-06 14:23 Benda XU
2022-03-05 20:51 Andrew Ammerlaan
2022-03-05 20:51 Andrew Ammerlaan
2022-03-05 20:51 Andrew Ammerlaan
2021-12-26  0:20 Sam James
2021-09-11 13:34 Ulrich Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1663808796.2046001a098a8879a61e70f289c992ec12f70777.heroxbd@gentoo \
    --to=heroxbd@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox