summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2022-07-08 20:55:57 +0800
committerBenda Xu <heroxbd@gentoo.org>2022-07-09 01:28:05 +0800
commit6f3b1d45da1bce917f473f74ff32586cc38018ea (patch)
treea8385efaa58978b24cdd2c912b4695d0f0e561d1 /dev-util/Tensile
parentsys-kernel/linux-docs: drop 5.15.33 (diff)
downloadgentoo-6f3b1d45da1bce917f473f74ff32586cc38018ea.tar.gz
gentoo-6f3b1d45da1bce917f473f74ff32586cc38018ea.tar.bz2
gentoo-6f3b1d45da1bce917f473f74ff32586cc38018ea.zip
dev-util/Tensile: backport patch to control multiprocess
Reference: https://github.com/ROCmSoftwarePlatform/Tensile/commit/25b1621549f9b120462988913e657684645be79d Bugs: https://bugs.gentoo.org/852236 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-util/Tensile')
-rw-r--r--dev-util/Tensile/Tensile-5.0.2-r1.ebuild (renamed from dev-util/Tensile/Tensile-5.0.2.ebuild)1
-rw-r--r--dev-util/Tensile/files/Tensile-5.0.2-adjust-parallel.patch65
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-util/Tensile/Tensile-5.0.2.ebuild b/dev-util/Tensile/Tensile-5.0.2-r1.ebuild
index c9240e233281..5bb9a3f21927 100644
--- a/dev-util/Tensile/Tensile-5.0.2.ebuild
+++ b/dev-util/Tensile/Tensile-5.0.2-r1.ebuild
@@ -33,6 +33,7 @@ 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
+ "${FILESDIR}"/${PN}-5.0.2-adjust-parallel.patch
"${WORKDIR}"/${PN}-5.0.2-PR1419.patch
)
diff --git a/dev-util/Tensile/files/Tensile-5.0.2-adjust-parallel.patch b/dev-util/Tensile/files/Tensile-5.0.2-adjust-parallel.patch
new file mode 100644
index 000000000000..b96429232c78
--- /dev/null
+++ b/dev-util/Tensile/files/Tensile-5.0.2-adjust-parallel.patch
@@ -0,0 +1,65 @@
+From 25b1621549f9b120462988913e657684645be79d Mon Sep 17 00:00:00 2001
+From: Lee Ringham <lringham@amd.com>
+Date: Tue, 2 Nov 2021 14:43:07 -0600
+Subject: [PATCH] Added better control of parallelism to control memory usage
+
+---
+ Tensile/Source/TensileCreateLibrary.cmake | 7 +++++--
+ Tensile/cmake/TensileConfig.cmake | 5 +++++
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/Tensile/Source/TensileCreateLibrary.cmake b/Tensile/Source/TensileCreateLibrary.cmake
+index 1dbacf41df..996f365bcf 100644
+--- a/Tensile/Source/TensileCreateLibrary.cmake
++++ b/Tensile/Source/TensileCreateLibrary.cmake
+@@ -33,7 +33,8 @@ function(TensileCreateLibraryCmake
+ Tensile_LIBRARY_FORMAT
+ Tensile_MERGE_FILES
+ Tensile_SHORT_FILE_NAMES
+- Tensile_LIBRARY_PRINT_DEBUG )
++ Tensile_LIBRARY_PRINT_DEBUG
++ Tensile_CPU_THREADS )
+
+ # make Tensile_PACKAGE_LIBRARY and optional parameter
+ # to avoid breaking applications which us this
+@@ -51,6 +52,7 @@ function(TensileCreateLibraryCmake
+ message(STATUS "Tensile_COMPILER from TensileCreateLibraryCmake : ${Tensile_COMPILER}")
+ message(STATUS "Tensile_ARCHITECTURE from TensileCreateLibraryCmake : ${Tensile_ARCHITECTURE}")
+ message(STATUS "Tensile_LIBRARY_FORMAT from TensileCreateLibraryCmake : ${Tensile_LIBRARY_FORMAT}")
++ message(STATUS "Tensile_CPU_THREADS from TensileCreateLibraryCmake : ${Tensile_CPU_THREADS}")
+
+ #execute_process(COMMAND chmod 755 ${Tensile_ROOT}/bin/TensileCreateLibrary)
+ #execute_process(COMMAND chmod 755 ${Tensile_ROOT}/bin/Tensile)
+@@ -89,7 +91,8 @@ function(TensileCreateLibraryCmake
+ set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--code-object-version=${Tensile_CODE_OBJECT_VERSION}")
+ set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--cxx-compiler=${Tensile_COMPILER}")
+ set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--library-format=${Tensile_LIBRARY_FORMAT}")
+-
++ set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--jobs=${Tensile_CPU_THREADS}")
++
+ # TensileLibraryWriter positional arguments
+ set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND}
+ ${Tensile_LOGIC_PATH}
+diff --git a/Tensile/cmake/TensileConfig.cmake b/Tensile/cmake/TensileConfig.cmake
+index 0ac8517c2c..fa8cb96305 100644
+--- a/Tensile/cmake/TensileConfig.cmake
++++ b/Tensile/cmake/TensileConfig.cmake
+@@ -112,6 +112,7 @@ function(TensileCreateLibraryFiles
+ LIBRARY_FORMAT
+ TENSILE_ROOT
+ VAR_PREFIX
++ CPU_THREADS
+ )
+
+ # Multi value settings
+@@ -184,6 +185,10 @@ function(TensileCreateLibraryFiles
+ set(Options ${Options} "--cmake-cxx-compiler=${Tensile_COMPILER_PATH}")
+ endif()
+
++ if(Tensile_CPU_THREADS)
++ set(Options ${Options} "--jobs=${Tensile_CPU_THREADS}")
++ endif()
++
+ if(Tensile_LIBRARY_FORMAT)
+ set(Options ${Options} "--library-format=${Tensile_LIBRARY_FORMAT}")
+ if(Tensile_LIBRARY_FORMAT MATCHES "yaml")