summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/Tensile/files')
-rw-r--r--dev-util/Tensile/files/Tensile-4.3.0-output-commands.patch23
-rw-r--r--dev-util/Tensile/files/Tensile-5.0.2-fix-arch-parse.patch12
-rw-r--r--dev-util/Tensile/files/Tensile-5.0.2-gfx1031.patch104
-rw-r--r--dev-util/Tensile/files/Tensile-5.0.2-use-ninja.patch21
-rw-r--r--dev-util/Tensile/files/Tensile-5.1.3-gentoopath.patch75
-rw-r--r--dev-util/Tensile/files/Tensile-5.4.2-fix-arch-parse.patch12
-rw-r--r--dev-util/Tensile/files/Tensile-5.4.2-gentoopath.patch67
-rw-r--r--dev-util/Tensile/files/Tensile-5.4.2-gfx1031.patch88
-rw-r--r--dev-util/Tensile/files/Tensile-5.4.2-use-ninja.patch21
-rw-r--r--dev-util/Tensile/files/Tensile-5.7.1-expand-isa-compatibility.patch49
-rw-r--r--dev-util/Tensile/files/Tensile-5.7.1-fix-msgpack-dependency.patch29
-rw-r--r--dev-util/Tensile/files/Tensile-5.7.1-gentoopath.patch57
-rw-r--r--dev-util/Tensile/files/Tensile-change-cmake-name-for-msgpack-cxx-6-release.patch13
13 files changed, 571 insertions, 0 deletions
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 000000000000..be5a4db21429
--- /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
diff --git a/dev-util/Tensile/files/Tensile-5.0.2-fix-arch-parse.patch b/dev-util/Tensile/files/Tensile-5.0.2-fix-arch-parse.patch
new file mode 100644
index 000000000000..47bee8819c44
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.0.2-fix-arch-parse.patch
@@ -0,0 +1,12 @@
+Index: Tensile-rocm-5.0.1/Tensile/Tensile.py
+===================================================================
+--- Tensile-rocm-5.0.1.orig/Tensile/Tensile.py
++++ Tensile-rocm-5.0.1/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-5.0.2-gfx1031.patch b/dev-util/Tensile/files/Tensile-5.0.2-gfx1031.patch
new file mode 100644
index 000000000000..17925cfd49e0
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.0.2-gfx1031.patch
@@ -0,0 +1,104 @@
+Index: Tensile-rocm-5.0.1/pytest.ini
+===================================================================
+--- Tensile-rocm-5.0.1.orig/pytest.ini
++++ Tensile-rocm-5.0.1/pytest.ini
+@@ -87,6 +87,7 @@ markers =
+ xfail-gfx1011: architecture
+ xfail-gfx1012: architecture
+ xfail-gfx1030: architecture
++ xfail-gfx1031: architecture
+ skip-gfx000: architecture
+ skip-gfx900: architecture
+ skip-gfx906: architecture
+@@ -96,3 +97,4 @@ markers =
+ skip-gfx1011: architecture
+ skip-gfx1012: architecture
+ skip-gfx1030: architecture
++ skip-gfx1031: architecture
+Index: Tensile-rocm-5.0.1/Tensile/Common.py
+===================================================================
+--- Tensile-rocm-5.0.1.orig/Tensile/Common.py
++++ Tensile-rocm-5.0.1/Tensile/Common.py
+@@ -198,7 +198,7 @@ globalParameters["MergeFiles"] = True
+ globalParameters["NumMergedFiles"] = 1 # The number of files that kernels should be split between when merging
+
+ 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)] # 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),(10,3,1)] # assembly kernels writer supports these architectures
+
+ globalParameters["GenerateManifestAndExit"] = False # Output manifest file with list of expected library objects and exit
+ globalParameters["NewClient"] = 2 # Old client deprecated: NewClient must be set to 2.
+@@ -264,7 +264,7 @@ architectureMap = {
+ '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':'navi12', 'gfx1012':'navi14', 'gfx1030':'navi21'
++ 'gfx1010':'navi10', 'gfx1011':'navi12', 'gfx1012':'navi14', 'gfx1030':'navi21', 'gfx1031':'navi22'
+ }
+
+ def getArchitectureName(gfxName):
+Index: Tensile-rocm-5.0.1/Tensile/KernelWriterAssembly.py
+===================================================================
+--- Tensile-rocm-5.0.1.orig/Tensile/KernelWriterAssembly.py
++++ Tensile-rocm-5.0.1/Tensile/KernelWriterAssembly.py
+@@ -2364,7 +2364,7 @@ class KernelWriterAssembly(KernelWriter)
+
+ # 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):
++ 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):
+ for b in range(0, kernel["ThreadTile1"]):
+ for a in range(0, kernel["ThreadTile0"]):
+ for iui in range(0, innerUnroll):
+Index: Tensile-rocm-5.0.1/Tensile/Source/CMakeLists.txt
+===================================================================
+--- Tensile-rocm-5.0.1.orig/Tensile/Source/CMakeLists.txt
++++ Tensile-rocm-5.0.1/Tensile/Source/CMakeLists.txt
+@@ -47,7 +47,7 @@ if(NOT DEFINED CXX_VERSION_STRING)
+ endif()
+
+ if(CMAKE_CXX_COMPILER STREQUAL "hipcc")
+- set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030 CACHE STRING "GPU architectures")
++ set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 CACHE STRING "GPU architectures")
+ else()
+ set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906 gfx908 gfx90a CACHE STRING "GPU architectures")
+ endif()
+Index: Tensile-rocm-5.0.1/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
+===================================================================
+--- Tensile-rocm-5.0.1.orig/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
++++ Tensile-rocm-5.0.1/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
+@@ -62,7 +62,8 @@ namespace Tensile
+ gfx1010 = 1010,
+ gfx1011 = 1011,
+ gfx1012 = 1012,
+- gfx1030 = 1030
++ gfx1030 = 1030,
++ gfx1031 = 1031
+ };
+
+ AMDGPU();
+Index: Tensile-rocm-5.0.1/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
+===================================================================
+--- Tensile-rocm-5.0.1.orig/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
++++ Tensile-rocm-5.0.1/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
+@@ -215,6 +215,7 @@ namespace Tensile
+ 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
+Index: Tensile-rocm-5.0.1/Tensile/Source/lib/source/AMDGPU.cpp
+===================================================================
+--- Tensile-rocm-5.0.1.orig/Tensile/Source/lib/source/AMDGPU.cpp
++++ Tensile-rocm-5.0.1/Tensile/Source/lib/source/AMDGPU.cpp
+@@ -82,6 +82,8 @@ namespace Tensile
+ return stream << "gfx1012";
+ case AMDGPU::Processor::gfx1030:
+ return stream << "gfx1030";
++ case AMDGPU::Processor::gfx1031:
++ return stream << "gfx1031";
+ }
+ return stream;
+ }
diff --git a/dev-util/Tensile/files/Tensile-5.0.2-use-ninja.patch b/dev-util/Tensile/files/Tensile-5.0.2-use-ninja.patch
new file mode 100644
index 000000000000..485ec992d808
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.0.2-use-ninja.patch
@@ -0,0 +1,21 @@
+diff --git a/Tensile/ClientExecutable.py b/Tensile/ClientExecutable.py
+index ca3809f..2d1d83b 100644
+--- a/Tensile/ClientExecutable.py
++++ b/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)
diff --git a/dev-util/Tensile/files/Tensile-5.1.3-gentoopath.patch b/dev-util/Tensile/files/Tensile-5.1.3-gentoopath.patch
new file mode 100644
index 000000000000..2f41bf3aa715
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.1.3-gentoopath.patch
@@ -0,0 +1,75 @@
+Fix incorrect path in scripts and CMakeLists, in order to build tensile_client
+===================================================================
+--- Tensile-rocm-5.0.2.orig/Tensile/Source/client/CMakeLists.txt
++++ Tensile-rocm-5.0.2/Tensile/Source/client/CMakeLists.txt
+@@ -56,3 +56,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-5.0.2/Tensile/Source/lib/CMakeLists.txt
+===================================================================
+--- Tensile-rocm-5.0.2.orig/Tensile/Source/lib/CMakeLists.txt
++++ Tensile-rocm-5.0.2/Tensile/Source/lib/CMakeLists.txt
+@@ -47,7 +47,7 @@ set(tensile_sources ${tensile_sources}
+ )
+
+ if(TENSILE_USE_LLVM)
+- find_package(LLVM 13.0 QUIET CONFIG)
++ find_package(LLVM PATHS @LLVM_PATH@ QUIET CONFIG)
+ if(NOT LLVM_FOUND)
+ find_package(LLVM 12.0 QUIET CONFIG)
+ if(NOT LLVM_FOUND)
+Index: Tensile-rocm-5.0.2/Tensile/Common.py
+===================================================================
+--- Tensile-rocm-5.0.2.orig/Tensile/Common.py
++++ Tensile-rocm-5.0.2/Tensile/Common.py
+@@ -1873,7 +1873,7 @@ def assignGlobalParameters( config ):
+ else:
+ print2(" %24s: %8s (unspecified)" % (key, defaultValue))
+
+- globalParameters["ROCmPath"] = "/opt/rocm"
++ globalParameters["ROCmPath"] = "@GENTOO_PORTAGE_EPREFIX@/usr"
+ if "ROCM_PATH" in os.environ:
+ globalParameters["ROCmPath"] = os.environ.get("ROCM_PATH")
+ if "TENSILE_ROCM_PATH" in os.environ:
+Index: Tensile-rocm-5.0.2/Tensile/ClientWriter.py
+===================================================================
+--- Tensile-rocm-5.0.2.orig/Tensile/ClientWriter.py
++++ Tensile-rocm-5.0.2/Tensile/ClientWriter.py
+@@ -205,7 +205,7 @@ def getBuildClientLibraryScript(buildPat
+ import io
+ runScriptFile = io.StringIO()
+
+- callCreateLibraryCmd = globalParameters["ScriptPath"] + "/bin/TensileCreateLibrary"
++ callCreateLibraryCmd = "TensileCreateLibrary"
+
+
+ if globalParameters["MergeFiles"]:
+Index: Tensile-rocm-5.0.2/Tensile/GenerateSummations.py
+===================================================================
+--- Tensile-rocm-5.0.2.orig/Tensile/GenerateSummations.py
++++ Tensile-rocm-5.0.2/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", "--new-client-only", "--no-short-file-names", "--no-library-print-debug", \
+ "--architecture=all", "--code-object-version=V3", "--cxx-compiler=hipcc", "--library-format=yaml", \
+Index: Tensile-rocm-5.0.2/HostLibraryTests/CMakeLists.txt
+===================================================================
+--- Tensile-rocm-5.0.2.orig/HostLibraryTests/CMakeLists.txt
++++ Tensile-rocm-5.0.2/HostLibraryTests/CMakeLists.txt
+@@ -135,7 +135,7 @@ set(test_sources ${test_sources}
+ )
+
+ if(TENSILE_USE_LLVM)
+- find_package(LLVM 13.0 QUIET CONFIG)
++ find_package(LLVM PATHS @LLVM_PATH@ QUIET CONFIG)
+ if(NOT LLVM_FOUND)
+ find_package(LLVM 12.0 QUIET CONFIG)
+ if(NOT LLVM_FOUND)
diff --git a/dev-util/Tensile/files/Tensile-5.4.2-fix-arch-parse.patch b/dev-util/Tensile/files/Tensile-5.4.2-fix-arch-parse.patch
new file mode 100644
index 000000000000..14263e89ef84
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.4.2-fix-arch-parse.patch
@@ -0,0 +1,12 @@
+Index: Tensile-rocm-5.3.3/Tensile/Tensile.py
+===================================================================
+--- Tensile-rocm-5.3.3.orig/Tensile/Tensile.py
++++ Tensile-rocm-5.3.3/Tensile/Tensile.py
+@@ -101,7 +101,6 @@ def addCommonArguments(argParser):
+ Allows the --global-parameters option to specify any parameters from the command line.
+ """
+ (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-5.4.2-gentoopath.patch b/dev-util/Tensile/files/Tensile-5.4.2-gentoopath.patch
new file mode 100644
index 000000000000..eda9b0307c52
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.4.2-gentoopath.patch
@@ -0,0 +1,67 @@
+Fix incorrect path in scripts and CMakeLists, in order to build tensile_client
+===================================================================
+Index: Tensile-rocm-5.4.2/Tensile/Source/lib/CMakeLists.txt
+===================================================================
+--- Tensile-rocm-5.4.2.orig/Tensile/Source/lib/CMakeLists.txt
++++ Tensile-rocm-5.4.2/Tensile/Source/lib/CMakeLists.txt
+@@ -51,7 +51,7 @@ set(tensile_sources ${tensile_sources}
+ )
+
+ if(TENSILE_USE_LLVM)
+- find_package(LLVM 13.0 QUIET CONFIG)
++ find_package(LLVM PATHS @LLVM_PATH@ QUIET CONFIG)
+ if(NOT LLVM_FOUND)
+ find_package(LLVM 12.0 QUIET CONFIG)
+ if(NOT LLVM_FOUND)
+Index: Tensile-rocm-5.4.2/Tensile/Common.py
+===================================================================
+--- Tensile-rocm-5.4.2.orig/Tensile/Common.py
++++ Tensile-rocm-5.4.2/Tensile/Common.py
+@@ -1950,7 +1950,7 @@ def assignGlobalParameters( config ):
+ else:
+ print2(" %24s: %8s (unspecified)" % (key, defaultValue))
+
+- globalParameters["ROCmPath"] = "/opt/rocm"
++ globalParameters["ROCmPath"] = "@GENTOO_PORTAGE_EPREFIX@/usr"
+ if "ROCM_PATH" in os.environ:
+ globalParameters["ROCmPath"] = os.environ.get("ROCM_PATH")
+ if "TENSILE_ROCM_PATH" in os.environ:
+Index: Tensile-rocm-5.4.2/Tensile/ClientWriter.py
+===================================================================
+--- Tensile-rocm-5.4.2.orig/Tensile/ClientWriter.py
++++ Tensile-rocm-5.4.2/Tensile/ClientWriter.py
+@@ -180,7 +180,7 @@ def runClient(libraryLogicPath, forBench
+ def getBuildClientLibraryScript(buildPath, libraryLogicPath):
+ callCreateLibraryCmd = ["python"] if os.name == "nt" else []
+
+- callCreateLibraryCmd += [os.path.join(globalParameters["ScriptPath"] , "bin", "TensileCreateLibrary")]
++ callCreateLibraryCmd += ["TensileCreateLibrary"]
+
+ if globalParameters["MergeFiles"]:
+ callCreateLibraryCmd += ["--merge-files"]
+Index: Tensile-rocm-5.4.2/Tensile/GenerateSummations.py
+===================================================================
+--- Tensile-rocm-5.4.2.orig/Tensile/GenerateSummations.py
++++ Tensile-rocm-5.4.2/Tensile/GenerateSummations.py
+@@ -59,7 +59,7 @@ def createLibraryForBenchmark(logicPath,
+ Selection.
+ """
+
+- pythonExePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin", "TensileCreateLibrary")
++ pythonExePath = "TensileCreateLibrary"
+ args = [pythonExePath, \
+ "--merge-files", "--new-client-only", "--no-short-file-names", "--no-library-print-debug", \
+ "--architecture=all", "--code-object-version=V3", "--cxx-compiler=hipcc", "--library-format=yaml", \
+Index: Tensile-rocm-5.4.2/HostLibraryTests/CMakeLists.txt
+===================================================================
+--- Tensile-rocm-5.4.2.orig/HostLibraryTests/CMakeLists.txt
++++ Tensile-rocm-5.4.2/HostLibraryTests/CMakeLists.txt
+@@ -139,7 +139,7 @@ set(test_sources ${test_sources}
+ )
+
+ if(TENSILE_USE_LLVM)
+- find_package(LLVM 13.0 QUIET CONFIG)
++ find_package(LLVM PATHS @LLVM_PATH@ QUIET CONFIG)
+ if(NOT LLVM_FOUND)
+ find_package(LLVM 12.0 QUIET CONFIG)
+ if(NOT LLVM_FOUND)
diff --git a/dev-util/Tensile/files/Tensile-5.4.2-gfx1031.patch b/dev-util/Tensile/files/Tensile-5.4.2-gfx1031.patch
new file mode 100644
index 000000000000..1f703c07c3ec
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.4.2-gfx1031.patch
@@ -0,0 +1,88 @@
+Index: Tensile-rocm-5.3.3/pytest.ini
+===================================================================
+--- Tensile-rocm-5.3.3.orig/pytest.ini
++++ Tensile-rocm-5.3.3/pytest.ini
+@@ -88,6 +88,7 @@ markers =
+ xfail-gfx1011: architecture
+ xfail-gfx1012: architecture
+ xfail-gfx1030: architecture
++ xfail-gfx1031: architecture
+ xfail-gfx1100: architecture
+ xfail-gfx1101: architecture
+ xfail-gfx1102: architecture
+@@ -100,6 +101,7 @@ markers =
+ skip-gfx1011: architecture
+ skip-gfx1012: architecture
+ skip-gfx1030: architecture
++ skip-gfx1031: architecture
+ skip-gfx1100: architecture
+ skip-gfx1101: architecture
+ skip-gfx1102: architecture
+Index: Tensile-rocm-5.3.3/Tensile/Common.py
+===================================================================
+--- Tensile-rocm-5.3.3.orig/Tensile/Common.py
++++ Tensile-rocm-5.3.3/Tensile/Common.py
+@@ -201,7 +201,7 @@ globalParameters["MergeFiles"] = True
+ globalParameters["NumMergedFiles"] = 1 # The number of files that kernels should be split between when merging
+
+ 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), (11,0,0), (11,0,1), (11,0,2)] # 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), (10,3,1), (11,0,0), (11,0,1), (11,0,2)] # assembly kernels writer supports these architectures
+
+ globalParameters["GenerateManifestAndExit"] = False # Output manifest file with list of expected library objects and exit
+ globalParameters["NewClient"] = 2 # Old client deprecated: NewClient must be set to 2.
+@@ -271,7 +271,7 @@ architectureMap = {
+ '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':'navi12', 'gfx1012':'navi14', 'gfx1030':'navi21',
++ 'gfx1010':'navi10', 'gfx1011':'navi12', 'gfx1012':'navi14', 'gfx1030':'navi21', 'gfx1031':'navi22',
+ 'gfx1100':'navi31', 'gfx1101':'navi32', 'gfx1102':'navi33'
+ }
+
+Index: Tensile-rocm-5.3.3/Tensile/Source/CMakeLists.txt
+===================================================================
+--- Tensile-rocm-5.3.3.orig/Tensile/Source/CMakeLists.txt
++++ Tensile-rocm-5.3.3/Tensile/Source/CMakeLists.txt
+@@ -51,7 +51,7 @@ if(NOT DEFINED CXX_VERSION_STRING)
+ endif()
+
+ if(CMAKE_CXX_COMPILER STREQUAL "hipcc")
+- set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030 gfx1100 gfx1101 gfx1102 CACHE STRING "GPU architectures")
++ set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1100 gfx1101 gfx1102 CACHE STRING "GPU architectures")
+ else()
+ set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906 gfx908 gfx90a gfx1010 gfx1011 gfx1012 gfx1030 gfx1100 gfx1101 gfx1102 CACHE STRING "GPU architectures")
+ endif()
+Index: Tensile-rocm-5.3.3/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
+===================================================================
+--- Tensile-rocm-5.3.3.orig/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
++++ Tensile-rocm-5.3.3/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
+@@ -63,6 +63,7 @@ namespace Tensile
+ gfx1011 = 1011,
+ gfx1012 = 1012,
+ gfx1030 = 1030,
++ gfx1031 = 1031,
+ gfx1100 = 1100,
+ gfx1101 = 1101,
+ gfx1102 = 1102
+@@ -90,6 +91,8 @@ namespace Tensile
+ return "gfx1012";
+ case AMDGPU::Processor::gfx1030:
+ return "gfx1030";
++ case AMDGPU::Processor::gfx1031:
++ return "gfx1032";
+ case AMDGPU::Processor::gfx1100:
+ return "gfx1100";
+ case AMDGPU::Processor::gfx1101:
+Index: Tensile-rocm-5.3.3/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
+===================================================================
+--- Tensile-rocm-5.3.3.orig/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
++++ Tensile-rocm-5.3.3/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
+@@ -215,6 +215,7 @@ namespace Tensile
+ 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);
+ iot::enumCase(io, value, "gfx1100", AMDGPU::Processor::gfx1100);
+ iot::enumCase(io, value, "gfx1101", AMDGPU::Processor::gfx1101);
+ iot::enumCase(io, value, "gfx1102", AMDGPU::Processor::gfx1102);
diff --git a/dev-util/Tensile/files/Tensile-5.4.2-use-ninja.patch b/dev-util/Tensile/files/Tensile-5.4.2-use-ninja.patch
new file mode 100644
index 000000000000..f88bf00665cb
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.4.2-use-ninja.patch
@@ -0,0 +1,21 @@
+Index: Tensile-rocm-5.4.2/Tensile/ClientExecutable.py
+===================================================================
+--- Tensile-rocm-5.4.2.orig/Tensile/ClientExecutable.py
++++ Tensile-rocm-5.4.2/Tensile/ClientExecutable.py
+@@ -44,6 +44,7 @@ class CMakeEnvironment:
+ args = ['cmake']
+ args += ['-G', 'Ninja'] if (os.name == 'nt') else []
+ 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]
+ args = [cmake_path(arg) for arg in args]
+
+@@ -53,7 +54,7 @@ class CMakeEnvironment:
+ subprocess.check_output(args, stderr=subprocess.STDOUT, cwd=Common.ensurePath(self.buildDir))
+
+ def build(self):
+- args = [('ninja' if (os.name == "nt") else 'make'), f'-j{CPUThreadCount()}']
++ args = [('ninja'), f'-j{CPUThreadCount()}']
+ Common.print2(' '.join(args))
+ with Common.ClientExecutionLock():
+ # change to use check_output to force windows cmd block util command finish
diff --git a/dev-util/Tensile/files/Tensile-5.7.1-expand-isa-compatibility.patch b/dev-util/Tensile/files/Tensile-5.7.1-expand-isa-compatibility.patch
new file mode 100644
index 000000000000..ebfc537c5c4d
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.7.1-expand-isa-compatibility.patch
@@ -0,0 +1,49 @@
+Allow Tensile to load the compatible kernels when running on
+architectures compatible with those ISAs.
+
+Based on patch from Cordell Bloor <cgmb@slerp.xyz>
+https://salsa.debian.org/rocm-team/rocblas/-/blob/master/debian/patches/0012-expand-isa-compatibility.patch
+
+--- a/Tensile/Source/lib/source/hip/HipHardware.cpp
++++ b/Tensile/Source/lib/source/hip/HipHardware.cpp
+@@ -24,6 +24,8 @@
+ *
+ *******************************************************************************/
+
++#include <cstring>
++
+ #include <Tensile/AMDGPU.hpp>
+ #include <Tensile/hip/HipHardware.hpp>
+ #include <Tensile/hip/HipUtils.hpp>
+@@ -56,6 +58,31 @@ namespace Tensile
+ {
+ hipDeviceProp_t prop;
+ HIP_CHECK_EXC(hipGetDeviceProperties(&prop, deviceId));
++ // coerce to compatible arch
++ switch(prop.gcnArch)
++ {
++ case 902:
++ case 909:
++ case 912:
++ prop.gcnArch = 900;
++ std::strcpy(prop.gcnArchName, "gfx900");
++ break;
++ case 1011:
++ case 1012:
++ case 1013:
++ prop.gcnArch = 1010;
++ std::strcpy(prop.gcnArchName, "gfx1010");
++ break;
++ case 1031:
++ case 1032:
++ case 1033:
++ case 1034:
++ case 1035:
++ case 1036:
++ prop.gcnArch = 1030;
++ std::strcpy(prop.gcnArchName, "gfx1030");
++ break;
++ }
+ #if HIP_VERSION >= 50220730
+ int hip_version;
+ HIP_CHECK_EXC(hipRuntimeGetVersion(&hip_version));
diff --git a/dev-util/Tensile/files/Tensile-5.7.1-fix-msgpack-dependency.patch b/dev-util/Tensile/files/Tensile-5.7.1-fix-msgpack-dependency.patch
new file mode 100644
index 000000000000..f6f3f0e24c1a
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.7.1-fix-msgpack-dependency.patch
@@ -0,0 +1,29 @@
+Gentoo uses "msgpack-cxx" as library name and adds important
+MSGPACK_NO_BOOST compile definition when msgpack-cxx us installed with USE=-boost
+--- a/Tensile/Source/lib/CMakeLists.txt
++++ b/Tensile/Source/lib/CMakeLists.txt
+@@ -98,22 +98,9 @@ if(TENSILE_USE_LLVM OR TENSILE_USE_MSGPACK)
+ endif()
+
+ if(TENSILE_USE_MSGPACK)
+- find_package(msgpack REQUIRED)
++ find_package(msgpack-cxx REQUIRED)
+ target_compile_definitions(TensileHost PUBLIC -DTENSILE_MSGPACK=1)
+-
+- if(TARGET msgpackc-cxx)
+- get_target_property(msgpack_inc msgpackc-cxx INTERFACE_INCLUDE_DIRECTORIES)
+- elseif(TARGET msgpackc)
+- get_target_property(msgpack_inc msgpackc INTERFACE_INCLUDE_DIRECTORIES)
+- endif()
+-
+- if(DEFINED msgpack_inc)
+- # include C++ headers manually
+- # External header includes included as system files
+- target_include_directories(TensileHost
+- SYSTEM PRIVATE $<BUILD_INTERFACE:${msgpack_inc}>
+- )
+- endif()
++ target_link_libraries(TensileHost PRIVATE msgpack-cxx)
+ endif()
+
+ if(TENSILE_USE_LLVM)
diff --git a/dev-util/Tensile/files/Tensile-5.7.1-gentoopath.patch b/dev-util/Tensile/files/Tensile-5.7.1-gentoopath.patch
new file mode 100644
index 000000000000..c8bc360cc39b
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.7.1-gentoopath.patch
@@ -0,0 +1,57 @@
+Fix incorrect path in scripts and CMakeLists, in order to build tensile_client
+
+--- a/HostLibraryTests/CMakeLists.txt
++++ b/HostLibraryTests/CMakeLists.txt
+@@ -139,7 +139,7 @@ set(test_sources ${test_sources}
+ )
+
+ if(TENSILE_USE_LLVM)
+- find_package(LLVM REQUIRED CONFIG)
++ find_package(LLVM PATHS @LLVM_PATH@ REQUIRED CONFIG)
+
+ set(test_sources ${test_sources}
+ ContractionLibraryLoading_test.cpp
+--- a/Tensile/ClientWriter.py
++++ b/Tensile/ClientWriter.py
+@@ -176,7 +176,7 @@ def runClient(libraryLogicPath, forBenchmark, enableTileSelection, configPaths=N
+ def getBuildClientLibraryScript(buildPath, libraryLogicPath):
+ callCreateLibraryCmd = ["python"] if os.name == "nt" else []
+
+- callCreateLibraryCmd += [os.path.join(globalParameters["ScriptPath"] , "bin", "TensileCreateLibrary")]
++ callCreateLibraryCmd += ["TensileCreateLibrary"]
+
+ if globalParameters["MergeFiles"]:
+ callCreateLibraryCmd += ["--merge-files"]
+--- a/Tensile/Common.py
++++ b/Tensile/Common.py
+@@ -2108,7 +2108,7 @@ def assignGlobalParameters( config ):
+ else:
+ print2(" %24s: %8s (unspecified)" % (key, defaultValue))
+
+- globalParameters["ROCmPath"] = "/opt/rocm"
++ globalParameters["ROCmPath"] = "@GENTOO_PORTAGE_EPREFIX@/usr"
+ if "ROCM_PATH" in os.environ:
+ globalParameters["ROCmPath"] = os.environ.get("ROCM_PATH")
+ if "TENSILE_ROCM_PATH" in os.environ:
+--- a/Tensile/GenerateSummations.py
++++ b/Tensile/GenerateSummations.py
+@@ -59,7 +59,7 @@ def createLibraryForBenchmark(logicPath, libraryPath, currentPath):
+ Selection.
+ """
+
+- pythonExePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin", "TensileCreateLibrary")
++ pythonExePath = "TensileCreateLibrary"
+ args = [pythonExePath, \
+ "--merge-files", "--new-client-only", "--no-short-file-names", "--no-library-print-debug", \
+ "--architecture=all", "--cxx-compiler=hipcc", "--library-format=yaml", \
+--- a/Tensile/Source/lib/CMakeLists.txt
++++ b/Tensile/Source/lib/CMakeLists.txt
+@@ -52,7 +52,7 @@ set(tensile_sources ${tensile_sources}
+ )
+
+ if(TENSILE_USE_LLVM)
+- find_package(LLVM REQUIRED CONFIG)
++ find_package(LLVM PATHS @LLVM_PATH@ REQUIRED CONFIG)
+
+ set(tensile_sources ${tensile_sources}
+ source/llvm/YAML.cpp
diff --git a/dev-util/Tensile/files/Tensile-change-cmake-name-for-msgpack-cxx-6-release.patch b/dev-util/Tensile/files/Tensile-change-cmake-name-for-msgpack-cxx-6-release.patch
new file mode 100644
index 000000000000..d8ac203781da
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-change-cmake-name-for-msgpack-cxx-6-release.patch
@@ -0,0 +1,13 @@
+Yiyang's original patch for msgpack-cxx-5 adapted to version 6.
+
+--- a/Tensile/Source/lib/CMakeLists.txt
++++ b/Tensile/Source/lib/CMakeLists.txt
+@@ -97,7 +97,7 @@ if(TENSILE_USE_LLVM OR TENSILE_USE_MSGPACK)
+ endif()
+
+ if(TENSILE_USE_MSGPACK)
+- find_package(msgpack REQUIRED)
++ find_package(msgpack-cxx REQUIRED)
+ target_compile_definitions(TensileHost PUBLIC -DTENSILE_MSGPACK=1)
+
+ if(TARGET msgpackc-cxx)