public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Benda XU" <heroxbd@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/Tensile/files/, dev-util/Tensile/
Date: Fri,  8 Jul 2022 17:29:31 +0000 (UTC)	[thread overview]
Message-ID: <1657301285.6f3b1d45da1bce917f473f74ff32586cc38018ea.heroxbd@gentoo> (raw)

commit:     6f3b1d45da1bce917f473f74ff32586cc38018ea
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Fri Jul  8 12:55:57 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Fri Jul  8 17:28:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f3b1d45

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 <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 ...ensile-5.0.2.ebuild => Tensile-5.0.2-r1.ebuild} |  1 +
 .../files/Tensile-5.0.2-adjust-parallel.patch      | 65 ++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/dev-util/Tensile/Tensile-5.0.2.ebuild b/dev-util/Tensile/Tensile-5.0.2-r1.ebuild
similarity index 98%
rename from dev-util/Tensile/Tensile-5.0.2.ebuild
rename to 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")


             reply	other threads:[~2022-07-08 17:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 17:29 Benda XU [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-09 21:08 [gentoo-commits] repo/gentoo:master commit in: dev-util/Tensile/files/, dev-util/Tensile/ Patrick Lauer
2024-03-08 19:22 Sam James
2023-02-24 16:50 Marek Szuba
2023-02-24 16:50 Marek Szuba
2023-02-01  9:53 Andreas Sturmlechner
2022-09-22  1:08 Benda XU
2022-03-27  3:12 Benda XU
2022-03-27  3:12 Benda XU
2022-03-20  7:33 Benda XU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1657301285.6f3b1d45da1bce917f473f74ff32586cc38018ea.heroxbd@gentoo \
    --to=heroxbd@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox