diff options
Diffstat (limited to 'sci-libs/rocWMMA')
-rw-r--r-- | sci-libs/rocWMMA/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/rocWMMA/files/rocWMMA-6.0.2-use-system-googletest.patch | 28 | ||||
-rw-r--r-- | sci-libs/rocWMMA/files/rocWMMA-6.1.1-no-test-install.patch | 25 | ||||
-rw-r--r-- | sci-libs/rocWMMA/rocWMMA-6.1.1.ebuild | 64 |
4 files changed, 121 insertions, 0 deletions
diff --git a/sci-libs/rocWMMA/Manifest b/sci-libs/rocWMMA/Manifest index fcc5b5ff7c23..340a27ed24b0 100644 --- a/sci-libs/rocWMMA/Manifest +++ b/sci-libs/rocWMMA/Manifest @@ -1,4 +1,8 @@ AUX rocWMMA-5.7.1-use-system-googletest.patch 1211 BLAKE2B 2db14b5ef68502ca2aa66507a394eb3959c58802cb6350f40d15c3047d56cab3ee26be3688a4f99b9b7aa3dca687369ebaed0283f2e1af015475147bddc33d7f SHA512 a5d646361a95d96c97c594de4c63dd76d3cb571300446ca90f5b0f5a2e9af5d676fc9cac48b5dd04b921fb34fe951f396a93a7c2e47b09c1f59014a48bc74f7a +AUX rocWMMA-6.0.2-use-system-googletest.patch 1292 BLAKE2B 358e7024dd80664ffc3f92c0c0442c0a325807cd143135d82c95ab72c006f7607c3ad085db80490dbdb7a1e98908bd6bc827a01f202ca21e03e6b10ffc2e701d SHA512 075da1871a8aabbccaff9155e21be2300c471b52e270c15349359e738c8cd9379bb83aee809a299381370ccc2b8ebe73d52002f5cfcb416aa208d4c910931ce9 +AUX rocWMMA-6.1.1-no-test-install.patch 854 BLAKE2B b8d4c15e578cae34eb116a633819eeb941ec85d98e3209fb0359ae9943e9a82ae905513f9ffdd5eed1f1f33fa613b7acb9544dfd314891863a72c54698d3f9ad SHA512 ae2b22e44092d876ad29c8bcabc01aae2ef4279e0ee8b2e8fa80ff2bae0bf3ef30f8f0d7a3e873d12b8ba876cb3aa7ca8cc4b919167f8d229263fc4f982e3e49 DIST rocWMMA-5.7.1.tar.gz 3163060 BLAKE2B 47ca55c0cd388ca51ad3843e656a31ce04d9e07988c26bfb69a7c61bfe497609408cfd20dcbe9c6698bd79b800a114ab67d582ced43dc6f1c4db4072e2901d99 SHA512 92c9c634fdf1f5319d34fabbf691df45600abdc5285a76b40255e7d6d260553076f65baa1eda566a163725e2a0cec0a85372eb07add39c65368e84505c176f50 +DIST rocWMMA-6.1.1.tar.gz 3189782 BLAKE2B fd96d8f3ba8f21ee3544d532a59ffdefa1aefc94d73401f48d470f7f699e28771d5495e98c1ee316d8379167b70b945220be6670dee2757a62af162276a2fb0f SHA512 db2bfe805a4f33c48ee98c821efe0b261eca474af9e954843c83faa3335459bfe635326ba2cfc7b8b8ece2cf0f2c418f49ff6aa81537f8d3747cc729738a6b18 EBUILD rocWMMA-5.7.1.ebuild 1212 BLAKE2B e0bd4413db21ddf0c3933154fd60c561462f21f054bac0990ce3788de9d437a51d128447cf38a59ba29f352e8a39d9e66f3c27ee1eb794f09edcdbf757a9a32f SHA512 cd78d160bee5e49c085b33defc407c26d493e4c9405003dc4d09a5f3fcde7fa22a0db140a6a0736e21e59bd8af39758dd519ba7d8c52c924799fc56bd55808b8 +EBUILD rocWMMA-6.1.1.ebuild 1540 BLAKE2B 49a7d2d9ebc1ecc4d692dd54f23d2ff670564c04656d81ec3034458a5b131959c11ba56ef91c379849350a800f1939ee949afaf45b171d14e4fbda16fd8d0622 SHA512 84362a0f54fa252ab5e900bdfb7043e3b002d3cb769553e65fed3f9572251e8aee13c96bd2a136746e871d36b5433408e468ef2eb21ab6ba63e7b1d88678e115 MISC metadata.xml 468 BLAKE2B 00be6e38c18a77eebb430632acdd9da61aaa299c92cb733735bc7a40e1017e33d778783dd821f4122f46e9f390d7bc37c05c1b43e0abda915586eb83928e5f0a SHA512 9ed778246d9895dfdb2e881b533a2f53a0f6c0361671c33c065ce37e5f2ea4677e9885e28a66466c95e261dea909ec5de9fb79de44d9857520ed269849145247 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..a3f8d61463b1 --- /dev/null +++ b/sci-libs/rocWMMA/rocWMMA-6.1.1.ebuild @@ -0,0 +1,64 @@ +# 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)" + ) + use test && mycmakeargs+=(-DROCWMMA_USE_SYSTEM_GOOGLETEST=ON) + CC=hipcc CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + cmake_src_test -j1 +} |