commit:     d4af7e3bde852a98dfb96568d7a4064da875bf42
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Mon Oct 13 14:06:07 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 21 18:47:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4af7e3b

sci-libs/rocWMMA: add 7.0.2

Bug: https://bugs.gentoo.org/964799

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44165
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/rocWMMA/Manifest             |  1 +
 sci-libs/rocWMMA/rocWMMA-7.0.2.ebuild | 74 +++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/sci-libs/rocWMMA/Manifest b/sci-libs/rocWMMA/Manifest
index 5982cc070093..2a5aa64a3f32 100644
--- a/sci-libs/rocWMMA/Manifest
+++ b/sci-libs/rocWMMA/Manifest
@@ -1,2 +1,3 @@
 DIST rocWMMA-6.3.3.tar.gz 3225632 BLAKE2B 
ff3fc4b8d980233052236c4850346c171147d25b5c0e32d81271f22eb1b844150f3998e10cfb5d01797cb8d03630406226eb33ce71d9c6004b0aacc4e40da772
 SHA512 
e775b1e540baaa67caf65b6bb1815fab860b28e3431a52e8158afab5c4b358407ca4085e9bb68eeb9117f7147d9872baa47fac1bcefac4fc87982c543ce35c9b
 DIST rocWMMA-6.4.3.tar.gz 3284060 BLAKE2B 
d2a5eb06ff51f4a6d5e1a5350e73aac2ff130b9e302574e009760bd0829e52c1d7070c924b1fbbf833839b054f72b984f76b5bd558ef4f2555465d0ae6bdf200
 SHA512 
7ee4f7ddf5fd65fbd62fd571dda4d77d5752d496b606a0d5e03be0a7c8f6fca0a065af5312e3dd0a993b213c01c0cc78010ab20243de85a41ef45286f2b79093
+DIST rocWMMA-7.0.2.tar.gz 3349405 BLAKE2B 
9b62582f89c5c5134da415c6921c0fd15012239ec1d3ba235277abf99d906ef39d69f8abc9a0e09e5ce2fe9f49df072e1c2d44805d497ffa65d7bfcab8a6b69c
 SHA512 
bfa1124e69eb96671e83d4d4d8879f1c7458560e76189e3af02ee6e65d50ab5fe89926641d951918f62a794d501e52b6d687b238b24762fd5f17cf90140f8e77

diff --git a/sci-libs/rocWMMA/rocWMMA-7.0.2.ebuild 
b/sci-libs/rocWMMA/rocWMMA-7.0.2.ebuild
new file mode 100644
index 000000000000..0b8f746fc666
--- /dev/null
+++ b/sci-libs/rocWMMA/rocWMMA-7.0.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ROCM_SKIP_GLOBALS=1
+
+inherit cmake rocm
+
+DESCRIPTION="library for accelerating mixed precision matrix 
multiply-accumulate operations"
+HOMEPAGE="https://github.com/ROCm/rocWMMA";
+SRC_URI="https://github.com/ROCm/rocWMMA/archive/rocm-${PV}.tar.gz -> 
rocWMMA-${PV}.tar.gz"
+S="${WORKDIR}/rocWMMA-rocm-${PV}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+IUSE_TARGETS=( gfx908 gfx90a gfx942 gfx950 gfx1100 gfx1101 gfx1102 gfx1151 
gfx1200 gfx1201 )
+IUSE_TARGETS=( "${IUSE_TARGETS[@]/#/amdgpu_targets_}" )
+ROCM_REQUIRED_USE=" || ( ${IUSE_TARGETS[*]} )"
+
+IUSE="${IUSE_TARGETS[*]/#/+} test"
+REQUIRED_USE="test? ( ${ROCM_REQUIRED_USE} )"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       dev-util/hip:${SLOT}
+       dev-util/rocm-smi:${SLOT}
+"
+# interface dependencies of header library
+RDEPEND="${DEPEND}"
+
+BDEPEND="
+       test? (
+               dev-cpp/gtest
+               sci-libs/rocBLAS:${SLOT}
+       )
+       dev-build/rocm-cmake
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-6.1.1-no-test-install.patch
+)
+
+src_prepare() {
+       # unknown arguments for hipcc
+       sed -e "s/ -parallel-jobs=4//" \
+               -e "s/ -Xclang -fallow-half-arguments-and-returns//" \
+               -i CMakeLists.txt || die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       rocm_use_clang
+
+       local mycmakeargs=(
+               -DGPU_TARGETS="$(get_amdgpu_flags)"
+               -DROCWMMA_BUILD_SAMPLES=OFF
+               -DROCWMMA_BUILD_TESTS="$(usex test)"
+       )
+       use test && mycmakeargs+=(-DROCWMMA_USE_SYSTEM_GOOGLETEST=ON)
+       cmake_src_configure
+}
+
+src_test() {
+       check_amdgpu
+
+       # Expected time on gfx1100 is 1260s (-j1) or 936s (-j32)
+       # Visible devices are limited to the first one to exclude APU (if not 
disabled in the BIOS)
+       HIP_VISIBLE_DEVICES=0 cmake_src_test
+}

Reply via email to