mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-libs/composable-kernel: add 6.4.3
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
This commit is contained in:
@@ -2,4 +2,5 @@ DIST composable-kernel-5.7.1.tar.gz 2158402 BLAKE2B 660c205c2a99cd17f29a9077e9e7
|
||||
DIST composable-kernel-6.1.1.tar.gz 2520967 BLAKE2B 549d76c5c36b0a273a4c51159abd162403ad035520f97c43dd4b66560ad30021199d2f4cf7e2c12ffe33beee2fb49604db6d7c40b3b33fdcbfde111b9d4833aa SHA512 3f7667cea91760447c3f6ac0bfc261c0bca95abafbfce209d1c889e04f01ec29849e8d7f0e1cb1d77a4309ac06b3c2557721a773e4a67be383de91668cb279b2
|
||||
DIST composable-kernel-6.3.0.tar.gz 3376552 BLAKE2B ad3dde27d0134fa8bf6b5935603f7cac17c959ab7b123e8d69cfe82bee188ade0fe9d3666d46d9819de479e875e46c0fdad2574f68a3bcf0e9acbb871f163b24 SHA512 4fa7be3f54d06d894dca7ef9fa8e3db24971fb857fee96e7ccff89844fa466789756d5f140d2791a984311d59a044b5351d0358e676c218ea0b0aadf60954d8e
|
||||
DIST composable-kernel-6.4.1.tar.gz 4373219 BLAKE2B d00b795a85c36f4199fcbcef7716699865fbbbde72e987dc378e19abb3866d6ccb2fd89095beab3de39009bfa036dda652d9ddf291d0734921c37c410b6c0bae SHA512 a36854e2f884d458847d053f8d1e4254f1f3227690e447d5d75f574df4d604b2a4b7a1b9d0d0c8048b2596ab6633b5a435a2e38352cc6c35117558a60d73a6f4
|
||||
DIST composable-kernel-6.4.3.tar.gz 4373178 BLAKE2B 1128f5de53e31365ff44d2c0b540ab662cd5c1659018d15f35e4c7036c8cf613ba5b95f910b7b3af94673a08ee36917fc38f9f19140140f2779252abda976fa4 SHA512 7073889f9af312a366eae9924771336e40b378255150a48308ce3975e254378da07bb49d615fbda7cc89dab35a14269df776ca88f483b803663cce325e463bb9
|
||||
DIST gtest-1.14.0_p20220421.tar.gz 849107 BLAKE2B e9c32d9c1d98959583b696430a6be411f5d69e3db96669b16cffc0f1dcad42512391c0a4733f6e829c82953ff33fa243ee782f3cf6e86436f0d290f45d1a3db7 SHA512 967aac7d85da0e216fe13b17d10f894a31d763d9b88201bac7d3dfc37600552b5472d30a166a6ef27f2778677e73fd3e43d082695a48f47824262eb9cd4fcd2f
|
||||
|
||||
150
sci-libs/composable-kernel/composable-kernel-6.4.3.ebuild
Normal file
150
sci-libs/composable-kernel/composable-kernel-6.4.3.ebuild
Normal file
@@ -0,0 +1,150 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# shellcheck disable=SC2317
|
||||
EAPI=8
|
||||
|
||||
ROCM_VERSION=${PV}
|
||||
PYTHON_COMPAT=( python3_{10..14} python3_13t )
|
||||
|
||||
inherit check-reqs cmake flag-o-matic multiprocessing python-r1 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 profiler test"
|
||||
REQUIRED_USE="${ROCM_REQUIRED_USE} ${PYTHON_REQUIRED_USE}"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
dev-util/hip:${SLOT}
|
||||
${PYTHON_DEPS}
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="
|
||||
dev-build/rocm-cmake
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-6.1.1-enable-examples.patch
|
||||
"${FILESDIR}"/${PN}-6.1.1-no-git-no-hash.patch
|
||||
"${FILESDIR}"/${PN}-6.3.0-no-inline-all.patch
|
||||
"${FILESDIR}"/${PN}-6.3.0-conditional-kernels.patch
|
||||
"${FILESDIR}"/${PN}-6.3.0-conditional-ckprofiler.patch
|
||||
"${FILESDIR}"/${PN}-6.4.1-expand-isa.patch
|
||||
)
|
||||
|
||||
ck_check-reqs() {
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
targets=($AMDGPU_TARGETS)
|
||||
if [[ ${#targets[@]} -gt 1 ]]; then
|
||||
ewarn "composable-kernel will be compiled for multiple GPU architectures,"
|
||||
ewarn "which will take a significant amount of time."
|
||||
ewarn "Please consider setting AMDGPU_TARGETS USE_EXPAND variable to a single architecture."
|
||||
fi
|
||||
|
||||
# It takes ~2Gb of RAM per build thread
|
||||
local user_jobs=$(makeopts_jobs)
|
||||
local free_memory_mb=$(free -m | awk '/Mem:/ {print $4}')
|
||||
local max_jobs=$(( free_memory_mb / 2048 ))
|
||||
max_jobs=$(( max_jobs < 1 ? 1 : max_jobs ))
|
||||
local limited_jobs=$(( user_jobs < max_jobs ? user_jobs : max_jobs ))
|
||||
if [[ "${max_jobs}" -lt "${user_jobs}" ]]; then
|
||||
ewarn "${free_memory_mb} MB of free RAM is not enough for ${user_jobs} parallel build jobs (~2Gb per job)."
|
||||
ewarn "Please consider setting MAKEOPTS=\"-j${limited_jobs}\" for this package."
|
||||
fi
|
||||
|
||||
local CHECKREQS_MEMORY=$((user_jobs*2048))M
|
||||
check-reqs_${EBUILD_PHASE_FUNC}
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
ck_check-reqs
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
ck_check-reqs
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -e '/-Werror/d' -i cmake/EnableCompilerWarnings.cmake || die
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
rocm_use_hipcc
|
||||
|
||||
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)
|
||||
-DCK_USE_PROFILER=$(usex profiler ON OFF)
|
||||
-Wno-dev
|
||||
)
|
||||
|
||||
# Since 6.4.1 "fallback" DL kernels should be enabled manually...
|
||||
if use amdgpu_targets_gfx1010 || use amdgpu_targets_gfx1011 || use amdgpu_targets_gfx1012 \
|
||||
|| use amdgpu_targets_gfx1030 || use amdgpu_targets_gfx1031 ; then
|
||||
mycmakeargs+=(-DDL_KERNELS=ON)
|
||||
fi
|
||||
|
||||
if use test; then
|
||||
mycmakeargs+=(
|
||||
-DFETCHCONTENT_SOURCE_DIR_GTEST="${WORKDIR}/googletest-${GTEST_COMMIT}"
|
||||
)
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
installation() {
|
||||
python_domodule python/ck4inductor
|
||||
|
||||
# install package-data manually, as there is no PEP517 compliance
|
||||
shopt -s globstar
|
||||
package_data=(
|
||||
include/ck/**/*.hpp
|
||||
library/src/tensor_operation_instance/gpu/gemm_universal/**/*.hpp
|
||||
)
|
||||
shopt -u globstar
|
||||
|
||||
inst_path="${D}$(python_get_sitedir)/ck4inductor"
|
||||
for file in "${package_data[@]}"; do
|
||||
location="${inst_path}/$(dirname "$file")"
|
||||
mkdir -p "${location}"
|
||||
cp "${file}" "${location}"
|
||||
done
|
||||
}
|
||||
python_foreach_impl installation
|
||||
}
|
||||
|
||||
src_test() {
|
||||
check_amdgpu
|
||||
LD_LIBRARY_PATH="${BUILD_DIR}"/lib cmake_src_test -j1
|
||||
}
|
||||
Reference in New Issue
Block a user