diff options
Diffstat (limited to 'dev-util/Tensile')
-rw-r--r-- | dev-util/Tensile/Manifest | 6 | ||||
-rw-r--r-- | dev-util/Tensile/Tensile-4.3.0-r1.ebuild | 86 | ||||
-rw-r--r-- | dev-util/Tensile/Tensile-4.3.0.ebuild | 74 | ||||
-rw-r--r-- | dev-util/Tensile/files/Tensile-4.3.0-fix-arch-parse.patch | 12 | ||||
-rw-r--r-- | dev-util/Tensile/files/Tensile-4.3.0-gentoopath.patch | 62 | ||||
-rw-r--r-- | dev-util/Tensile/files/Tensile-4.3.0-gfx1031.patch | 119 | ||||
-rw-r--r-- | dev-util/Tensile/files/Tensile-4.3.0-use-ninja.patch | 21 |
7 files changed, 305 insertions, 75 deletions
diff --git a/dev-util/Tensile/Manifest b/dev-util/Tensile/Manifest index b873575497a2..6972e0b87371 100644 --- a/dev-util/Tensile/Manifest +++ b/dev-util/Tensile/Manifest @@ -1,5 +1,9 @@ +AUX Tensile-4.3.0-fix-arch-parse.patch 424 BLAKE2B ac89228abe3173a4cabcb90a679be3706a39cf6bebc448fb17dc9a94be5c5c75289e53fb867c17a3bc36330079905302a83736663d2f743c9805c97253b9fec0 SHA512 131e9fa7c39f12fbbbc37ace0d29162ff2805e8435985d3edab7e678d89587a2ee9cc1549eee21842c42e99e4a4fba3125fa34fec3dbc9f61cff96d8eeaf5b25 +AUX Tensile-4.3.0-gentoopath.patch 2770 BLAKE2B 72f5d6ae4f447603f2e02bba8ac25bbc85382327ac4e15c2978c2bdd5ab7ff937e71e1dab006d548fd104eb4401b878ba5a67acfc535b456eee532836c90eb1c SHA512 030c616fc12fc25d4749f6bd9914afd6be6844ba44796e928183031e6f5dd98df238379a7b26225306233798b5d32ab1b4cf28f39775b2b7a17040c4f704106f +AUX Tensile-4.3.0-gfx1031.patch 7037 BLAKE2B ea2e5dec9d5f6749a78cae4d1659a08b712e548cdca29dabde29f52a60f443eac0c10bac27667545816e5b6b89835ee5e79d766028bad79ba17e5b14a4bf5ea9 SHA512 2b1936a6e5b52bf2f6aaa70255be9f78e82329f7855a3db56d769fed13934ca2c2671f089bc5aea43c4a0e67d3ec8ad185e32f7ade03c515b3c74a683568b192 AUX Tensile-4.3.0-hsaco-compile-specified-arch.patch 3859 BLAKE2B 4590978cff0fdb0501ba2405615775cb3f8900ce164c3d57cc59dfe82e1adc25376b6463855a045f5e0652cc985b0015566b95ff28327c59f2db875a84cb49b3 SHA512 57520f1d46f46c7cfd5b8c3ae307da07695c19479b687ce994ad9fba2e755ed7c776c3d8bee8e0642c7613a5d53d8469f329b1eb07563c13d2f7bda8b3d36687 AUX Tensile-4.3.0-output-commands.patch 1629 BLAKE2B c43395d8e8aeb956d5eb84c8a34ad4b995ed32499ceababeb22d5ca3ac5ee6e8ef353a1467a77943a441f0840b9a6ad1f53202ec8673ef3753aa2bec1395fec4 SHA512 45bdae1d87f6e31d337b22f146b9dee25f4f87357c6ac52bd843556dd742431db10efb55fb8ef815cc9941b5b9f05970d43a6fec0f2d9195c30c633e33d138bf +AUX Tensile-4.3.0-use-ninja.patch 957 BLAKE2B cb919b224aaeb3b9d65a755ff0688aa823b70361d2ee940d62f33828c118a60c88cd0f108b6e34b22097d9c4c5122a4db2808332a97cd6e7685a4447570b7552 SHA512 3d206a093e870fc95f0ed42e08691144589112d4581f73ba1c4c74ed9bdad0812ec4f67a6076a8a3ac9ab89c61c70f1baaedb774e0908177473be2d206858bf4 DIST rocm-Tensile-4.3.0.tar.gz 14250149 BLAKE2B 030138eaca2a0aadd96801e6dbd72e510716dd90553ef3795c5e04e00a34a05ecae82b24f755e4033a4acfcdb1cf26291da1e7902bb090f89a010d403e832beb SHA512 126db0b413c716fba8d5be9bff7a44fd1badacbf32f3db8d0db649819177db37ebd56fd22dd3c809655f5d29675be115e698cd10bc3d0b4b23878ae3726fce47 -EBUILD Tensile-4.3.0.ebuild 1995 BLAKE2B 66474ff936214aeede2613b80522a2bd376216115b7c0cdbb046443b81146226d8ca0c2ea7c4f28661dfd1ed0e94e9e225211acc1a21ba8f74107819cb00ca8b SHA512 ca29d0652e6ee50f287def381ea44cb4e6657a73e03e4c030c24b9ddf8ea95256e11891896e14b6498c4b9eebc5d20388045927c701fc62be7dcdcd67c385b11 +EBUILD Tensile-4.3.0-r1.ebuild 2730 BLAKE2B ecbed69974d2d179cf0309c8265d394dfbfcd4ea9ef77448f4d4553aa51569bb5dced2c3404b387621e42037e62ed28b4de9ca0db472e4265f0f6b28e1dd630a SHA512 136eb9243bde86b66509d6e91b78a74a1e50727387eef515726efa9258f9e94a503a272bad4e5eeab30867b58522441d50a3dbcfec496197c3d2feee8469b2dd MISC metadata.xml 349 BLAKE2B 363f31b1d597e4c4959c588c9765154049c7c9692bbd64a0736226261b6232c75af7cbf255de59813cd10b9d45b30cf08d4ad0eb1422bf956264377a58002340 SHA512 d83250993581f9b23b43b8553cf46fe75411232ca7ec18c32c070d6acb0f9c7a01769755a3f11b4c5aafe40a63ee0c3817fc45dd01325ce02bbf557d5ab0cdea diff --git a/dev-util/Tensile/Tensile-4.3.0-r1.ebuild b/dev-util/Tensile/Tensile-4.3.0-r1.ebuild new file mode 100644 index 000000000000..143867819d04 --- /dev/null +++ b/dev-util/Tensile/Tensile-4.3.0-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..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}] + >=dev-util/rocm-smi-4.3.0 +" +DEPEND="${RDEPEND} + dev-util/hip:${SLOT} +" + +PATCHES=( "${FILESDIR}"/${PN}-4.3.0-output-commands.patch + "${FILESDIR}"/${PN}-4.3.0-hsaco-compile-specified-arch.patch + "${FILESDIR}"/${PN}-4.3.0-gfx1031.patch + "${FILESDIR}"/${PN}-4.3.0-fix-arch-parse.patch + "${FILESDIR}"/${PN}-4.3.0-use-ninja.patch + "${FILESDIR}"/${PN}-4.3.0-gentoopath.patch + ) + +src_prepare() { + distutils-r1_src_prepare + + 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)/" \ + -e "/SourcePath/s,globalParameters\[\"ScriptPath\"\],${Tensile_share_dir}," \ + -i Common.py || die + + sed -e "/CMAKE_CXX_COMPILER/s,globalParameters\[\"ROCmBinPath\"\],\"${EPREFIX}/usr/lib/hip/bin\"," -i ClientExecutable.py || die + + sed -e "/scriptDir/s,os.path.dirname(os.path.realpath(__file__)),${Tensile_share_dir}," -i ReplacementKernels.py || die + + sed -e "s,os.path.dirname(os.path.realpath(__file__)),${Tensile_share_dir},g" -i ${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 + 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 + insinto /usr/$(get_libdir)/cmake/${PN} + doins cmake/*.cmake +} 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 cf33fb19cf10..000000000000 --- 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.3.0-fix-arch-parse.patch b/dev-util/Tensile/files/Tensile-4.3.0-fix-arch-parse.patch new file mode 100644 index 000000000000..01b94b32cb6e --- /dev/null +++ b/dev-util/Tensile/files/Tensile-4.3.0-fix-arch-parse.patch @@ -0,0 +1,12 @@ +Index: Tensile-rocm-4.3.0/Tensile/Tensile.py +=================================================================== +--- Tensile-rocm-4.3.0.orig/Tensile/Tensile.py ++++ Tensile-rocm-4.3.0/Tensile/Tensile.py +@@ -97,7 +97,6 @@ def addCommonArguments(argParser): + """ + + (key, value) = par.split("=") +- value = eval(value) + return (key, value) + + argParser.add_argument("-d", "--device", dest="device", type=int, \ diff --git a/dev-util/Tensile/files/Tensile-4.3.0-gentoopath.patch b/dev-util/Tensile/files/Tensile-4.3.0-gentoopath.patch new file mode 100644 index 000000000000..6fda0ddc6a8d --- /dev/null +++ b/dev-util/Tensile/files/Tensile-4.3.0-gentoopath.patch @@ -0,0 +1,62 @@ +Index: Tensile-rocm-4.3.0/Tensile/Source/client/CMakeLists.txt +=================================================================== +--- Tensile-rocm-4.3.0.orig/Tensile/Source/client/CMakeLists.txt ++++ Tensile-rocm-4.3.0/Tensile/Source/client/CMakeLists.txt +@@ -50,3 +50,5 @@ endif() + foreach(arch IN LISTS TENSILE_GPU_ARCHS) + target_link_libraries(tensile_client PRIVATE "--amdgpu-target=${arch}") + endforeach(arch) ++ ++target_link_libraries(tensile_client PRIVATE LLVMSupport) +Index: Tensile-rocm-4.3.0/Tensile/Source/lib/CMakeLists.txt +=================================================================== +--- Tensile-rocm-4.3.0.orig/Tensile/Source/lib/CMakeLists.txt ++++ Tensile-rocm-4.3.0/Tensile/Source/lib/CMakeLists.txt +@@ -48,7 +48,7 @@ set(tensile_sources ${tensile_sources} + ) + + if(TENSILE_USE_LLVM) +- find_package(LLVM 13.0 QUIET CONFIG) ++ find_package(LLVM PATHS /opt/gentoo/usr/lib/llvm/roc QUIET CONFIG) + if(NOT LLVM_FOUND) + find_package(LLVM 12.0 QUIET CONFIG) + if(NOT LLVM_FOUND) +Index: Tensile-rocm-4.3.0/Tensile/Common.py +=================================================================== +--- Tensile-rocm-4.3.0.orig/Tensile/Common.py ++++ Tensile-rocm-4.3.0/Tensile/Common.py +@@ -1667,7 +1667,7 @@ def assignGlobalParameters( config ): + else: + print2(" %24s: %8s (unspecified)" % (key, defaultValue)) + +- globalParameters["ROCmPath"] = "/opt/rocm" ++ globalParameters["ROCmPath"] = "/opt/gentoo/usr" + if "ROCM_PATH" in os.environ: + globalParameters["ROCmPath"] = os.environ.get("ROCM_PATH") + if "TENSILE_ROCM_PATH" in os.environ: +Index: Tensile-rocm-4.3.0/Tensile/ClientWriter.py +=================================================================== +--- Tensile-rocm-4.3.0.orig/Tensile/ClientWriter.py ++++ Tensile-rocm-4.3.0/Tensile/ClientWriter.py +@@ -284,7 +284,7 @@ def getBuildNewClientLibraryScript(build + import io + runScriptFile = io.StringIO() + +- callCreateLibraryCmd = globalParameters["ScriptPath"] + "/bin/TensileCreateLibrary" ++ callCreateLibraryCmd = "TensileCreateLibrary" + + + if globalParameters["MergeFiles"]: +Index: Tensile-rocm-4.3.0/Tensile/GenerateSummations.py +=================================================================== +--- Tensile-rocm-4.3.0.orig/Tensile/GenerateSummations.py ++++ Tensile-rocm-4.3.0/Tensile/GenerateSummations.py +@@ -57,7 +57,7 @@ def createLibraryForBenchmark(logicPath, + Selection. + """ + +- pythonExePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin", "TensileCreateLibrary") ++ pythonExePath = "TensileCreateLibrary" + args = [pythonExePath, \ + "--merge-files", "--no-legacy-components", \ + "--new-client-only", "--no-short-file-names", "--no-library-print-debug", "--architecture=all", \ diff --git a/dev-util/Tensile/files/Tensile-4.3.0-gfx1031.patch b/dev-util/Tensile/files/Tensile-4.3.0-gfx1031.patch new file mode 100644 index 000000000000..99abceb7c44d --- /dev/null +++ b/dev-util/Tensile/files/Tensile-4.3.0-gfx1031.patch @@ -0,0 +1,119 @@ +--- Tensile-rocm-4.3.0/pytest.ini 2021-04-22 22:35:33.000000000 +0800 ++++ Tensile-rocm-4.3.0/pytest.ini 2021-09-30 17:32:21.382806851 +0800 +@@ -88,6 +88,7 @@ + xfail-gfx1011: architecture + xfail-gfx1012: architecture + xfail-gfx1030: architecture ++ xfail-gfx1031: architecture + skip-gfx000: architecture + skip-gfx900: architecture + skip-gfx906: architecture +@@ -97,3 +98,4 @@ + skip-gfx1011: architecture + skip-gfx1012: architecture + skip-gfx1030: architecture ++ skip-gfx1031: architecture +--- Tensile-rocm-4.3.0/Tensile/Common.py 2021-10-05 14:41:22.490754124 +0800 ++++ Tensile-rocm-4.3.0/Tensile/Common.py 2021-09-30 17:33:19.041724015 +0800 +@@ -200,7 +200,7 @@ + globalParameters["MergeFiles"] = True # F=store every solution and kernel in separate file; T=store all solutions in single file + + globalParameters["MaxFileName"] = 64 # If a file name would be longer than this, shorten it with a hash. ++globalParameters["SupportedISA"] = [(8,0,3), (9,0,0), (9,0,6), (9,0,8), (9,0,10), (10,1,0), (10,1,1), (10,1,2), (10,3,0),(10,3,1)] # assembly kernels writer supports these architectures +-globalParameters["SupportedISA"] = [(8,0,3), (9,0,0), (9,0,6), (9,0,8), (9,0,10), (10,1,0), (10,1,1), (10,1,2), (10,3,0)] # assembly kernels writer supports these architectures + + globalParameters["GenerateManifestAndExit"] = False # Output manifest file with list of expected library objects and exit + globalParameters["ClientBuildPath"] = "0_Build" # subdirectory for host code build directory +@@ -265,7 +265,7 @@ + 'gfx906':'vega20', 'gfx906:xnack+':'vega20', 'gfx906:xnack-':'vega20', + 'gfx908':'arcturus','gfx908:xnack+':'arcturus', 'gfx908:xnack-':'arcturus', + 'gfx90a':'aldebaran', 'gfx90a:xnack+':'aldebaran', 'gfx90a:xnack-':'aldebaran', ++ 'gfx1010':'navi10', 'gfx1011':'navi11', 'gfx1012':'navi12', 'gfx1030':'navi21', 'gfx1031':'navi22', +- 'gfx1010':'navi10', 'gfx1011':'navi11', 'gfx1012':'navi12', 'gfx1030':'navi21' + } + + def getArchitectureName(gfxName): +--- Tensile-rocm-4.3.0/Tensile/KernelWriterAssembly.py 2021-04-22 22:35:33.000000000 +0800 ++++ Tensile-rocm-4.3.0/Tensile/KernelWriterAssembly.py 2021-09-30 17:27:06.696711144 +0800 +@@ -2257,7 +2257,7 @@ + + # integer i8x4 + elif kernel["ProblemType"]["DataType"].isInt8x4(): ++ if self.version == (9,0,6) or self.version == (9,0,8) or self.version == (9,0,10) or self.version == (10,3,0) or self.version == (10,3,1): +- if self.version == (9,0,6) or self.version == (9,0,8) or self.version == (9,0,10) or self.version == (10,3,0): + for b in range(0, kernel["ThreadTile1"]): + for a in range(0, kernel["ThreadTile0"]): + for iui in range(0, innerUnroll): +--- Tensile-rocm-4.3.0/Tensile/Source/CMakeLists.txt 2021-04-22 22:35:33.000000000 +0800 ++++ Tensile-rocm-4.3.0/Tensile/Source/CMakeLists.txt 2021-09-30 17:29:12.846345541 +0800 +@@ -51,7 +51,7 @@ + endif() + + if(CMAKE_CXX_COMPILER STREQUAL "hipcc") ++ set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 CACHE STRING "GPU architectures") +- set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030 CACHE STRING "GPU architectures") + else() + set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906 gfx908 gfx90a CACHE STRING "GPU architectures") + endif() +@@ -104,7 +104,7 @@ + set_property( CACHE Tensile_CODE_OBJECT_VERSION PROPERTY STRINGS V2 V3) + set_property( CACHE Tensile_COMPILER PROPERTY STRINGS hipcc) + set(Tensile_ARCHITECTURE all CACHE STRING "Which GPU architecture to use") ++ set_property( CACHE Tensile_ARCHITECTURE PROPERTY STRINGS all gfx000 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030 gfx1031) +- set_property( CACHE Tensile_ARCHITECTURE PROPERTY STRINGS all gfx000 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030) + set_property( CACHE Tensile_LIBRARY_FORMAT PROPERTY STRINGS yaml msgpack) + + message( STATUS "Tensile_CODE_OBJECT_VERSION from Tensile/Source/CMakeLists.txt: ${Tensile_CODE_OBJECT_VERSION}") +@@ -206,7 +206,7 @@ + ${Tensile_RUNTIME_LANGUAGE} # HIP or OCL + ${Tensile_COMPILER} # hipcc + ${Tensile_CODE_OBJECT_VERSION} # V2 or V3 ++ ${Tensile_ARCHITECTURE} # all, gfx000, gfx803, gfx900, gfx906:xnack-, gfx908:xnack-, gfx90a:xnack-, gfx1010, gfx1011, gfx1012, gfx1030, gfx1031 +- ${Tensile_ARCHITECTURE} # all, gfx000, gfx803, gfx900, gfx906:xnack-, gfx908:xnack-, gfx90a:xnack-, gfx1010, gfx1011, gfx1012, gfx1030 + ${Tensile_LIBRARY_FORMAT} # yaml or msgpack + ${Tensile_MERGE_FILES} # ON or OFF + ${Tensile_SHORT_FILE_NAMES} # ON or OFF +--- Tensile-rocm-4.3.0/Tensile/Source/lib/include/Tensile/AMDGPU.hpp 2021-04-22 22:35:33.000000000 +0800 ++++ Tensile-rocm-4.3.0/Tensile/Source/lib/include/Tensile/AMDGPU.hpp 2021-09-30 17:48:11.277066515 +0800 +@@ -62,7 +62,8 @@ + gfx1010 = 1010, + gfx1011 = 1011, + gfx1012 = 1012, ++ gfx1030 = 1030, ++ gfx1031 = 1031 +- gfx1030 = 1030 + }; + + AMDGPU(); +--- Tensile-rocm-4.3.0/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp 2021-04-22 22:35:33.000000000 +0800 ++++ Tensile-rocm-4.3.0/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp 2021-09-30 17:31:26.075845249 +0800 +@@ -215,6 +215,7 @@ + iot::enumCase(io, value, "gfx1011", AMDGPU::Processor::gfx1011); + iot::enumCase(io, value, "gfx1012", AMDGPU::Processor::gfx1012); + iot::enumCase(io, value, "gfx1030", AMDGPU::Processor::gfx1030); ++ iot::enumCase(io, value, "gfx1031", AMDGPU::Processor::gfx1031); + } + }; + } // namespace Serialization +--- Tensile-rocm-4.3.0/Tensile/Source/lib/source/AMDGPU.cpp 2021-04-22 22:35:33.000000000 +0800 ++++ Tensile-rocm-4.3.0/Tensile/Source/lib/source/AMDGPU.cpp 2021-09-30 17:31:45.195486318 +0800 +@@ -82,6 +82,8 @@ + return stream << "gfx1012"; + case AMDGPU::Processor::gfx1030: + return stream << "gfx1030"; ++ case AMDGPU::Processor::gfx1031: ++ return stream << "gfx1031"; + } + return stream; + } +--- Tensile-rocm-4.3.0/Tensile/Source/TensileCreateLibrary.cmake 2021-04-22 22:35:33.000000000 +0800 ++++ Tensile-rocm-4.3.0/Tensile/Source/TensileCreateLibrary.cmake 2021-09-30 17:29:24.766121912 +0800 +@@ -138,7 +138,7 @@ + add_library(Tensile ${options} ${Tensile_SOURCE_FILES}) + # specify gpu targets + if( Tensile_ARCHITECTURE MATCHES "all" ) ++ set( Tensile_HIP_ISA "gfx803" "gfx900" "gfx906" "gfx908" "gfx1010" "gfx1011" "gfx1012" "gfx1030", "gfx1031") +- set( Tensile_HIP_ISA "gfx803" "gfx900" "gfx906" "gfx908" "gfx1010" "gfx1011" "gfx1012" "gfx1030") + else() + set( Tensile_HIP_ISA ${Tensile_ARCHITECTURE}) + endif() diff --git a/dev-util/Tensile/files/Tensile-4.3.0-use-ninja.patch b/dev-util/Tensile/files/Tensile-4.3.0-use-ninja.patch new file mode 100644 index 000000000000..6645efd72fb1 --- /dev/null +++ b/dev-util/Tensile/files/Tensile-4.3.0-use-ninja.patch @@ -0,0 +1,21 @@ +Index: Tensile-rocm-4.3.0/Tensile/ClientExecutable.py +=================================================================== +--- Tensile-rocm-4.3.0.orig/Tensile/ClientExecutable.py ++++ Tensile-rocm-4.3.0/Tensile/ClientExecutable.py +@@ -36,6 +36,7 @@ class CMakeEnvironment: + + args = ['cmake'] + args += itertools.chain.from_iterable([ ['-D', '{}={}'.format(key, value)] for key,value in self.options.items()]) ++ args += itertools.chain.from_iterable([ ['-G', 'Ninja'], [ '-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=ON' ] ]) + args += [self.sourceDir] + + Common.print2(' '.join(args)) +@@ -43,7 +44,7 @@ class CMakeEnvironment: + subprocess.check_call(args, cwd=Common.ensurePath(self.buildDir)) + + def build(self): +- args = ['make', '-j'] ++ args = ['ninja'] + Common.print2(' '.join(args)) + with Common.ClientExecutionLock(): + subprocess.check_call(args, cwd=self.buildDir) |