Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/Tensile/, dev-util/Tensile/files/
Date: Wed, 01 Feb 2023 01:52:10
Message-Id: 1675216295.2b7c870b48d225a9ade51eac426310de68f41069.heroxbd@gentoo
1 commit: 2b7c870b48d225a9ade51eac426310de68f41069
2 Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
3 AuthorDate: Tue Jan 31 14:57:06 2023 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 1 01:51:35 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b7c870b
7
8 dev-util/Tensile: add missing patches
9
10 Closes: https://bugs.gentoo.org/892736
11 Closes: https://github.com/gentoo/gentoo/pull/29356
12 Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
13 Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
14
15 dev-util/Tensile/Tensile-5.4.2.ebuild | 4 +-
16 .../files/Tensile-5.4.2-fix-arch-parse.patch | 12 +++
17 dev-util/Tensile/files/Tensile-5.4.2-gfx1031.patch | 88 ++++++++++++++++++++++
18 3 files changed, 102 insertions(+), 2 deletions(-)
19
20 diff --git a/dev-util/Tensile/Tensile-5.4.2.ebuild b/dev-util/Tensile/Tensile-5.4.2.ebuild
21 index 09bccd0ab2dd..1e347fdcee56 100644
22 --- a/dev-util/Tensile/Tensile-5.4.2.ebuild
23 +++ b/dev-util/Tensile/Tensile-5.4.2.ebuild
24 @@ -32,8 +32,8 @@ DEPEND="${RDEPEND}
25 "
26
27 PATCHES=( "${FILESDIR}"/${PN}-4.3.0-output-commands.patch
28 - "${FILESDIR}"/${PN}-5.3.3-gfx1031.patch
29 - "${FILESDIR}"/${PN}-5.3.3-fix-arch-parse.patch
30 + "${FILESDIR}"/${PN}-5.4.2-gfx1031.patch
31 + "${FILESDIR}"/${PN}-5.4.2-fix-arch-parse.patch
32 "${FILESDIR}"/${PN}-5.4.2-use-ninja.patch
33 )
34
35
36 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
37 new file mode 100644
38 index 000000000000..14263e89ef84
39 --- /dev/null
40 +++ b/dev-util/Tensile/files/Tensile-5.4.2-fix-arch-parse.patch
41 @@ -0,0 +1,12 @@
42 +Index: Tensile-rocm-5.3.3/Tensile/Tensile.py
43 +===================================================================
44 +--- Tensile-rocm-5.3.3.orig/Tensile/Tensile.py
45 ++++ Tensile-rocm-5.3.3/Tensile/Tensile.py
46 +@@ -101,7 +101,6 @@ def addCommonArguments(argParser):
47 + Allows the --global-parameters option to specify any parameters from the command line.
48 + """
49 + (key, value) = par.split("=")
50 +- value = eval(value)
51 + return (key, value)
52 +
53 + argParser.add_argument("-d", "--device", dest="device", type=int, \
54
55 diff --git a/dev-util/Tensile/files/Tensile-5.4.2-gfx1031.patch b/dev-util/Tensile/files/Tensile-5.4.2-gfx1031.patch
56 new file mode 100644
57 index 000000000000..1f703c07c3ec
58 --- /dev/null
59 +++ b/dev-util/Tensile/files/Tensile-5.4.2-gfx1031.patch
60 @@ -0,0 +1,88 @@
61 +Index: Tensile-rocm-5.3.3/pytest.ini
62 +===================================================================
63 +--- Tensile-rocm-5.3.3.orig/pytest.ini
64 ++++ Tensile-rocm-5.3.3/pytest.ini
65 +@@ -88,6 +88,7 @@ markers =
66 + xfail-gfx1011: architecture
67 + xfail-gfx1012: architecture
68 + xfail-gfx1030: architecture
69 ++ xfail-gfx1031: architecture
70 + xfail-gfx1100: architecture
71 + xfail-gfx1101: architecture
72 + xfail-gfx1102: architecture
73 +@@ -100,6 +101,7 @@ markers =
74 + skip-gfx1011: architecture
75 + skip-gfx1012: architecture
76 + skip-gfx1030: architecture
77 ++ skip-gfx1031: architecture
78 + skip-gfx1100: architecture
79 + skip-gfx1101: architecture
80 + skip-gfx1102: architecture
81 +Index: Tensile-rocm-5.3.3/Tensile/Common.py
82 +===================================================================
83 +--- Tensile-rocm-5.3.3.orig/Tensile/Common.py
84 ++++ Tensile-rocm-5.3.3/Tensile/Common.py
85 +@@ -201,7 +201,7 @@ globalParameters["MergeFiles"] = True
86 + globalParameters["NumMergedFiles"] = 1 # The number of files that kernels should be split between when merging
87 +
88 + globalParameters["MaxFileName"] = 64 # If a file name would be longer than this, shorten it with a hash.
89 +-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
90 ++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
91 +
92 + globalParameters["GenerateManifestAndExit"] = False # Output manifest file with list of expected library objects and exit
93 + globalParameters["NewClient"] = 2 # Old client deprecated: NewClient must be set to 2.
94 +@@ -271,7 +271,7 @@ architectureMap = {
95 + 'gfx906':'vega20', 'gfx906:xnack+':'vega20', 'gfx906:xnack-':'vega20',
96 + 'gfx908':'arcturus','gfx908:xnack+':'arcturus', 'gfx908:xnack-':'arcturus',
97 + 'gfx90a':'aldebaran', 'gfx90a:xnack+':'aldebaran', 'gfx90a:xnack-':'aldebaran',
98 +- 'gfx1010':'navi10', 'gfx1011':'navi12', 'gfx1012':'navi14', 'gfx1030':'navi21',
99 ++ 'gfx1010':'navi10', 'gfx1011':'navi12', 'gfx1012':'navi14', 'gfx1030':'navi21', 'gfx1031':'navi22',
100 + 'gfx1100':'navi31', 'gfx1101':'navi32', 'gfx1102':'navi33'
101 + }
102 +
103 +Index: Tensile-rocm-5.3.3/Tensile/Source/CMakeLists.txt
104 +===================================================================
105 +--- Tensile-rocm-5.3.3.orig/Tensile/Source/CMakeLists.txt
106 ++++ Tensile-rocm-5.3.3/Tensile/Source/CMakeLists.txt
107 +@@ -51,7 +51,7 @@ if(NOT DEFINED CXX_VERSION_STRING)
108 + endif()
109 +
110 + if(CMAKE_CXX_COMPILER STREQUAL "hipcc")
111 +- set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030 gfx1100 gfx1101 gfx1102 CACHE STRING "GPU architectures")
112 ++ set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack- gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1100 gfx1101 gfx1102 CACHE STRING "GPU architectures")
113 + else()
114 + set(TENSILE_GPU_ARCHS gfx803 gfx900 gfx906 gfx908 gfx90a gfx1010 gfx1011 gfx1012 gfx1030 gfx1100 gfx1101 gfx1102 CACHE STRING "GPU architectures")
115 + endif()
116 +Index: Tensile-rocm-5.3.3/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
117 +===================================================================
118 +--- Tensile-rocm-5.3.3.orig/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
119 ++++ Tensile-rocm-5.3.3/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
120 +@@ -63,6 +63,7 @@ namespace Tensile
121 + gfx1011 = 1011,
122 + gfx1012 = 1012,
123 + gfx1030 = 1030,
124 ++ gfx1031 = 1031,
125 + gfx1100 = 1100,
126 + gfx1101 = 1101,
127 + gfx1102 = 1102
128 +@@ -90,6 +91,8 @@ namespace Tensile
129 + return "gfx1012";
130 + case AMDGPU::Processor::gfx1030:
131 + return "gfx1030";
132 ++ case AMDGPU::Processor::gfx1031:
133 ++ return "gfx1032";
134 + case AMDGPU::Processor::gfx1100:
135 + return "gfx1100";
136 + case AMDGPU::Processor::gfx1101:
137 +Index: Tensile-rocm-5.3.3/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
138 +===================================================================
139 +--- Tensile-rocm-5.3.3.orig/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
140 ++++ Tensile-rocm-5.3.3/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
141 +@@ -215,6 +215,7 @@ namespace Tensile
142 + iot::enumCase(io, value, "gfx1011", AMDGPU::Processor::gfx1011);
143 + iot::enumCase(io, value, "gfx1012", AMDGPU::Processor::gfx1012);
144 + iot::enumCase(io, value, "gfx1030", AMDGPU::Processor::gfx1030);
145 ++ iot::enumCase(io, value, "gfx1031", AMDGPU::Processor::gfx1031);
146 + iot::enumCase(io, value, "gfx1100", AMDGPU::Processor::gfx1100);
147 + iot::enumCase(io, value, "gfx1101", AMDGPU::Processor::gfx1101);
148 + iot::enumCase(io, value, "gfx1102", AMDGPU::Processor::gfx1102);