public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/Tensile/, sci-libs/rocBLAS/
Date: Wed, 26 Jun 2024 09:21:26 +0000 (UTC)	[thread overview]
Message-ID: <1719393567.e7c753b648efded4b65fa85f70bdefb47aebbc35.sam@gentoo> (raw)

commit:     e7c753b648efded4b65fa85f70bdefb47aebbc35
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Tue Jun 25 20:42:19 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 26 09:19:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7c753b6

sci-libs/rocBLAS: 6.1.1 make Tensile dependency optional

Building with Tensile requires actual hardware present, to avoid breaking CI
make this optional.

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/Tensile/Tensile-6.1.1.ebuild |  1 +
 sci-libs/rocBLAS/rocBLAS-6.1.1.ebuild | 34 ++++++++++++++++++++--------------
 2 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/dev-util/Tensile/Tensile-6.1.1.ebuild b/dev-util/Tensile/Tensile-6.1.1.ebuild
index fcb77f77972d..c8debc3456c3 100644
--- a/dev-util/Tensile/Tensile-6.1.1.ebuild
+++ b/dev-util/Tensile/Tensile-6.1.1.ebuild
@@ -28,6 +28,7 @@ RDEPEND="${PYTHON_DEPS}
 	>=dev-cpp/msgpack-cxx-6.0.0
 	dev-python/pyyaml[${PYTHON_USEDEP}]
 	dev-python/msgpack[${PYTHON_USEDEP}]
+	dev-python/joblib[${PYTHON_USEDEP}]
 	=dev-util/hip-6*
 	>=dev-util/rocm-smi-4.3.0
 	$(llvm_gen_dep '

diff --git a/sci-libs/rocBLAS/rocBLAS-6.1.1.ebuild b/sci-libs/rocBLAS/rocBLAS-6.1.1.ebuild
index fed17e82b14e..26bfc2ada24d 100644
--- a/sci-libs/rocBLAS/rocBLAS-6.1.1.ebuild
+++ b/sci-libs/rocBLAS/rocBLAS-6.1.1.ebuild
@@ -17,14 +17,15 @@ S="${WORKDIR}/${PN}-rocm-${PV}"
 LICENSE="BSD"
 SLOT="0/$(ver_cut 1-2)"
 KEYWORDS="~amd64"
-IUSE="benchmark test"
+IUSE="benchmark test video_cards_amdgpu"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="${ROCM_REQUIRED_USE}"
 
 BDEPEND="
 	>=dev-build/rocm-cmake-5.3
-	dev-util/Tensile:${SLOT}
-	dev-python/joblib
+	video_cards_amdgpu? (
+		dev-util/Tensile:${SLOT}
+	)
 	test? ( dev-cpp/gtest )
 "
 
@@ -66,20 +67,25 @@ src_configure() {
 		-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
 		-DROCM_SYMLINK_LIBS=OFF
 		-DAMDGPU_TARGETS="$(get_amdgpu_flags)"
-		-DTensile_LOGIC="asm_full"
-		-DTensile_COMPILER="hipcc"
-		-DTensile_LIBRARY_FORMAT="msgpack"
-		-DTensile_CODE_OBJECT_VERSION="default"
-		-DTensile_ROOT="${EPREFIX}/usr/share/Tensile"
-		-DBUILD_WITH_TENSILE=ON
+		-DBUILD_WITH_TENSILE="$(usex video_cards_amdgpu)"
 		-DCMAKE_INSTALL_INCLUDEDIR="include/rocblas"
 		-DBUILD_CLIENTS_SAMPLES=OFF
-		-DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
-		-DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF)
-		-DTensile_CPU_THREADS=$(makeopts_jobs)
+		-DBUILD_CLIENTS_TESTS="$(usex test)"
+		-DBUILD_CLIENTS_BENCHMARKS="$(usex benchmark)"
 		-DBUILD_WITH_PIP=OFF
 	)
 
+	if usex video_cards_amdgpu; then
+		mycmakeargs+=(
+			-DTensile_LOGIC="asm_full"
+			-DTensile_COMPILER="hipcc"
+			-DTensile_LIBRARY_FORMAT="msgpack"
+			-DTensile_CODE_OBJECT_VERSION="default"
+			-DTensile_ROOT="${EPREFIX}/usr/share/Tensile"
+			-DTensile_CPU_THREADS="$(makeopts_jobs)"
+		)
+	fi
+
 	CXX=hipcc cmake_src_configure
 }
 
@@ -93,7 +99,7 @@ src_test() {
 	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
+	edob "./${PN,,}-test"
 }
 
 src_install() {
@@ -107,5 +113,5 @@ src_install() {
 
 	# Stop llvm-strip from removing .strtab section from *.hsaco files,
 	# otherwise rocclr/elf/elf.cpp complains with "failed: null sections(STRTAB)" and crashes
-	dostrip -x /usr/$(get_libdir)/rocblas/library/
+	dostrip -x "/usr/$(get_libdir)/rocblas/library/"
 }


                 reply	other threads:[~2024-06-26  9:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1719393567.e7c753b648efded4b65fa85f70bdefb47aebbc35.sam@gentoo \
    --to=sam@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