* [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocWMMA/files/, sci-libs/rocWMMA/
@ 2024-03-08 19:22 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-03-08 19:22 UTC (permalink / raw
To: gentoo-commits
commit: 720d5c4ea7ae1cd5a75bcefd1d6ed89b77809e4c
Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Thu Mar 7 12:50:09 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 8 19:22:10 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=720d5c4e
sci-libs/rocWMMA: new package, add 5.7.1
Adds patch similar to https://github.com/ROCm/rocWMMA/pull/353
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
sci-libs/rocWMMA/Manifest | 1 +
.../rocWMMA-5.7.1-use-system-googletest.patch | 25 ++++++++++
sci-libs/rocWMMA/metadata.xml | 15 ++++++
sci-libs/rocWMMA/rocWMMA-5.7.1.ebuild | 56 ++++++++++++++++++++++
4 files changed, 97 insertions(+)
diff --git a/sci-libs/rocWMMA/Manifest b/sci-libs/rocWMMA/Manifest
new file mode 100644
index 000000000000..6e7f161dc924
--- /dev/null
+++ b/sci-libs/rocWMMA/Manifest
@@ -0,0 +1 @@
+DIST rocWMMA-5.7.1.tar.gz 3163060 BLAKE2B 47ca55c0cd388ca51ad3843e656a31ce04d9e07988c26bfb69a7c61bfe497609408cfd20dcbe9c6698bd79b800a114ab67d582ced43dc6f1c4db4072e2901d99 SHA512 92c9c634fdf1f5319d34fabbf691df45600abdc5285a76b40255e7d6d260553076f65baa1eda566a163725e2a0cec0a85372eb07add39c65368e84505c176f50
diff --git a/sci-libs/rocWMMA/files/rocWMMA-5.7.1-use-system-googletest.patch b/sci-libs/rocWMMA/files/rocWMMA-5.7.1-use-system-googletest.patch
new file mode 100644
index 000000000000..f4f78d8d8ee6
--- /dev/null
+++ b/sci-libs/rocWMMA/files/rocWMMA-5.7.1-use-system-googletest.patch
@@ -0,0 +1,25 @@
+Add an option to use system PR
+Upstream PR: https://github.com/ROCm/rocWMMA/pull/353
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -29,8 +29,12 @@ include( CMakeDependentOption )
+ cmake_dependent_option( ROCWMMA_BUILD_VALIDATION_TESTS "Build validation tests" ON "ROCWMMA_BUILD_TESTS" OFF )
+ cmake_dependent_option( ROCWMMA_BUILD_BENCHMARK_TESTS "Build benchmarking tests" OFF "ROCWMMA_BUILD_TESTS" OFF )
+ cmake_dependent_option( ROCWMMA_BUILD_EXTENDED_TESTS "Build extended test parameter coverage" OFF "ROCWMMA_BUILD_TESTS" OFF )
++cmake_dependent_option( ROCWMMA_USE_SYSTEM_GOOGLETEST "Use system Google Test library instead of downloading and building it" OFF "ROCWMMA_BUILD_TESTS" OFF )
+
+ # Test/benchmark requires additional dependencies
++if(ROCWMMA_USE_SYSTEM_GOOGLETEST)
++ find_package(GTest REQUIRED)
++else()
+ include( FetchContent )
+
+ FetchContent_Declare(
+@@ -53,6 +57,7 @@ if(NOT googletest_POPULATED)
+ # Restore shared libs setting
+ set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE INTERNAL "Build SHARED libraries" FORCE)
+ endif()
++endif()
+
+ set(ROCWMMA_TEST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
+ set(ROCWMMA_COMMON_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/hip_device.cpp
diff --git a/sci-libs/rocWMMA/metadata.xml b/sci-libs/rocWMMA/metadata.xml
new file mode 100644
index 000000000000..f5faee0f0220
--- /dev/null
+++ b/sci-libs/rocWMMA/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="person" proxied="yes">
+ <email>lockalsash@gmail.com</email>
+ <name>Sv. Lockal</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ROCm/rocWMMA</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-libs/rocWMMA/rocWMMA-5.7.1.ebuild b/sci-libs/rocWMMA/rocWMMA-5.7.1.ebuild
new file mode 100644
index 000000000000..a2ca2b3404da
--- /dev/null
+++ b/sci-libs/rocWMMA/rocWMMA-5.7.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2024 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"
+
+LICENSE="MIT"
+KEYWORDS="~amd64"
+SLOT="0/$(ver_cut 1-2)"
+
+DEPEND="=dev-util/hip-5*"
+
+BDEPEND="
+ test? (
+ dev-cpp/gtest
+ )
+ dev-build/rocm-cmake
+"
+
+IUSE_TARGETS=( gfx908 gfx90a gfx1100 gfx1101 gfx1102 )
+IUSE_TARGETS=( "${IUSE_TARGETS[@]/#/amdgpu_targets_}" )
+
+IUSE="${IUSE_TARGETS[@]/#/+} test"
+
+REQUIRED_USE="|| ( ${IUSE_TARGETS[*]} )"
+
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}/rocWMMA-rocm-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.7.1-use-system-googletest.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_SKIP_RPATH=ON
+ -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
+ -DROCM_SYMLINK_LIBS=OFF
+ -DROCWMMA_BUILD_SAMPLES=OFF
+ -DROCWMMA_BUILD_TESTS=$(usex test ON OFF)
+ )
+ use test && mycmakeargs+=(-DROCWMMA_USE_SYSTEM_GOOGLETEST=ON)
+ CC=hipcc CXX=hipcc cmake_src_configure
+}
+
+src_test() {
+ check_amdgpu
+ cmake_src_test -j1
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-08 19:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-08 19:22 [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocWMMA/files/, sci-libs/rocWMMA/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox