* [gentoo-commits] proj/sci:master commit in: dev-util/Tensile/files/, dev-util/Tensile/
@ 2022-03-05 14:43 Andrew Ammerlaan
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Ammerlaan @ 2022-03-05 14:43 UTC (permalink / raw
To: gentoo-commits
commit: f1b7b457296505b40a3ff204fed5d605086e39e6
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 5 14:41:24 2022 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Mar 5 14:42:12 2022 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=f1b7b457
dev-util/Tensile: add version 4.3.0
https://github.com/gentoo/gentoo/pull/23450
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
dev-util/Tensile/Tensile-4.3.0.ebuild | 74 +++++++++++++++++
...ensile-4.3.0-hsaco-compile-specified-arch.patch | 96 ++++++++++++++++++++++
.../files/Tensile-4.3.0-output-commands.patch | 23 ++++++
3 files changed, 193 insertions(+)
diff --git a/dev-util/Tensile/Tensile-4.3.0.ebuild b/dev-util/Tensile/Tensile-4.3.0.ebuild
new file mode 100644
index 000000000..bfd86ecea
--- /dev/null
+++ b/dev-util/Tensile/Tensile-4.3.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1
+
+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"
+S="${WORKDIR}/${PN}-rocm-${PV}"
+
+LICENSE="MIT"
+KEYWORDS="~amd64"
+SLOT="0"
+
+# Not compatible with recent versions of pytest
+RESTRICT="test"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/msgpack[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ dev-util/hip:${SLOT}
+"
+BDEPEND="test? (
+ dev-util/rocminfo:${SLOT}
+)"
+
+PATCHES=(
+ "${FILESDIR}/Tensile-${PV}-hsaco-compile-specified-arch.patch" # backported from upstream, should remove after 4.3.0
+ "${FILESDIR}/Tensile-4.3.0-output-commands.patch"
+)
+
+CMAKE_USE_DIR="${WORKDIR}/Source"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ mv ${PN}/Source "${WORKDIR}"/ || die
+ sed -e "/ROCM_SMI_ROOT/s,lib,$(get_libdir)," \
+ -i "${WORKDIR}"/Source/cmake/FindROCmSMI.cmake || die
+ sed -r -e "/TENSILE_USE_LLVM/s/ON/OFF/" \
+ -i "${WORKDIR}"/Source/CMakeLists.txt || die
+
+ sed -e "/HipClangVersion/s/0,0,0/$(ver_rs 1-3 ,)/" \
+ -e "/SourcePath/s,os\.path\.join.*$,\"${EPREFIX}/usr/share/${PN}\"," \
+ -i ${PN}/Common.py || die
+
+ sed -e "s|os\.path\.dirname.*$|\"${EPREFIX}/usr/share/Tensile\", end='')|" \
+ -i ${PN}/__init__.py || die
+}
+
+src_test() {
+ ROCM_PATH="${EPREFIX}/usr/" distutils-r1_src_test
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ # Move the cmake files to the correct directory
+ mkdir -p "${ED}/usr/$(get_libdir)/cmake/${PN}" || die
+ mv "${ED}/usr/cmake/"* "${ED}/usr/$(get_libdir)/cmake/${PN}" || die
+ rm -r "${ED}/usr/cmake" || die
+
+ insinto /usr/share/${PN}
+ doins -r "${WORKDIR}"/Source/*
+ dosym . /usr/share/${PN}/Source
+}
diff --git a/dev-util/Tensile/files/Tensile-4.3.0-hsaco-compile-specified-arch.patch b/dev-util/Tensile/files/Tensile-4.3.0-hsaco-compile-specified-arch.patch
new file mode 100644
index 000000000..8e6753781
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-4.3.0-hsaco-compile-specified-arch.patch
@@ -0,0 +1,96 @@
+https://github.com/ROCmSoftwarePlatform/Tensile/issues/1395
+https://github.com/ROCmSoftwarePlatform/Tensile/pull/1398
+
+--- a/Tensile/TensileCreateLibrary.py
++++ b/Tensile/TensileCreateLibrary.py
+@@ -136,6 +136,35 @@ def which(p):
+ return candidate
+ return None
+
++def splitArchs():
++ # Helper for architecture
++ def isSupported(arch):
++ return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
++ globalParameters["AsmCaps"][arch]["SupportedSource"]
++
++ if ";" in globalParameters["Architecture"]:
++ wantedArchs = globalParameters["Architecture"].split(";")
++ else:
++ wantedArchs = globalParameters["Architecture"].split("_")
++ archs = []
++ cmdlineArchs = []
++ if "all" in wantedArchs:
++ for arch in globalParameters['SupportedISA']:
++ if isSupported(arch):
++ if (arch == (9,0,6) or arch == (9,0,8) or arch == (9,0,10)):
++ if (arch == (9,0,10)):
++ archs += [gfxName(arch) + '-xnack+']
++ cmdlineArchs += [gfxName(arch) + ':xnack+']
++ archs += [gfxName(arch) + '-xnack-']
++ cmdlineArchs += [gfxName(arch) + ':xnack-']
++ else:
++ archs += [gfxName(arch)]
++ cmdlineArchs += [gfxName(arch)]
++ else:
++ for arch in wantedArchs:
++ archs += [re.sub(":", "-", arch)]
++ cmdlineArchs += [arch]
++ return archs, cmdlineArchs
+
+ def buildSourceCodeObjectFile(CxxCompiler, outputPath, kernelFile):
+ buildPath = ensurePath(os.path.join(globalParameters['WorkingPath'], 'code_object_tmp'))
+@@ -149,24 +178,8 @@ def buildSourceCodeObjectFile(CxxCompiler, outputPath, kernelFile):
+ objectFilename = base + '.o'
+ soFilename = base + '.so'
+
+- def isSupported(arch):
+- return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
+- globalParameters["AsmCaps"][arch]["SupportedSource"]
+-
+ if (CxxCompiler == "hipcc"):
+- archs = []
+- cmdlineArchs = []
+- for arch in globalParameters['SupportedISA']:
+- if isSupported(arch):
+- if (arch == (9,0,6) or arch == (9,0,8) or arch == (9,0,10)):
+- if (arch == (9,0,10)):
+- archs += [gfxName(arch) + '-xnack+']
+- cmdlineArchs += [gfxName(arch) + ':xnack+']
+- archs += [gfxName(arch) + '-xnack-']
+- cmdlineArchs += [gfxName(arch) + ':xnack-']
+- else:
+- archs += [gfxName(arch)]
+- cmdlineArchs += [gfxName(arch)]
++ archs, cmdlineArchs = splitArchs()
+
+ archFlags = ['--offload-arch=' + arch for arch in cmdlineArchs]
+
+@@ -1063,11 +1076,6 @@ def buildObjectFileNames(solutionWriter, kernelWriterSource, kernelWriterAssembl
+ sourceKernels = list([k for k in kernels if k['KernelLanguage'] == 'Source'])
+ asmKernels = list([k for k in kernels if k['KernelLanguage'] == 'Assembly'])
+
+- # Helper for architecture
+- def isSupported(arch):
+- return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
+- globalParameters["AsmCaps"][arch]["SupportedSource"]
+-
+ # Build a list of kernel object names.
+ for kernel in sourceKernels:
+ sourceKernelNames += [kernelWriterSource.getKernelFileBase(kernel)]
+@@ -1081,15 +1089,7 @@ def buildObjectFileNames(solutionWriter, kernelWriterSource, kernelWriterAssembl
+
+ # Source based kernels are built for all supported architectures
+ if (cxxCompiler == 'hipcc'):
+- sourceArchs = []
+- for arch in globalParameters['SupportedISA']:
+- if isSupported(arch):
+- if (arch == (9,0,6) or arch == (9,0,8) or arch == (9,0,10)):
+- if (arch == (9,0,10)):
+- sourceArchs += [gfxName(arch) + '-xnack+']
+- sourceArchs += [gfxName(arch) + '-xnack-']
+- else:
+- sourceArchs += [gfxName(arch)]
++ sourceArchs, _ = splitArchs()
+ else:
+ raise RuntimeError("Unknown compiler %s" % cxxCompiler)
+
diff --git a/dev-util/Tensile/files/Tensile-4.3.0-output-commands.patch b/dev-util/Tensile/files/Tensile-4.3.0-output-commands.patch
new file mode 100644
index 000000000..be5a4db21
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-4.3.0-output-commands.patch
@@ -0,0 +1,23 @@
+diff --color -uprN orig/Tensile/cmake/TensileConfig.cmake Tensile-rocm-4.3.0/Tensile/cmake/TensileConfig.cmake
+--- orig/Tensile/cmake/TensileConfig.cmake 2021-08-18 17:48:00.115478470 +0800
++++ Tensile-rocm-4.3.0/Tensile/cmake/TensileConfig.cmake 2021-08-18 17:48:49.963478801 +0800
+@@ -234,6 +234,7 @@ function(TensileCreateLibraryFiles
+ COMMENT "Generating Tensile Libraries"
+ OUTPUT ${Tensile_EMBED_LIBRARY_SOURCE};${Tensile_MANIFEST_CONTENTS}
+ COMMAND ${CommandLine}
++ USES_TERMINAL
+ )
+
+ set("${Tensile_VAR_PREFIX}_ALL_FILES" ${Tensile_MANIFEST_CONTENTS} PARENT_SCOPE)
+diff --color -uprN orig/Tensile/Common.py Tensile-rocm-4.3.0/Tensile/Common.py
+--- orig/Tensile/Common.py 2021-08-18 17:48:00.075478470 +0800
++++ Tensile-rocm-4.3.0/Tensile/Common.py 2021-08-18 17:48:23.287478624 +0800
+@@ -179,7 +179,7 @@ globalParameters["PrintTensorD"] = 0
+ globalParameters["PrintTensorRef"] = 0 # Print reference tensor. 0x1=after init; 0x2=after copy-back; 0x3=both
+ globalParameters["PrintIndexAssignments"] = 0 # Print the tensor index assignment info
+ globalParameters["PrintWinnersOnly"] = False # Only print the solutions which become the fastest
+-globalParameters["PrintCodeCommands"] = False # print the commands used to generate the code objects (asm,link,hip-clang, etc)
++globalParameters["PrintCodeCommands"] = True # print the commands used to generate the code objects (asm,link,hip-clang, etc)
+ globalParameters["DumpTensors"] = False # If True, dump tensors to binary files instead of printing them.
+
+ # TODO - remove this when NewClient is mainstream
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/sci:master commit in: dev-util/Tensile/files/, dev-util/Tensile/
@ 2022-03-05 20:52 Andrew Ammerlaan
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Ammerlaan @ 2022-03-05 20:52 UTC (permalink / raw
To: gentoo-commits
commit: aa2ea880a86367c5a2eb8b1baa412a179f209b56
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 5 20:50:46 2022 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Mar 5 20:50:46 2022 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=aa2ea880
dev-util/Tensile: moved to ::gentoo
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
dev-util/Tensile/Tensile-4.0.0-r1.ebuild | 62 --------------
dev-util/Tensile/Tensile-4.0.0.ebuild | 62 --------------
dev-util/Tensile/Tensile-4.3.0.ebuild | 74 -----------------
dev-util/Tensile/files/Tensile-4.0.0-cmake.patch | 38 ---------
.../files/Tensile-4.0.0-locate-commands.patch | 62 --------------
.../files/Tensile-4.0.0-output-currentISA.patch | 22 -----
.../files/Tensile-4.0.0-setup.py-cmake.patch | 13 ---
...ensile-4.3.0-hsaco-compile-specified-arch.patch | 96 ----------------------
.../files/Tensile-4.3.0-output-commands.patch | 23 ------
dev-util/Tensile/metadata.xml | 11 ---
10 files changed, 463 deletions(-)
diff --git a/dev-util/Tensile/Tensile-4.0.0-r1.ebuild b/dev-util/Tensile/Tensile-4.0.0-r1.ebuild
deleted file mode 100644
index ec2a738d9..000000000
--- a/dev-util/Tensile/Tensile-4.0.0-r1.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-DISTUTILS_USE_SETUPTOOLS=rdepend
-
-inherit distutils-r1
-
-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"
-
-LICENSE="MIT"
-KEYWORDS="~amd64"
-SLOT="0"
-IUSE=""
-
-RDEPEND="${PYTHON_DEPS}
- dev-python/pyyaml[${PYTHON_USEDEP}]
- dev-python/msgpack[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
- dev-util/hip"
-
-PATCHES=( "${FILESDIR}"/${PN}-4.0.0-cmake.patch
- "${FILESDIR}"/${PN}-4.0.0-setup.py-cmake.patch
- "${FILESDIR}"/${PN}-4.0.0-locate-commands.patch
- "${FILESDIR}"/${PN}-4.0.0-output-currentISA.patch )
-
-S="${WORKDIR}/${PN}-rocm-${PV}"
-CMAKE_USE_DIR="${WORKDIR}/Source"
-
-src_prepare() {
- distutils-r1_src_prepare
-
- mv ${PN}/Source "${WORKDIR}"/ || die
- sed -e "/ROCM_SMI_ROOT/s,lib,$(get_libdir)," \
- -i "${WORKDIR}"/Source/cmake/FindROCmSMI.cmake || die
- sed -r -e "/TENSILE_USE_LLVM/s/ON/OFF/" \
- -i "${WORKDIR}"/Source/CMakeLists.txt || die
-
- mv ${PN}/cmake "${T}"/ || die
-
- sed -e "/HipClangVersion/s/0,0,0/$(ver_rs 1-3 ,)/" \
- -e "/SourcePath/s,os\.path\.join.*$,\"${EPREFIX}/usr/share/${PN}\"," \
- -i ${PN}/Common.py || die
-
- sed -e "s|os\.path\.dirname.*$|\"${EPREFIX}/usr/share/Tensile\", end='')|" \
- -i ${PN}/__init__.py || die
-}
-
-src_install() {
- distutils-r1_src_install
-
- insinto /usr/$(get_libdir)/cmake/${PN}
- doins "${T}"/cmake/*.cmake
-
- insinto /usr/share/${PN}
- doins -r "${WORKDIR}"/Source/*
- dosym . /usr/share/${PN}/Source
-}
diff --git a/dev-util/Tensile/Tensile-4.0.0.ebuild b/dev-util/Tensile/Tensile-4.0.0.ebuild
deleted file mode 100644
index eda97d225..000000000
--- a/dev-util/Tensile/Tensile-4.0.0.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-DISTUTILS_USE_SETUPTOOLS=rdepend
-
-inherit distutils-r1
-
-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"
-
-LICENSE="MIT"
-KEYWORDS="~amd64"
-SLOT="0"
-IUSE=""
-
-RDEPEND="${PYTHON_DEPS}
- dev-python/pyyaml[${PYTHON_USEDEP}]
- dev-python/msgpack[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
- dev-util/hip"
-
-PATCHES=( "${FILESDIR}"/${PN}-4.0.0-cmake.patch
- "${FILESDIR}"/${PN}-4.0.0-setup.py-cmake.patch
- "${FILESDIR}"/${PN}-4.0.0-locate-commands.patch
- "${FILESDIR}"/${PN}-4.0.0-output-currentISA.patch )
-
-S="${WORKDIR}/${PN}-rocm-${PVR}"
-CMAKE_USE_DIR="${WORKDIR}/Source"
-
-src_prepare() {
- distutils-r1_src_prepare
-
- mv ${PN}/Source "${WORKDIR}"/ || die
- sed -e "/ROCM_SMI_ROOT/s,lib,$(get_libdir)," \
- -i "${WORKDIR}"/Source/cmake/FindROCmSMI.cmake || die
- sed -r -e "/TENSILE_USE_LLVM/s/ON/OFF/" \
- -i "${WORKDIR}"/Source/CMakeLists.txt || die
-
- mv ${PN}/cmake "${T}"/ || die
-
- sed -e "/HipClangVersion/s/0,0,0/$(ver_rs 1-3 ,)/" \
- -e "/SourcePath/s,os\.path\.join.*$,\"${EPREFIX}/usr/share/${PN}\"," \
- -i ${PN}/Common.py || die
-
- sed -e "s|os\.path\.dirname.*$|\"${EPREFIX}/usr/share/Tensile\", end='')|" \
- -i ${PN}/__init__.py || die
-}
-
-src_install() {
- distutils-r1_src_install
-
- insinto /usr/$(get_libdir)/cmake/${PN}
- doins "${T}"/cmake/*.cmake
-
- insinto /usr/share/${PN}
- doins -r "${WORKDIR}"/Source/*
- dosym . /usr/share/${PN}/Source
-}
diff --git a/dev-util/Tensile/Tensile-4.3.0.ebuild b/dev-util/Tensile/Tensile-4.3.0.ebuild
deleted file mode 100644
index cf33fb19c..000000000
--- a/dev-util/Tensile/Tensile-4.3.0.ebuild
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-DISTUTILS_USE_PEP517=setuptools
-inherit distutils-r1
-
-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"
-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}]
-"
-DEPEND="${RDEPEND}
- dev-util/hip:${SLOT}
-"
-BDEPEND="test? (
- dev-util/rocminfo:${SLOT}
-)"
-
-PATCHES=(
- "${FILESDIR}/Tensile-${PV}-hsaco-compile-specified-arch.patch" # backported from upstream, should remove after 4.3.0
- "${FILESDIR}/Tensile-4.3.0-output-commands.patch"
-)
-
-CMAKE_USE_DIR="${WORKDIR}/Source"
-
-distutils_enable_tests pytest
-
-src_prepare() {
- distutils-r1_src_prepare
-
- mv ${PN}/Source "${WORKDIR}"/ || die
- sed -e "/ROCM_SMI_ROOT/s,lib,$(get_libdir)," \
- -i "${WORKDIR}"/Source/cmake/FindROCmSMI.cmake || die
- sed -r -e "/TENSILE_USE_LLVM/s/ON/OFF/" \
- -i "${WORKDIR}"/Source/CMakeLists.txt || die
-
- sed -e "/HipClangVersion/s/0,0,0/$(ver_rs 1-3 ,)/" \
- -e "/SourcePath/s,os\.path\.join.*$,\"${EPREFIX}/usr/share/${PN}\"," \
- -i ${PN}/Common.py || die
-
- sed -e "s|os\.path\.dirname.*$|\"${EPREFIX}/usr/share/Tensile\", end='')|" \
- -i ${PN}/__init__.py || die
-}
-
-src_test() {
- ROCM_PATH="${EPREFIX}/usr/" distutils-r1_src_test
-}
-
-src_install() {
- distutils-r1_src_install
-
- # Move the cmake files to the correct directory
- mkdir -p "${ED}/usr/$(get_libdir)/cmake/${PN}" || die
- mv "${ED}/usr/cmake/"* "${ED}/usr/$(get_libdir)/cmake/${PN}" || die
- rm -r "${ED}/usr/cmake" || die
-
- insinto /usr/share/${PN}
- doins -r "${WORKDIR}"/Source/*
- dosym . /usr/share/${PN}/Source
-}
diff --git a/dev-util/Tensile/files/Tensile-4.0.0-cmake.patch b/dev-util/Tensile/files/Tensile-4.0.0-cmake.patch
deleted file mode 100644
index 0c39f747c..000000000
--- a/dev-util/Tensile/files/Tensile-4.0.0-cmake.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Index: Tensile-rocm-4.0.0/Tensile/cmake/TensileConfig.cmake
-===================================================================
---- Tensile-rocm-4.0.0.orig/Tensile/cmake/TensileConfig.cmake
-+++ Tensile-rocm-4.0.0/Tensile/cmake/TensileConfig.cmake
-@@ -26,7 +26,7 @@ if(NOT DEFINED Tensile_ROOT)
- get_filename_component(Tensile_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
- get_filename_component(Tensile_PREFIX "${Tensile_PREFIX}" PATH)
-
--execute_process(COMMAND "${Tensile_PREFIX}/bin/TensileGetPath" OUTPUT_VARIABLE Tensile_ROOT)
-+execute_process(COMMAND "TensileGetPath" OUTPUT_VARIABLE Tensile_ROOT)
- endif()
- list(APPEND CMAKE_MODULE_PATH "${Tensile_ROOT}/Source/cmake/")
- list(APPEND CMAKE_MODULE_PATH "${Tensile_ROOT}/Source/")
-@@ -93,7 +93,7 @@ function(TensileCreateLibraryFiles
- set(Tensile_MERGE_FILES OFF)
- endif()
-
-- set(Script "${Tensile_ROOT}/bin/TensileCreateLibrary")
-+ set(Script "TensileCreateLibrary")
- message(STATUS "Tensile script: ${Script}")
-
- set(Options "--new-client-only" "--no-legacy-components")
-Index: Tensile-rocm-4.0.0/Tensile/Source/TensileCreateLibrary.cmake
-===================================================================
---- Tensile-rocm-4.0.0.orig/Tensile/Source/TensileCreateLibrary.cmake
-+++ Tensile-rocm-4.0.0/Tensile/Source/TensileCreateLibrary.cmake
-@@ -52,10 +52,7 @@ function(TensileCreateLibraryCmake
- message(STATUS "Tensile_ARCHITECTURE from TensileCreateLibraryCmake : ${Tensile_ARCHITECTURE}")
- message(STATUS "Tensile_LIBRARY_FORMAT from TensileCreateLibraryCmake : ${Tensile_LIBRARY_FORMAT}")
-
-- execute_process(COMMAND chmod 755 ${Tensile_ROOT}/bin/TensileCreateLibrary)
-- execute_process(COMMAND chmod 755 ${Tensile_ROOT}/bin/Tensile)
--
-- set(Tensile_CREATE_COMMAND "${Tensile_ROOT}/bin/TensileCreateLibrary")
-+ set(Tensile_CREATE_COMMAND "TensileCreateLibrary")
-
- set(Tensile_SOURCE_PATH "${PROJECT_BINARY_DIR}/Tensile")
- message(STATUS "Tensile_SOURCE_PATH=${Tensile_SOURCE_PATH}")
diff --git a/dev-util/Tensile/files/Tensile-4.0.0-locate-commands.patch b/dev-util/Tensile/files/Tensile-4.0.0-locate-commands.patch
deleted file mode 100644
index 78d467349..000000000
--- a/dev-util/Tensile/files/Tensile-4.0.0-locate-commands.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Index: Tensile-rocm-4.0.0/Tensile/Common.py
-===================================================================
---- Tensile-rocm-4.0.0.orig/Tensile/Common.py
-+++ Tensile-rocm-4.0.0/Tensile/Common.py
-@@ -155,7 +155,7 @@ globalParameters["PrintTensorRef"] = 0
- globalParameters["PrintIndexAssignments"] = 0 # Print the tensor index assignment info
- globalParameters["PrintTensorRef"] = 0 # Print reference tensor. 0x1=after init; 0x2=after copy-back; 0x3=both
- globalParameters["PrintWinnersOnly"] = False # Only print the solutions which become the fastest
--globalParameters["PrintCodeCommands"] = False # print the commands used to generate the code objects (asm,link,hip-clang, etc)
-+globalParameters["PrintCodeCommands"] = True # print the commands used to generate the code objects (asm,link,hip-clang, etc)
-
- # TODO - remove this when NewClient is mainstream
- globalParameters["OldClientSourceTmp"] = True # Use an intermediate sourceTmp dir to detect file changes and minimize rebuilds on old client
-@@ -1521,14 +1521,14 @@ def assignGlobalParameters( config ):
- print2(" %24s: %8s (unspecified)" % (key, defaultValue))
-
- # ROCm Agent Enumerator Path
-- globalParameters["ROCmAgentEnumeratorPath"] = locateExe("/opt/rocm/bin", "rocm_agent_enumerator")
-+ globalParameters["ROCmAgentEnumeratorPath"] = locateExe("", "rocm_agent_enumerator")
- if "CxxCompiler" in config:
- globalParameters["CxxCompiler"] = config["CxxCompiler"]
-
- if "TENSILE_ROCM_ASSEMBLER_PATH" in os.environ:
- globalParameters["AssemblerPath"] = os.environ.get("TENSILE_ROCM_ASSEMBLER_PATH")
- elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hipcc":
-- globalParameters["AssemblerPath"] = locateExe("/opt/rocm/llvm/bin", "clang++")
-+ globalParameters["AssemblerPath"] = locateExe("", "clang++")
- elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hcc":
- globalParameters["AssemblerPath"] = locateExe("/opt/rocm/bin", "hcc")
-
-@@ -1536,8 +1536,8 @@ def assignGlobalParameters( config ):
- if globalParameters["CxxCompiler"] == "hcc":
- globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/bin", "extractkernel")
- else:
-- globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/hip/bin", "extractkernel")
-- globalParameters["ClangOffloadBundlerPath"] = locateExe("/opt/rocm/llvm/bin", "clang-offload-bundler")
-+ globalParameters["ExtractKernelPath"] = locateExe("", "extractkernel")
-+ globalParameters["ClangOffloadBundlerPath"] = locateExe("", "clang-offload-bundler")
-
- if "ROCmAgentEnumeratorPath" in config:
- globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]
-@@ -1579,20 +1579,6 @@ def assignGlobalParameters( config ):
- # Due to platform.linux_distribution() being deprecated, just try to run dpkg regardless.
- # The alternative would be to install the `distro` package.
- # See https://docs.python.org/3.7/library/platform.html#platform.linux_distribution
-- try:
-- if globalParameters["CxxCompiler"] == "hipcc":
-- output = subprocess.run(["dpkg", "-l", "hip-rocclr"], check=True, stdout=subprocess.PIPE).stdout.decode()
-- elif globalParameters["CxxCompiler"] == "hcc":
-- output = subprocess.run(["dpkg", "-l", "hcc"], check=True, stdout=subprocess.PIPE).stdout.decode()
--
-- for line in output.split('\n'):
-- if 'hipcc' in line:
-- globalParameters['HipClangVersion'] = line.split()[2]
-- elif 'hcc' in line:
-- globalParameters['HccVersion'] = line.split()[2]
--
-- except (subprocess.CalledProcessError, OSError) as e:
-- printWarning("Error: {} looking for package {}: {}".format('dpkg', 'hip-rocclr', e))
-
- for key in config:
- value = config[key]
diff --git a/dev-util/Tensile/files/Tensile-4.0.0-output-currentISA.patch b/dev-util/Tensile/files/Tensile-4.0.0-output-currentISA.patch
deleted file mode 100644
index a00f9fdca..000000000
--- a/dev-util/Tensile/files/Tensile-4.0.0-output-currentISA.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: Tensile-rocm-4.0.0/Tensile/TensileCreateLibrary.py
-===================================================================
---- Tensile-rocm-4.0.0.orig/Tensile/TensileCreateLibrary.py
-+++ Tensile-rocm-4.0.0/Tensile/TensileCreateLibrary.py
-@@ -132,7 +132,7 @@ def buildSourceCodeObjectFile(CxxCompile
- return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
- globalParameters["AsmCaps"][arch]["SupportedSource"]
-
-- archs = ['gfx'+''.join(map(str,arch)) for arch in globalParameters['SupportedISA'] \
-+ archs = ['gfx'+''.join(map(str,arch)) for arch in [globalParameters['CurrentISA']] \
- if isSupported(arch)]
-
- archFlags = ['--amdgpu-target=' + arch for arch in archs]
-@@ -1004,7 +1004,7 @@ def buildObjectFileNames(solutionWriter,
- kernelHelperOjbNmaes = [ko.getKernelName() for ko in kernelHelperOjbs]
-
- # Source based kernels are built for all supported architectures
-- sourceArchs = ['gfx'+''.join(map(str,arch)) for arch in globalParameters['SupportedISA'] \
-+ sourceArchs = ['gfx'+''.join(map(str,arch)) for arch in [globalParameters['CurrentISA']] \
- if isSupported(arch)]
-
- # Asm based kernels target the configured ISA
diff --git a/dev-util/Tensile/files/Tensile-4.0.0-setup.py-cmake.patch b/dev-util/Tensile/files/Tensile-4.0.0-setup.py-cmake.patch
deleted file mode 100644
index e020842b2..000000000
--- a/dev-util/Tensile/files/Tensile-4.0.0-setup.py-cmake.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: Tensile-rocm-4.0.0/setup.py
-===================================================================
---- Tensile-rocm-4.0.0.orig/setup.py
-+++ Tensile-rocm-4.0.0/setup.py
-@@ -30,8 +30,6 @@ setup(
- install_requires=readRequirementsFromTxt(),
- python_requires='>=3.5',
- packages=["Tensile"],
-- package_data={ "Tensile": ["Tensile/cmake/*"] },
-- data_files=[ ("cmake", ["Tensile/cmake/TensileConfig.cmake", "Tensile/cmake/TensileConfigVersion.cmake"]) ],
- include_package_data=True,
- entry_points={"console_scripts": [
- # user runs a benchmark
diff --git a/dev-util/Tensile/files/Tensile-4.3.0-hsaco-compile-specified-arch.patch b/dev-util/Tensile/files/Tensile-4.3.0-hsaco-compile-specified-arch.patch
deleted file mode 100644
index 8e6753781..000000000
--- a/dev-util/Tensile/files/Tensile-4.3.0-hsaco-compile-specified-arch.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-https://github.com/ROCmSoftwarePlatform/Tensile/issues/1395
-https://github.com/ROCmSoftwarePlatform/Tensile/pull/1398
-
---- a/Tensile/TensileCreateLibrary.py
-+++ b/Tensile/TensileCreateLibrary.py
-@@ -136,6 +136,35 @@ def which(p):
- return candidate
- return None
-
-+def splitArchs():
-+ # Helper for architecture
-+ def isSupported(arch):
-+ return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
-+ globalParameters["AsmCaps"][arch]["SupportedSource"]
-+
-+ if ";" in globalParameters["Architecture"]:
-+ wantedArchs = globalParameters["Architecture"].split(";")
-+ else:
-+ wantedArchs = globalParameters["Architecture"].split("_")
-+ archs = []
-+ cmdlineArchs = []
-+ if "all" in wantedArchs:
-+ for arch in globalParameters['SupportedISA']:
-+ if isSupported(arch):
-+ if (arch == (9,0,6) or arch == (9,0,8) or arch == (9,0,10)):
-+ if (arch == (9,0,10)):
-+ archs += [gfxName(arch) + '-xnack+']
-+ cmdlineArchs += [gfxName(arch) + ':xnack+']
-+ archs += [gfxName(arch) + '-xnack-']
-+ cmdlineArchs += [gfxName(arch) + ':xnack-']
-+ else:
-+ archs += [gfxName(arch)]
-+ cmdlineArchs += [gfxName(arch)]
-+ else:
-+ for arch in wantedArchs:
-+ archs += [re.sub(":", "-", arch)]
-+ cmdlineArchs += [arch]
-+ return archs, cmdlineArchs
-
- def buildSourceCodeObjectFile(CxxCompiler, outputPath, kernelFile):
- buildPath = ensurePath(os.path.join(globalParameters['WorkingPath'], 'code_object_tmp'))
-@@ -149,24 +178,8 @@ def buildSourceCodeObjectFile(CxxCompiler, outputPath, kernelFile):
- objectFilename = base + '.o'
- soFilename = base + '.so'
-
-- def isSupported(arch):
-- return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
-- globalParameters["AsmCaps"][arch]["SupportedSource"]
--
- if (CxxCompiler == "hipcc"):
-- archs = []
-- cmdlineArchs = []
-- for arch in globalParameters['SupportedISA']:
-- if isSupported(arch):
-- if (arch == (9,0,6) or arch == (9,0,8) or arch == (9,0,10)):
-- if (arch == (9,0,10)):
-- archs += [gfxName(arch) + '-xnack+']
-- cmdlineArchs += [gfxName(arch) + ':xnack+']
-- archs += [gfxName(arch) + '-xnack-']
-- cmdlineArchs += [gfxName(arch) + ':xnack-']
-- else:
-- archs += [gfxName(arch)]
-- cmdlineArchs += [gfxName(arch)]
-+ archs, cmdlineArchs = splitArchs()
-
- archFlags = ['--offload-arch=' + arch for arch in cmdlineArchs]
-
-@@ -1063,11 +1076,6 @@ def buildObjectFileNames(solutionWriter, kernelWriterSource, kernelWriterAssembl
- sourceKernels = list([k for k in kernels if k['KernelLanguage'] == 'Source'])
- asmKernels = list([k for k in kernels if k['KernelLanguage'] == 'Assembly'])
-
-- # Helper for architecture
-- def isSupported(arch):
-- return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
-- globalParameters["AsmCaps"][arch]["SupportedSource"]
--
- # Build a list of kernel object names.
- for kernel in sourceKernels:
- sourceKernelNames += [kernelWriterSource.getKernelFileBase(kernel)]
-@@ -1081,15 +1089,7 @@ def buildObjectFileNames(solutionWriter, kernelWriterSource, kernelWriterAssembl
-
- # Source based kernels are built for all supported architectures
- if (cxxCompiler == 'hipcc'):
-- sourceArchs = []
-- for arch in globalParameters['SupportedISA']:
-- if isSupported(arch):
-- if (arch == (9,0,6) or arch == (9,0,8) or arch == (9,0,10)):
-- if (arch == (9,0,10)):
-- sourceArchs += [gfxName(arch) + '-xnack+']
-- sourceArchs += [gfxName(arch) + '-xnack-']
-- else:
-- sourceArchs += [gfxName(arch)]
-+ sourceArchs, _ = splitArchs()
- else:
- raise RuntimeError("Unknown compiler %s" % cxxCompiler)
-
diff --git a/dev-util/Tensile/files/Tensile-4.3.0-output-commands.patch b/dev-util/Tensile/files/Tensile-4.3.0-output-commands.patch
deleted file mode 100644
index be5a4db21..000000000
--- a/dev-util/Tensile/files/Tensile-4.3.0-output-commands.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --color -uprN orig/Tensile/cmake/TensileConfig.cmake Tensile-rocm-4.3.0/Tensile/cmake/TensileConfig.cmake
---- orig/Tensile/cmake/TensileConfig.cmake 2021-08-18 17:48:00.115478470 +0800
-+++ Tensile-rocm-4.3.0/Tensile/cmake/TensileConfig.cmake 2021-08-18 17:48:49.963478801 +0800
-@@ -234,6 +234,7 @@ function(TensileCreateLibraryFiles
- COMMENT "Generating Tensile Libraries"
- OUTPUT ${Tensile_EMBED_LIBRARY_SOURCE};${Tensile_MANIFEST_CONTENTS}
- COMMAND ${CommandLine}
-+ USES_TERMINAL
- )
-
- set("${Tensile_VAR_PREFIX}_ALL_FILES" ${Tensile_MANIFEST_CONTENTS} PARENT_SCOPE)
-diff --color -uprN orig/Tensile/Common.py Tensile-rocm-4.3.0/Tensile/Common.py
---- orig/Tensile/Common.py 2021-08-18 17:48:00.075478470 +0800
-+++ Tensile-rocm-4.3.0/Tensile/Common.py 2021-08-18 17:48:23.287478624 +0800
-@@ -179,7 +179,7 @@ globalParameters["PrintTensorD"] = 0
- globalParameters["PrintTensorRef"] = 0 # Print reference tensor. 0x1=after init; 0x2=after copy-back; 0x3=both
- globalParameters["PrintIndexAssignments"] = 0 # Print the tensor index assignment info
- globalParameters["PrintWinnersOnly"] = False # Only print the solutions which become the fastest
--globalParameters["PrintCodeCommands"] = False # print the commands used to generate the code objects (asm,link,hip-clang, etc)
-+globalParameters["PrintCodeCommands"] = True # print the commands used to generate the code objects (asm,link,hip-clang, etc)
- globalParameters["DumpTensors"] = False # If True, dump tensors to binary files instead of printing them.
-
- # TODO - remove this when NewClient is mainstream
diff --git a/dev-util/Tensile/metadata.xml b/dev-util/Tensile/metadata.xml
deleted file mode 100644
index 336bdb639..000000000
--- a/dev-util/Tensile/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
-<pkgmetadata>
- <maintainer type="project">
- <email>sci@gentoo.org</email>
- </maintainer>
- <maintainer type="person">
- <email>gentoo@holzke.net</email>
- <name>Wilfried Holzke</name>
- </maintainer>
-</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-05 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-05 14:43 [gentoo-commits] proj/sci:master commit in: dev-util/Tensile/files/, dev-util/Tensile/ Andrew Ammerlaan
-- strict thread matches above, loose matches on Subject: below --
2022-03-05 20:52 Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox