summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/composable-kernel/Manifest1
-rw-r--r--sci-libs/composable-kernel/composable-kernel-5.7.1-r1.ebuild2
-rw-r--r--sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild82
-rw-r--r--sci-libs/composable-kernel/files/composable-kernel-6.1.1-enable-examples.patch14
-rw-r--r--sci-libs/composable-kernel/files/composable-kernel-6.1.1-fix-clang-17-no-offload-uniform-block.patch18
-rw-r--r--sci-libs/composable-kernel/files/composable-kernel-6.1.1-no-git-no-hash.patch14
-rw-r--r--sci-libs/composable-kernel/metadata.xml2
7 files changed, 131 insertions, 2 deletions
diff --git a/sci-libs/composable-kernel/Manifest b/sci-libs/composable-kernel/Manifest
index 7cb39079ebb9..9272a772facf 100644
--- a/sci-libs/composable-kernel/Manifest
+++ b/sci-libs/composable-kernel/Manifest
@@ -1,2 +1,3 @@
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
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 @@
<name>Science Project</name>
</maintainer>
<upstream>
- <remote-id type="github">ROCmSoftwarePlatform/composable_kernel</remote-id>
+ <remote-id type="github">ROCm/composable_kernel</remote-id>
</upstream>
</pkgmetadata>