From 4e026a2193c5242863ac2551e90abcd28942d760 Mon Sep 17 00:00:00 2001 From: Jack de Kleuver Date: Sat, 5 Nov 2022 18:11:31 +1100 Subject: dev-util/Tensile: Bump LLVM version to 15 Signed-off-by: Jack de Kleuver Signed-off-by: Yiyang Wu Signed-off-by: Benda Xu --- dev-util/Tensile/Tensile-5.1.3-r1.ebuild | 86 ++++++++++++++++++++++++++++++++ dev-util/Tensile/Tensile-5.1.3.ebuild | 86 -------------------------------- 2 files changed, 86 insertions(+), 86 deletions(-) create mode 100644 dev-util/Tensile/Tensile-5.1.3-r1.ebuild delete mode 100644 dev-util/Tensile/Tensile-5.1.3.ebuild (limited to 'dev-util') diff --git a/dev-util/Tensile/Tensile-5.1.3-r1.ebuild b/dev-util/Tensile/Tensile-5.1.3-r1.ebuild new file mode 100644 index 000000000000..b5f468973ea4 --- /dev/null +++ b/dev-util/Tensile/Tensile-5.1.3-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +DISTUTILS_USE_PEP517=setuptools +inherit distutils-r1 llvm prefix + +LLVM_MAX_SLOT=15 + +DESCRIPTION="Stretching GPU performance for GEMMs and tensor contractions" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/Tensile" +SRC_URI="https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-${PV}.tar.gz -> rocm-Tensile-${PV}.tar.gz + https://github.com/littlewu2508/littlewu2508.github.io/raw/main/gentoo-distfiles/${PN}-5.0.2-PR1419.patch.gz" +S="${WORKDIR}/${PN}-rocm-${PV}" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" + +# Not compatible with recent versions of pytest +RESTRICT="test" + +RDEPEND="${PYTHON_DEPS} + sys-devel/clang:${LLVM_MAX_SLOT} + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/msgpack[${PYTHON_USEDEP}] + >=dev-util/rocm-smi-4.3.0 +" +DEPEND="${RDEPEND} + dev-util/hip +" + +PATCHES=( "${FILESDIR}"/${PN}-4.3.0-output-commands.patch + "${FILESDIR}"/${PN}-5.0.2-gfx1031.patch + "${FILESDIR}"/${PN}-5.0.2-fix-arch-parse.patch + "${FILESDIR}"/${PN}-5.0.2-use-ninja.patch + ) + +CMAKE_USE_DIR="${WORKDIR}/Source" + +src_prepare() { + distutils-r1_src_prepare + sed -e "s,\@LLVM_PATH\@,$(get_llvm_prefix ${LLVM_MAX_SLOT}),g" "${FILESDIR}"/${PN}-5.1.3-gentoopath.patch > "${S}"/gentoopath.patch || die + eapply $(prefixify_ro "${S}"/gentoopath.patch) + + pushd ${PN} || die + + sed -e "/ROCM_SMI_ROOT/s,lib,$(get_libdir)," \ + -i Source/cmake/FindROCmSMI.cmake || die + sed -r -e "/TENSILE_USE_LLVM/s/ON/OFF/" \ + -i Source/CMakeLists.txt || die + sed -e "/chmod 755/d" -i Source/TensileCreateLibrary.cmake || die # remove chmod 755 on + sed -e "s,\${Tensile_ROOT}/bin/,,g" -i Source/TensileCreateLibrary.cmake cmake/TensileConfig.cmake || die # ${Tensile_ROOT}/bin does not exists; call command directly + + local Tensile_share_dir="\"${EPREFIX}/usr/share/${PN}\"" + sed -e "/HipClangVersion/s/0,0,0/$(hipconfig -v)/" -i Common.py || die + + sed -e "s,os.path.dirname(os.path.realpath(__file__)),${Tensile_share_dir},g" -i ReplacementKernels.py Common.py ${PN}.py || die + + sed -e "s|os\.path\.dirname.*$|\"${EPREFIX}/usr/share/Tensile/Source\", end='')|" -i __init__.py || die + + popd || die + + sed -e "/package_data/d" -e "/data_files/d" -i setup.py || die +} + +python_install() { + distutils-r1_python_install + + python_moduleinto Tensile + pushd Tensile || die + python_domodule Components + python_newexe Utilities/merge.py ${PN}-merge +} + +src_install() { + distutils-r1_src_install + + pushd ${PN} || die + insinto /usr/share/${PN} + doins -r Configs Perf ReplacementKernels ReplacementKernels-cov3 Source CustomKernels + insinto /usr/$(get_libdir)/cmake/${PN} + doins cmake/*.cmake +} diff --git a/dev-util/Tensile/Tensile-5.1.3.ebuild b/dev-util/Tensile/Tensile-5.1.3.ebuild deleted file mode 100644 index f2a39a52dbbb..000000000000 --- a/dev-util/Tensile/Tensile-5.1.3.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..11} ) -DISTUTILS_USE_PEP517=setuptools -inherit distutils-r1 llvm prefix - -LLVM_MAX_SLOT=14 - -DESCRIPTION="Stretching GPU performance for GEMMs and tensor contractions" -HOMEPAGE="https://github.com/ROCmSoftwarePlatform/Tensile" -SRC_URI="https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-${PV}.tar.gz -> rocm-Tensile-${PV}.tar.gz - https://github.com/littlewu2508/littlewu2508.github.io/raw/main/gentoo-distfiles/${PN}-5.0.2-PR1419.patch.gz" -S="${WORKDIR}/${PN}-rocm-${PV}" - -LICENSE="MIT" -KEYWORDS="~amd64" -SLOT="0/$(ver_cut 1-2)" - -# Not compatible with recent versions of pytest -RESTRICT="test" - -RDEPEND="${PYTHON_DEPS} - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-python/msgpack[${PYTHON_USEDEP}] - >=dev-util/rocm-smi-4.3.0 - >=sys-devel/clang-14.0.6-r1:${LLVM_MAX_SLOT}= -" -DEPEND="${RDEPEND} - dev-util/hip -" - -PATCHES=( "${FILESDIR}"/${PN}-4.3.0-output-commands.patch - "${FILESDIR}"/${PN}-5.0.2-gfx1031.patch - "${FILESDIR}"/${PN}-5.0.2-fix-arch-parse.patch - "${FILESDIR}"/${PN}-5.0.2-use-ninja.patch - ) - -CMAKE_USE_DIR="${WORKDIR}/Source" - -src_prepare() { - distutils-r1_src_prepare - sed -e "s,\@LLVM_PATH\@,$(get_llvm_prefix ${LLVM_MAX_SLOT}),g" "${FILESDIR}"/${PN}-5.1.3-gentoopath.patch > "${S}"/gentoopath.patch || die - eapply $(prefixify_ro "${S}"/gentoopath.patch) - - pushd ${PN} || die - - sed -e "/ROCM_SMI_ROOT/s,lib,$(get_libdir)," \ - -i Source/cmake/FindROCmSMI.cmake || die - sed -r -e "/TENSILE_USE_LLVM/s/ON/OFF/" \ - -i Source/CMakeLists.txt || die - sed -e "/chmod 755/d" -i Source/TensileCreateLibrary.cmake || die # remove chmod 755 on - sed -e "s,\${Tensile_ROOT}/bin/,,g" -i Source/TensileCreateLibrary.cmake cmake/TensileConfig.cmake || die # ${Tensile_ROOT}/bin does not exists; call command directly - - local Tensile_share_dir="\"${EPREFIX}/usr/share/${PN}\"" - sed -e "/HipClangVersion/s/0,0,0/$(hipconfig -v)/" -i Common.py || die - - sed -e "s,os.path.dirname(os.path.realpath(__file__)),${Tensile_share_dir},g" -i ReplacementKernels.py Common.py ${PN}.py || die - - sed -e "s|os\.path\.dirname.*$|\"${EPREFIX}/usr/share/Tensile/Source\", end='')|" -i __init__.py || die - - popd || die - - sed -e "/package_data/d" -e "/data_files/d" -i setup.py || die -} - -python_install() { - distutils-r1_python_install - - python_moduleinto Tensile - pushd Tensile || die - python_domodule Components - python_newexe Utilities/merge.py ${PN}-merge -} - -src_install() { - distutils-r1_src_install - - pushd ${PN} || die - insinto /usr/share/${PN} - doins -r Configs Perf ReplacementKernels ReplacementKernels-cov3 Source CustomKernels - insinto /usr/$(get_libdir)/cmake/${PN} - doins cmake/*.cmake -} -- cgit v1.2.3-65-gdbad