diff options
author | Yiyang Wu <xgreenlandforwyy@gmail.com> | 2023-01-20 17:58:17 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2023-01-31 22:26:37 +0800 |
commit | 3b32497070812f973e5064f9ada07ab5d404b402 (patch) | |
tree | 192cb930afee2c7b35db149049c28cd770c7c8f2 /dev-util/Tensile/files | |
parent | dev-util/rocprofiler: add 5.3.3 (diff) | |
download | gentoo-3b32497070812f973e5064f9ada07ab5d404b402.tar.gz gentoo-3b32497070812f973e5064f9ada07ab5d404b402.tar.bz2 gentoo-3b32497070812f973e5064f9ada07ab5d404b402.zip |
dev-util/Tensile: add 5.4.2
Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-util/Tensile/files')
-rw-r--r-- | dev-util/Tensile/files/Tensile-5.4.2-gentoopath.patch | 67 | ||||
-rw-r--r-- | dev-util/Tensile/files/Tensile-5.4.2-use-ninja.patch | 21 |
2 files changed, 88 insertions, 0 deletions
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..2aed8082de05 --- /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-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 |