From d2ed973482fdd800013658e83a61709b29e0a80f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 27 Jun 2024 07:59:40 +0100 Subject: gentoo auto-resync : 27:06:2024 - 07:59:39 --- sci-libs/composable-kernel/Manifest | 9 ++- .../composable-kernel-5.7.1-r1.ebuild | 2 +- .../composable-kernel-6.1.1.ebuild | 82 ++++++++++++++++++++++ .../composable-kernel-6.1.1-enable-examples.patch | 14 ++++ ...1.1-fix-clang-17-no-offload-uniform-block.patch | 18 +++++ .../composable-kernel-6.1.1-no-git-no-hash.patch | 14 ++++ sci-libs/composable-kernel/metadata.xml | 2 +- 7 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild create mode 100644 sci-libs/composable-kernel/files/composable-kernel-6.1.1-enable-examples.patch create mode 100644 sci-libs/composable-kernel/files/composable-kernel-6.1.1-fix-clang-17-no-offload-uniform-block.patch create mode 100644 sci-libs/composable-kernel/files/composable-kernel-6.1.1-no-git-no-hash.patch (limited to 'sci-libs/composable-kernel') diff --git a/sci-libs/composable-kernel/Manifest b/sci-libs/composable-kernel/Manifest index 316f4e33f9d2..91879beba858 100644 --- a/sci-libs/composable-kernel/Manifest +++ b/sci-libs/composable-kernel/Manifest @@ -1,5 +1,10 @@ AUX composable-kernel-5.7.1-enable-test-examples.patch 507 BLAKE2B aae585262ad83f2a4e4f07e00e79a99d8cddae9c590e503f8ea1d3ffef84b3d829e61526a8c9b7977a6d604b5310cce521fb179155aba2ffc620c45db76c51cc SHA512 447ee2ec28442d610f185af4d6733d86d183a8f451fca00eafb0d6950d0a65f5d5396a8edcb4a3a1dd4733a6524ba4b9da9ca08b1bcdbd7ecaf7600bf0b14c60 +AUX composable-kernel-6.1.1-enable-examples.patch 379 BLAKE2B 38c3909c98686f97d527f01801043923d26f9f1352a66136cc0c3ce79fabfc7780c822cda7a7e3cc06b36637f6dc5cb5d2c2f055fd79641d3b03f57c241278db SHA512 32d362da7138a7f4c687cbb8ba8be6910d0a562ac79d26ecb7322ecae34e892fc19a79e7be32edbec8290632cef1d97f577accccde2a024e10445fd4cd71f93a +AUX composable-kernel-6.1.1-fix-clang-17-no-offload-uniform-block.patch 918 BLAKE2B 04a17e4e9fd1a2c340a3d93a41f072ad24a836dcf5956644e3eeccb9269f7058a18135f324327aadf48f0e4369bcce8af900a72344515b46992c6deb68b15c71 SHA512 f8ac68ecc9d42673b1b66d3ddde80d042dab2e548a89ebeb50db153c3ec60308f1019a67d1a644d3320435936af0aef4e744b1c12a9f504dc32b18b808921767 +AUX composable-kernel-6.1.1-no-git-no-hash.patch 688 BLAKE2B e3588a306816cf4380bf8987a6fc1660a70a6fc29b811d31381bae4aa2a00b55340d13f43246b70bbc439a462fcb8f664505bfaaac0e4cab793f2e4cb0611aed SHA512 94c59971b95b48e267280989d332240e236cea4cda8b6153945940f01c8f367a8da569403d802d733b7d46728861110b1d916b32be797e62c7a927a42b7b72b7 DIST composable-kernel-5.7.1.tar.gz 2158402 BLAKE2B 660c205c2a99cd17f29a9077e9e7b8b88e41f42ab40d92d0a235e7a60683a04234cce6b2eb6110265c2f461dd132c40151b2521b7d64df4cebb7f27094d8b2b0 SHA512 3931c5dbcab59513541103ebf7446311a1e318421a9e12aeafa7a98cf0717a75e1519140e6b2fbcaf4cb90829a11f03a724ff3ccc6636139c61667ac82558c55 +DIST composable-kernel-6.1.1.tar.gz 2520967 BLAKE2B 549d76c5c36b0a273a4c51159abd162403ad035520f97c43dd4b66560ad30021199d2f4cf7e2c12ffe33beee2fb49604db6d7c40b3b33fdcbfde111b9d4833aa SHA512 3f7667cea91760447c3f6ac0bfc261c0bca95abafbfce209d1c889e04f01ec29849e8d7f0e1cb1d77a4309ac06b3c2557721a773e4a67be383de91668cb279b2 DIST gtest-1.14.0_p20220421.tar.gz 849107 BLAKE2B e9c32d9c1d98959583b696430a6be411f5d69e3db96669b16cffc0f1dcad42512391c0a4733f6e829c82953ff33fa243ee782f3cf6e86436f0d290f45d1a3db7 SHA512 967aac7d85da0e216fe13b17d10f894a31d763d9b88201bac7d3dfc37600552b5472d30a166a6ef27f2778677e73fd3e43d082695a48f47824262eb9cd4fcd2f -EBUILD composable-kernel-5.7.1-r1.ebuild 1786 BLAKE2B ca0f01b34ce48f190a57b9e3b0d788f4bd8422ecae782bb7e9d9e21886bdba0dac8776f1183e57b96e9ef824cde482476746d30b1d5cba5fe93eb7cea9453ce9 SHA512 11b806f90b2a4a94d2535a86cd490a992e39ded8aa648c6b327cd407338a326375850935515338b7fd15946799118821e0d40b0c024cdaaac95cd87bdad1c560 -MISC metadata.xml 473 BLAKE2B fdeace65d8ada21cb0b0fd3a7e1c0c48338c10b51cdad675ffb33e4bd8b9da4ef83ffee85606ef436b2f0315ed323266fa28c70ac5553952ee800fe0450fb066 SHA512 38c79eb08baedccfa7e7a46ef138520d7a939379c4120883d1f8b1187624ca78d9c8dfcf5759867a0b78253b4724a4da944f7384ec27bc2f9846198c1386af9d +EBUILD composable-kernel-5.7.1-r1.ebuild 1769 BLAKE2B 4e51c1eb8f331df322d9427b00d2cb8cba81f10b335533bc131142719d224d9bc89f98a0b54ec20d65f9622a081ab74d2a6bbae9289d1807958a9ded7f08fe4a SHA512 610bc66d4a374c6de7a0afb15a84255dae71911175c05674550478f5850b20f99a5bd0f5c40103c17e42ca774c80423d6a68b5bd0307be9c0ef3eaffa2912a58 +EBUILD composable-kernel-6.1.1.ebuild 1826 BLAKE2B 51c50ead79442a5d3beb92deac4555ae5b74e18e1ad95f27ee0522dc7afa190b307f26e5a0d0e54ffe557d2d91da4ed4a1b501a7fdf8308d8473101312facd2f SHA512 2334d9bb2ce3858ca07b54dbd07b3dac6039ff0afe25b85efa56340866c02852d4b92ccce30298d97029763ea0554518304e82f8d6f1d84d5eda23e0e2227836 +MISC metadata.xml 457 BLAKE2B 3ea71ee5eb1ef715b76f1ff2132c8d487f9360d5ea4a062bcb785eda19a997bed1ffcb251a98046661d647c3eac24db5cf5eeb9b3a6792c450c277038ac8c9e3 SHA512 efc4309c8c4ac98a59cb9634d64410d8a0c8b136accc13aff2f943594a0b4fe8d333010fd5ad59b46fbd7c2d29a244839bb3687cfef6e2c880431ffd80ed873b diff --git a/sci-libs/composable-kernel/composable-kernel-5.7.1-r1.ebuild b/sci-libs/composable-kernel/composable-kernel-5.7.1-r1.ebuild index fbaa9356f722..30016b8dbf79 100644 --- a/sci-libs/composable-kernel/composable-kernel-5.7.1-r1.ebuild +++ b/sci-libs/composable-kernel/composable-kernel-5.7.1-r1.ebuild @@ -36,7 +36,7 @@ RDEPEND=" DEPEND="${RDEPEND}" -BDEPEND="dev-libs/half:0/1 +BDEPEND=" dev-build/rocm-cmake " diff --git a/sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild b/sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild new file mode 100644 index 000000000000..8c096e29135a --- /dev/null +++ b/sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake flag-o-matic rocm + +GTEST_COMMIT="b85864c64758dec007208e56af933fc3f52044ee" +GTEST_FILE="gtest-1.14.0_p20220421.tar.gz" + +DESCRIPTION="High Performance Composable Kernel for AMD GPUs" +HOMEPAGE="https://github.com/ROCm/composable_kernel" +SRC_URI="https://github.com/ROCm/composable_kernel/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz + test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${GTEST_FILE} )" +S="${WORKDIR}/composable_kernel-rocm-${PV}" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" + +IUSE="debug test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-util/hip + >=dev-db/sqlite-3.17 + sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}] + >=dev-libs/boost-1.72 + dev-cpp/nlohmann_json + dev-cpp/frugally-deep +" + +DEPEND="${RDEPEND}" + +BDEPEND=" + dev-build/rocm-cmake +" + +PATCHES=( + "${FILESDIR}"/${PN}-6.1.1-enable-examples.patch + "${FILESDIR}"/${PN}-6.1.1-fix-clang-17-no-offload-uniform-block.patch + "${FILESDIR}"/${PN}-6.1.1-no-git-no-hash.patch +) + +src_prepare() { + sed -e '/-Werror/d' -i cmake/EnableCompilerWarnings.cmake || die + cmake_src_prepare +} + +src_configure() { + if ! use debug; then + append-cflags "-DNDEBUG" + append-cxxflags "-DNDEBUG" + CMAKE_BUILD_TYPE="Release" + else + CMAKE_BUILD_TYPE="Debug" + fi + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON + -DBUILD_DEV=OFF + -DGPU_TARGETS="$(get_amdgpu_flags)" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DBUILD_TESTING=$(usex test ON OFF) + ) + + if use test; then + mycmakeargs+=( + -DGOOGLETEST_DIR="${WORKDIR}/googletest-${GTEST_COMMIT}" + ) + fi + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + LD_LIBRARY_PATH="${BUILD_DIR}"/lib cmake_src_test -j1 +} diff --git a/sci-libs/composable-kernel/files/composable-kernel-6.1.1-enable-examples.patch b/sci-libs/composable-kernel/files/composable-kernel-6.1.1-enable-examples.patch new file mode 100644 index 000000000000..bedc79c562bd --- /dev/null +++ b/sci-libs/composable-kernel/files/composable-kernel-6.1.1-enable-examples.patch @@ -0,0 +1,14 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -470,7 +470,10 @@ if(NOT DEFINED INSTANCES_ONLY) + LIBRARY_NAME composablekernel + PACKAGE_NAME examples + ) +- add_subdirectory(example) ++ option(BUILD_EXAMPLES "Build examples" OFF) ++ if(BUILD_EXAMPLES) ++ add_subdirectory(example) ++ endif() + if(BUILD_TESTING) + add_subdirectory(test) + endif() diff --git a/sci-libs/composable-kernel/files/composable-kernel-6.1.1-fix-clang-17-no-offload-uniform-block.patch b/sci-libs/composable-kernel/files/composable-kernel-6.1.1-fix-clang-17-no-offload-uniform-block.patch new file mode 100644 index 000000000000..3a102bec49cd --- /dev/null +++ b/sci-libs/composable-kernel/files/composable-kernel-6.1.1-fix-clang-17-no-offload-uniform-block.patch @@ -0,0 +1,18 @@ +`-fno-offload-uniform-block` flag was added in Clang 18; do not use it if hipcc uses Clang 17 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -144,11 +144,9 @@ else() + message("Building CK for the following targets: ${AMDGPU_TARGETS}") + endif() + find_package(hip) +-# No assumption that HIP kernels are launched with uniform block size for backward compatibility +-# SWDEV-413293 and https://reviews.llvm.org/D155213 +-math(EXPR hip_VERSION_FLAT "(${hip_VERSION_MAJOR} * 1000 + ${hip_VERSION_MINOR}) * 100000 + ${hip_VERSION_PATCH}") +-message("hip_version_flat=${hip_VERSION_FLAT}") +-if(NOT WIN32 AND ${hip_VERSION_FLAT} GREATER 500723302) ++ ++check_cxx_compiler_flag("-x hip -fno-offload-uniform-block" COMPILER_HAS_OPTION_OFFLOAD_UNIFORM_BLOCK) ++if(COMPILER_HAS_OPTION_OFFLOAD_UNIFORM_BLOCK) + message("Adding the fno-offload-uniform-block compiler flag") + add_compile_options(-fno-offload-uniform-block) + endif() diff --git a/sci-libs/composable-kernel/files/composable-kernel-6.1.1-no-git-no-hash.patch b/sci-libs/composable-kernel/files/composable-kernel-6.1.1-no-git-no-hash.patch new file mode 100644 index 000000000000..6c6b161b1a14 --- /dev/null +++ b/sci-libs/composable-kernel/files/composable-kernel-6.1.1-no-git-no-hash.patch @@ -0,0 +1,14 @@ +Fix "Could NOT find Git (missing: GIT_EXECUTABLE)", git is not needed for releases +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -84,9 +84,7 @@ include(getopt) + # CK config file to record supported datatypes, etc. + configure_file(include/ck/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/ck/config.h) + +-# CK version file to record release version as well as git commit hash +-find_package(Git REQUIRED) +-execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD OUTPUT_VARIABLE COMMIT_ID OUTPUT_STRIP_TRAILING_WHITESPACE) ++# CK version file to record release version + configure_file(include/ck/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/ck/version.h) + + set(ROCM_SYMLINK_LIBS OFF) diff --git a/sci-libs/composable-kernel/metadata.xml b/sci-libs/composable-kernel/metadata.xml index 9236dd2846d7..afd22272458c 100644 --- a/sci-libs/composable-kernel/metadata.xml +++ b/sci-libs/composable-kernel/metadata.xml @@ -10,6 +10,6 @@ Science Project - ROCmSoftwarePlatform/composable_kernel + ROCm/composable_kernel -- cgit v1.2.3