summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSv. Lockal <lockalsash@gmail.com>2024-03-07 12:50:09 +0000
committerSam James <sam@gentoo.org>2024-03-08 19:22:10 +0000
commit720d5c4ea7ae1cd5a75bcefd1d6ed89b77809e4c (patch)
tree5078801545bcc662eba11b779a54f2929e04697c /sci-libs
parentsci-libs/hipFFT: cleanup unused flags/variables (diff)
downloadgentoo-720d5c4ea7ae1cd5a75bcefd1d6ed89b77809e4c.tar.gz
gentoo-720d5c4ea7ae1cd5a75bcefd1d6ed89b77809e4c.tar.bz2
gentoo-720d5c4ea7ae1cd5a75bcefd1d6ed89b77809e4c.zip
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@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/rocWMMA/Manifest1
-rw-r--r--sci-libs/rocWMMA/files/rocWMMA-5.7.1-use-system-googletest.patch25
-rw-r--r--sci-libs/rocWMMA/metadata.xml15
-rw-r--r--sci-libs/rocWMMA/rocWMMA-5.7.1.ebuild56
4 files changed, 97 insertions, 0 deletions
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
+}