summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSv. Lockal <lockalsash@gmail.com>2024-03-18 17:49:39 +0000
committerSam James <sam@gentoo.org>2024-06-26 10:19:17 +0100
commitc97d9c68cf63108143f2709b297ae7d0361b59f6 (patch)
tree08724aa3d2d30c91c9ab6dd69f0e10d8aaebae45 /sci-libs/rocWMMA
parentsci-libs/rocThrust: add 6.1.1 (diff)
downloadgentoo-c97d9c68cf63108143f2709b297ae7d0361b59f6.tar.gz
gentoo-c97d9c68cf63108143f2709b297ae7d0361b59f6.tar.bz2
gentoo-c97d9c68cf63108143f2709b297ae7d0361b59f6.zip
sci-libs/rocWMMA: add 6.1.1
Changes since 5.7.2: * Disabled LTO due to https://github.com/llvm/llvm-project/issues/61101 * Add patch to skip installation if test files * Add sci-libs/rocBLAS dependency for tests Signed-off-by: Sv. Lockal <lockalsash@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/rocWMMA')
-rw-r--r--sci-libs/rocWMMA/Manifest1
-rw-r--r--sci-libs/rocWMMA/files/rocWMMA-6.0.2-use-system-googletest.patch28
-rw-r--r--sci-libs/rocWMMA/files/rocWMMA-6.1.1-no-test-install.patch25
-rw-r--r--sci-libs/rocWMMA/rocWMMA-6.1.1.ebuild63
4 files changed, 117 insertions, 0 deletions
diff --git a/sci-libs/rocWMMA/Manifest b/sci-libs/rocWMMA/Manifest
index 6e7f161dc924..7aeb9da75f6f 100644
--- a/sci-libs/rocWMMA/Manifest
+++ b/sci-libs/rocWMMA/Manifest
@@ -1 +1,2 @@
DIST rocWMMA-5.7.1.tar.gz 3163060 BLAKE2B 47ca55c0cd388ca51ad3843e656a31ce04d9e07988c26bfb69a7c61bfe497609408cfd20dcbe9c6698bd79b800a114ab67d582ced43dc6f1c4db4072e2901d99 SHA512 92c9c634fdf1f5319d34fabbf691df45600abdc5285a76b40255e7d6d260553076f65baa1eda566a163725e2a0cec0a85372eb07add39c65368e84505c176f50
+DIST rocWMMA-6.1.1.tar.gz 3189782 BLAKE2B fd96d8f3ba8f21ee3544d532a59ffdefa1aefc94d73401f48d470f7f699e28771d5495e98c1ee316d8379167b70b945220be6670dee2757a62af162276a2fb0f SHA512 db2bfe805a4f33c48ee98c821efe0b261eca474af9e954843c83faa3335459bfe635326ba2cfc7b8b8ece2cf0f2c418f49ff6aa81537f8d3747cc729738a6b18
diff --git a/sci-libs/rocWMMA/files/rocWMMA-6.0.2-use-system-googletest.patch b/sci-libs/rocWMMA/files/rocWMMA-6.0.2-use-system-googletest.patch
new file mode 100644
index 000000000000..de29d5b70410
--- /dev/null
+++ b/sci-libs/rocWMMA/files/rocWMMA-6.0.2-use-system-googletest.patch
@@ -0,0 +1,28 @@
+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,11 +29,15 @@ 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 )
+
+ add_compile_options(-mcmodel=large)
+ add_link_options(-mcmodel=large)
+
+ # Test/benchmark requires additional dependencies
++if(ROCWMMA_USE_SYSTEM_GOOGLETEST)
++ find_package(GTest 1.12.1 REQUIRED)
++else()
+ include( FetchContent )
+
+ FetchContent_Declare(
+@@ -59,6 +63,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/files/rocWMMA-6.1.1-no-test-install.patch b/sci-libs/rocWMMA/files/rocWMMA-6.1.1-no-test-install.patch
new file mode 100644
index 000000000000..d4219baf3496
--- /dev/null
+++ b/sci-libs/rocWMMA/files/rocWMMA-6.1.1-no-test-install.patch
@@ -0,0 +1,25 @@
+Don't install tests into /usr/bin
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -114,11 +114,6 @@ function(add_rocwmma_test TEST_TARGET TEST_SOURCE)
+ add_test(NAME ${TEST_TARGET} COMMAND ${TEST_TARGET})
+ set_property(TEST ${TEST_TARGET} PROPERTY SKIP_REGULAR_EXPRESSION "no ROCm-capable device" "unsupported host device")
+
+- rocm_install_targets(
+- TARGETS ${TEST_TARGET}
+- COMPONENT tests
+- )
+-
+ get_target_property(EXE_NAME ${TEST_TARGET} RUNTIME_OUTPUT_NAME)
+ if(EXE_NAME STREQUAL "EXE_NAME-NOTFOUND")
+ get_target_property(EXE_NAME ${TEST_TARGET} OUTPUT_NAME)
+@@ -148,9 +143,3 @@ add_subdirectory(gemm)
+ add_subdirectory(unit)
+ add_subdirectory(dlrm)
+
+-rocm_install(
+- FILES "${INSTALL_TEST_FILE}"
+- DESTINATION "${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME}"
+- COMPONENT tests
+- RENAME "CTestTestfile.cmake"
+-)
diff --git a/sci-libs/rocWMMA/rocWMMA-6.1.1.ebuild b/sci-libs/rocWMMA/rocWMMA-6.1.1.ebuild
new file mode 100644
index 000000000000..54af6e3d6f1e
--- /dev/null
+++ b/sci-libs/rocWMMA/rocWMMA-6.1.1.ebuild
@@ -0,0 +1,63 @@
+# 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 flag-o-matic
+
+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"
+
+DEPEND="=dev-util/hip-6*"
+
+IUSE_TARGETS=( gfx908 gfx90a gfx940 gfx941 gfx942 gfx1100 gfx1101 gfx1102 )
+IUSE_TARGETS=( "${IUSE_TARGETS[@]/#/amdgpu_targets_}" )
+ROCM_USEDEP_OPTFLAGS=${IUSE_TARGETS[@]/%/(-)?}
+ROCM_USEDEP=${ROCM_USEDEP_OPTFLAGS// /,}
+ROCM_REQUIRED_USE=" || ( ${IUSE_TARGETS[*]} )"
+
+BDEPEND="
+ test? (
+ dev-cpp/gtest
+ sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}]
+ )
+ dev-build/rocm-cmake
+"
+
+IUSE="${IUSE_TARGETS[@]/#/+} test"
+
+REQUIRED_USE="${ROCM_REQUIRED_USE}"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.2-use-system-googletest.patch
+ "${FILESDIR}"/${PN}-6.1.1-no-test-install.patch
+)
+
+src_configure() {
+ # ld.lld bug https://github.com/llvm/llvm-project/issues/61101
+ filter-lto
+
+ 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
+}