commit:     2b7c870b48d225a9ade51eac426310de68f41069
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Tue Jan 31 14:57:06 2023 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Wed Feb  1 01:51:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b7c870b

dev-util/Tensile: add missing patches

Closes: https://bugs.gentoo.org/892736
Closes: https://github.com/gentoo/gentoo/pull/29356
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 dev-util/Tensile/Tensile-5.4.2.ebuild              |  4 +-
 .../files/Tensile-5.4.2-fix-arch-parse.patch       | 12 +++
 dev-util/Tensile/files/Tensile-5.4.2-gfx1031.patch | 88 ++++++++++++++++++++++
 3 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/dev-util/Tensile/Tensile-5.4.2.ebuild 
b/dev-util/Tensile/Tensile-5.4.2.ebuild
index 09bccd0ab2dd..1e347fdcee56 100644
--- a/dev-util/Tensile/Tensile-5.4.2.ebuild
+++ b/dev-util/Tensile/Tensile-5.4.2.ebuild
@@ -32,8 +32,8 @@ DEPEND="${RDEPEND}
 "
 
 PATCHES=( "${FILESDIR}"/${PN}-4.3.0-output-commands.patch
-                 "${FILESDIR}"/${PN}-5.3.3-gfx1031.patch
-                 "${FILESDIR}"/${PN}-5.3.3-fix-arch-parse.patch
+                 "${FILESDIR}"/${PN}-5.4.2-gfx1031.patch
+                 "${FILESDIR}"/${PN}-5.4.2-fix-arch-parse.patch
                  "${FILESDIR}"/${PN}-5.4.2-use-ninja.patch
          )
 

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-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);

Reply via email to