public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick Lauer" <patrick@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/hipBLASLt/
Date: Sat, 08 Feb 2025 14:57:21 +0000 (UTC)	[thread overview]
Message-ID: <1739026640.c6cb0eba38cbbb7e7def07e5217059a268d60e24.patrick@gentoo> (raw)

commit:     c6cb0eba38cbbb7e7def07e5217059a268d60e24
Author:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  8 14:57:01 2025 +0000
Commit:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
CommitDate: Sat Feb  8 14:57:20 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6cb0eba

sci-libs/hipBLASLt: add 6.3.2

Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>

 sci-libs/hipBLASLt/Manifest               |   1 +
 sci-libs/hipBLASLt/hipBLASLt-6.3.2.ebuild | 140 ++++++++++++++++++++++++++++++
 2 files changed, 141 insertions(+)

diff --git a/sci-libs/hipBLASLt/Manifest b/sci-libs/hipBLASLt/Manifest
index 14f0ac5af33d..9b8ef0bc3e9c 100644
--- a/sci-libs/hipBLASLt/Manifest
+++ b/sci-libs/hipBLASLt/Manifest
@@ -1,2 +1,3 @@
 DIST hipBLASLt-6.1.1.tar.gz 78448557 BLAKE2B 08ac9ce45d7d1e4384a36939af22f65589ed87e25b4db77f5f7ff5fbe65b8070e9c55fbb09db3b7bd49be98981dc8bf939e646ea27571bf1d1ccfa52a50b0f92 SHA512 1aa3a1cb8e9c7f653db66909b38be065b7386b97d4bd6b52ecc6c2bf72c6cdfabde6f12ebc6016b5fa195f979359af875eda8d54ea6772329312cb357bc2ebc5
 DIST hipBLASLt-6.3.1.tar.gz 89385330 BLAKE2B 4bcf083e41ad6f22f61321bd066d79a6a387ea677cdb05f96f474e1b409f0b1cc5dc0c61259d7d6456ced2b77191388e1bd4b260bd7d185875241f55246ed1a8 SHA512 7a6443ab7a66bae1d6273945ea91814b2d5f9846d8276040cda7f43ed7ea0c2cb6063009e7fe092742d396c8d87c2cf62ed4cf8249e936eed69c0cad6db02193
+DIST hipBLASLt-6.3.2.tar.gz 89385514 BLAKE2B 785ee2951b76100f29eed4891cdc3fc58abbee866a9eac7109bc49e56854007d57d15bc6d605a7527ecc685e59500567581d194ede67cff566fba3b582d7b3c4 SHA512 2f4f497a5228162f4fffda9f549f943d26c86d7160a50c0aadc403340cee4466e9f16bd5cfcd386535b7f05cc8d1839a4d146c52761b6eb29e2e53962437e781

diff --git a/sci-libs/hipBLASLt/hipBLASLt-6.3.2.ebuild b/sci-libs/hipBLASLt/hipBLASLt-6.3.2.ebuild
new file mode 100644
index 000000000000..27266b0b717a
--- /dev/null
+++ b/sci-libs/hipBLASLt/hipBLASLt-6.3.2.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ROCM_SKIP_GLOBALS=1
+PYTHON_COMPAT=( python3_{10..13} )
+
+LLVM_COMPAT=( 19 )
+
+inherit cmake flag-o-matic llvm-r1 python-any-r1 rocm
+DESCRIPTION="General matrix-matrix operations library for AMD Instinct accelerators"
+HOMEPAGE="https://github.com/ROCm/hipBLASLt"
+SRC_URI="https://github.com/ROCm/hipBLASLt/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/hipBLASLt-rocm-${PV}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+SUPPORTED_GPUS=( gfx908 gfx90a gfx940 gfx941 gfx942 gfx1100 gfx1101 )
+IUSE_TARGETS=( "${SUPPORTED_GPUS[@]/#/amdgpu_targets_}" )
+IUSE="${IUSE_TARGETS[@]/#/+} test benchmark"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	dev-util/hip:${SLOT}
+	dev-cpp/msgpack-cxx
+"
+
+DEPEND="${RDEPEND}"
+BDEPEND="
+	dev-build/rocm-cmake
+	sci-libs/hipBLAS-common:${SLOT}
+	$(python_gen_any_dep '
+		dev-python/msgpack[${PYTHON_USEDEP}]
+		dev-python/pyyaml[${PYTHON_USEDEP}]
+		dev-python/joblib[${PYTHON_USEDEP}]
+	')
+	$(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}')
+	test? (
+		dev-cpp/gtest
+		virtual/blas
+		dev-util/rocm-smi:${SLOT}
+	)
+	benchmark? (
+		virtual/blas
+		llvm-runtimes/openmp
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.1.1-fix-msgpack-dependency.patch
+	"${FILESDIR}"/${PN}-6.1.1-no-arch.patch
+	"${FILESDIR}"/${PN}-6.1.1-no-git.patch
+	"${FILESDIR}"/${PN}-6.1.1-clang-19.patch
+	"${FILESDIR}"/${PN}-6.1.1-fix-libcxx.patch
+	"${FILESDIR}"/${PN}-6.3.0-no-arch-extra.patch
+	"${FILESDIR}"/${PN}-6.3.0-min-pip-install.patch
+)
+
+python_check_deps() {
+	python_has_version "dev-python/msgpack[${PYTHON_USEDEP}]" &&
+	python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" &&
+	python_has_version "dev-python/joblib[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+	python-any-r1_pkg_setup
+}
+
+pkg_pretend() {
+	if [[ "${AMDGPU_TARGETS[@]}" = "" ]]; then
+		ewarn "hipBLASLt supports only few GPUs: ${SUPPORTED_GPUS[@]},"
+		ewarn "but none of them were defined in AMDGPU_TARGETS USE_EXPAND variable."
+		ewarn
+		ewarn "Library will continue to be built in \"dummy\" mode,"
+		ewarn "serving as a non-functional placeholder for end-user applications."
+	fi
+}
+
+src_prepare() {
+	sed -e "s,\@LLVM_PATH\@,$(get_llvm_prefix),g" \
+		"${FILESDIR}"/${PN}-6.1.1-gentoopath.patch > "${S}"/gentoopath.patch || die
+	eapply "${S}"/gentoopath.patch
+
+	local shebangs=($(grep -rl "#!/usr/bin/env python3" tensilelite/Tensile || die))
+	python_fix_shebang -q ${shebangs[*]}
+
+	sed -e "s:\${rocm_path}/bin/amdclang++:$(get_llvm_prefix)/bin/clang++:" \
+		-i library/src/amd_detail/rocblaslt/src/kernels/compile_code_object.sh || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	rocm_use_hipcc
+
+	# too many warnings
+	append-cxxflags -Wno-explicit-specialization-storage-class
+
+	local targets="$(get_amdgpu_flags)"
+	local build_with_tensile=$([ "${AMDGPU_TARGETS[@]}" = "" ] && echo OFF || echo ON )
+
+	local mycmakeargs=(
+		-DROCM_SYMLINK_LIBS=OFF
+		-DBUILD_WITH_TENSILE="${build_with_tensile}"
+		-DAMDGPU_TARGETS="${targets}"
+		-DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
+		-DBUILD_CLIENTS_BENCHMARKS="$(usex benchmark ON OFF)"
+		-Wno-dev
+	)
+
+	cmake_src_configure
+}
+
+src_compile() {
+	local -x ROCM_PATH="${EPREFIX}/usr"
+	# set PYTHONPATH to load Tensile from virtualenv, not the system-wide one
+	local -x PYTHONPATH="${S}_build/virtualenv/lib/${EPYTHON}/site-packages"
+	local -x TENSILE_ROCM_ASSEMBLER_PATH="$(get_llvm_prefix)/bin/clang++"
+	# TensileCreateLibrary reads CMAKE_CXX_COMPILER again
+	local -x CMAKE_CXX_COMPILER="$(get_llvm_prefix)/bin/clang++"
+	cmake_src_compile
+}
+
+src_install() {
+	cmake_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)/hipblaslt/library/
+}
+
+src_test() {
+	check_amdgpu
+
+	# Expected time for 7900 XTX: 340s (full) or 5s with GTEST_FILTER='*quick*'
+	cmake_src_test
+}


             reply	other threads:[~2025-02-08 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-08 14:57 Patrick Lauer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-04 10:55 [gentoo-commits] repo/gentoo:master commit in: sci-libs/hipBLASLt/ Patrick Lauer
2025-01-26 14:00 Sam James
2025-01-26 14:00 Sam James

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=1739026640.c6cb0eba38cbbb7e7def07e5217059a268d60e24.patrick@gentoo \
    --to=patrick@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