1 |
commit: a31808f3051758ccde8604944e1559ce92ef8ec4 |
2 |
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Jun 21 08:38:05 2022 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 22 01:06:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a31808f3 |
7 |
|
8 |
dev-util/Tensile: add 5.1.3, switch to vanilla clang-14 |
9 |
|
10 |
enable py3.11 as well. |
11 |
No need to rebuild when hip upgrade since hip is just used at runtime. |
12 |
|
13 |
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com> |
14 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
15 |
|
16 |
dev-util/Tensile/Manifest | 1 + |
17 |
dev-util/Tensile/Tensile-5.0.2-r2.ebuild | 2 +- |
18 |
...ensile-5.0.2-r2.ebuild => Tensile-5.1.3.ebuild} | 16 +++-- |
19 |
.../Tensile/files/Tensile-5.1.3-gentoopath.patch | 75 ++++++++++++++++++++++ |
20 |
4 files changed, 86 insertions(+), 8 deletions(-) |
21 |
|
22 |
diff --git a/dev-util/Tensile/Manifest b/dev-util/Tensile/Manifest |
23 |
index c3e8f48bab20..3b51748fa904 100644 |
24 |
--- a/dev-util/Tensile/Manifest |
25 |
+++ b/dev-util/Tensile/Manifest |
26 |
@@ -1,3 +1,4 @@ |
27 |
DIST Tensile-5.0.2-PR1419.patch.gz 43754 BLAKE2B 3b1d7333ed0115f77816806e7735e25d897dbae3f7a40ece61d655c8f016d9d1c804b586b4e0e75661e20c517f5937a61d5ead25a545f0ce2e4a178bcbb3e7be SHA512 0154d8e14d335f4ecd86e5db335289f8662cede7e5d4b93bf6c56d8e48c1d7d0457271c078c9abbbca1f4aa91f028f6ce6a89efb783ba0207d0f39fd5de8a42c |
28 |
DIST rocm-Tensile-4.3.0.tar.gz 14250149 BLAKE2B 030138eaca2a0aadd96801e6dbd72e510716dd90553ef3795c5e04e00a34a05ecae82b24f755e4033a4acfcdb1cf26291da1e7902bb090f89a010d403e832beb SHA512 126db0b413c716fba8d5be9bff7a44fd1badacbf32f3db8d0db649819177db37ebd56fd22dd3c809655f5d29675be115e698cd10bc3d0b4b23878ae3726fce47 |
29 |
DIST rocm-Tensile-5.0.2.tar.gz 14362090 BLAKE2B d44c3135496db41c4eb2545f6054c84493e89ef6357da881dae6859763338417e7a9e142cdce7e2de0536684bb641049ad0440964adbe68d03ca329f01efabc9 SHA512 f5ab7d7cbc5ba25498a02a6b7c07d5a9a548edcd44b439b92c8718072382adc18ae78274db1a7174e06436ac1396f3b4edafc7f491a2c87086c368e7270e64e3 |
30 |
+DIST rocm-Tensile-5.1.3.tar.gz 14357517 BLAKE2B 7c5881cc2b1d25db39f54a99f9f0a08395a5f7a58deebe74d9868e8f7044db5ae2f3907196adf16dc6abeba0f1f47f5cce5c8900891276daff8e4ad614cf3b94 SHA512 4405cb6de65c1da1fd93910fc901402a24e996ff04eccadf483c25d8eb518e03ea9bbf00e372dd5fe377696e71c39355603095f3c5fc1e26d311ed15d8e3b734 |
31 |
|
32 |
diff --git a/dev-util/Tensile/Tensile-5.0.2-r2.ebuild b/dev-util/Tensile/Tensile-5.0.2-r2.ebuild |
33 |
index 38854fd0c269..22d3a6cee451 100644 |
34 |
--- a/dev-util/Tensile/Tensile-5.0.2-r2.ebuild |
35 |
+++ b/dev-util/Tensile/Tensile-5.0.2-r2.ebuild |
36 |
@@ -3,7 +3,7 @@ |
37 |
|
38 |
EAPI=8 |
39 |
|
40 |
-PYTHON_COMPAT=( python3_{8..10} ) |
41 |
+PYTHON_COMPAT=( python3_{8..11} ) |
42 |
DISTUTILS_USE_PEP517=setuptools |
43 |
inherit distutils-r1 prefix |
44 |
|
45 |
|
46 |
diff --git a/dev-util/Tensile/Tensile-5.0.2-r2.ebuild b/dev-util/Tensile/Tensile-5.1.3.ebuild |
47 |
similarity index 86% |
48 |
copy from dev-util/Tensile/Tensile-5.0.2-r2.ebuild |
49 |
copy to dev-util/Tensile/Tensile-5.1.3.ebuild |
50 |
index 38854fd0c269..f2a39a52dbbb 100644 |
51 |
--- a/dev-util/Tensile/Tensile-5.0.2-r2.ebuild |
52 |
+++ b/dev-util/Tensile/Tensile-5.1.3.ebuild |
53 |
@@ -3,14 +3,16 @@ |
54 |
|
55 |
EAPI=8 |
56 |
|
57 |
-PYTHON_COMPAT=( python3_{8..10} ) |
58 |
+PYTHON_COMPAT=( python3_{8..11} ) |
59 |
DISTUTILS_USE_PEP517=setuptools |
60 |
-inherit distutils-r1 prefix |
61 |
+inherit distutils-r1 llvm prefix |
62 |
+ |
63 |
+LLVM_MAX_SLOT=14 |
64 |
|
65 |
DESCRIPTION="Stretching GPU performance for GEMMs and tensor contractions" |
66 |
HOMEPAGE="https://github.com/ROCmSoftwarePlatform/Tensile" |
67 |
SRC_URI="https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-${PV}.tar.gz -> rocm-Tensile-${PV}.tar.gz |
68 |
- https://github.com/littlewu2508/littlewu2508.github.io/raw/main/gentoo-distfiles/${P}-PR1419.patch.gz" |
69 |
+ https://github.com/littlewu2508/littlewu2508.github.io/raw/main/gentoo-distfiles/${PN}-5.0.2-PR1419.patch.gz" |
70 |
S="${WORKDIR}/${PN}-rocm-${PV}" |
71 |
|
72 |
LICENSE="MIT" |
73 |
@@ -24,24 +26,24 @@ RDEPEND="${PYTHON_DEPS} |
74 |
dev-python/pyyaml[${PYTHON_USEDEP}] |
75 |
dev-python/msgpack[${PYTHON_USEDEP}] |
76 |
>=dev-util/rocm-smi-4.3.0 |
77 |
+ >=sys-devel/clang-14.0.6-r1:${LLVM_MAX_SLOT}= |
78 |
" |
79 |
DEPEND="${RDEPEND} |
80 |
- dev-util/hip:= |
81 |
+ dev-util/hip |
82 |
" |
83 |
|
84 |
PATCHES=( "${FILESDIR}"/${PN}-4.3.0-output-commands.patch |
85 |
"${FILESDIR}"/${PN}-5.0.2-gfx1031.patch |
86 |
"${FILESDIR}"/${PN}-5.0.2-fix-arch-parse.patch |
87 |
"${FILESDIR}"/${PN}-5.0.2-use-ninja.patch |
88 |
- "${FILESDIR}"/${PN}-5.0.2-adjust-parallel.patch |
89 |
- "${WORKDIR}"/${PN}-5.0.2-PR1419.patch |
90 |
) |
91 |
|
92 |
CMAKE_USE_DIR="${WORKDIR}/Source" |
93 |
|
94 |
src_prepare() { |
95 |
distutils-r1_src_prepare |
96 |
- eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0.2-gentoopath.patch) |
97 |
+ sed -e "s,\@LLVM_PATH\@,$(get_llvm_prefix ${LLVM_MAX_SLOT}),g" "${FILESDIR}"/${PN}-5.1.3-gentoopath.patch > "${S}"/gentoopath.patch || die |
98 |
+ eapply $(prefixify_ro "${S}"/gentoopath.patch) |
99 |
|
100 |
pushd ${PN} || die |
101 |
|
102 |
|
103 |
diff --git a/dev-util/Tensile/files/Tensile-5.1.3-gentoopath.patch b/dev-util/Tensile/files/Tensile-5.1.3-gentoopath.patch |
104 |
new file mode 100644 |
105 |
index 000000000000..2f41bf3aa715 |
106 |
--- /dev/null |
107 |
+++ b/dev-util/Tensile/files/Tensile-5.1.3-gentoopath.patch |
108 |
@@ -0,0 +1,75 @@ |
109 |
+Fix incorrect path in scripts and CMakeLists, in order to build tensile_client |
110 |
+=================================================================== |
111 |
+--- Tensile-rocm-5.0.2.orig/Tensile/Source/client/CMakeLists.txt |
112 |
++++ Tensile-rocm-5.0.2/Tensile/Source/client/CMakeLists.txt |
113 |
+@@ -56,3 +56,5 @@ endif() |
114 |
+ foreach(arch IN LISTS TENSILE_GPU_ARCHS) |
115 |
+ target_link_libraries(tensile_client PRIVATE "--amdgpu-target=${arch}") |
116 |
+ endforeach(arch) |
117 |
++ |
118 |
++target_link_libraries(tensile_client PRIVATE LLVMSupport) |
119 |
+Index: Tensile-rocm-5.0.2/Tensile/Source/lib/CMakeLists.txt |
120 |
+=================================================================== |
121 |
+--- Tensile-rocm-5.0.2.orig/Tensile/Source/lib/CMakeLists.txt |
122 |
++++ Tensile-rocm-5.0.2/Tensile/Source/lib/CMakeLists.txt |
123 |
+@@ -47,7 +47,7 @@ set(tensile_sources ${tensile_sources} |
124 |
+ ) |
125 |
+ |
126 |
+ if(TENSILE_USE_LLVM) |
127 |
+- find_package(LLVM 13.0 QUIET CONFIG) |
128 |
++ find_package(LLVM PATHS @LLVM_PATH@ QUIET CONFIG) |
129 |
+ if(NOT LLVM_FOUND) |
130 |
+ find_package(LLVM 12.0 QUIET CONFIG) |
131 |
+ if(NOT LLVM_FOUND) |
132 |
+Index: Tensile-rocm-5.0.2/Tensile/Common.py |
133 |
+=================================================================== |
134 |
+--- Tensile-rocm-5.0.2.orig/Tensile/Common.py |
135 |
++++ Tensile-rocm-5.0.2/Tensile/Common.py |
136 |
+@@ -1873,7 +1873,7 @@ def assignGlobalParameters( config ): |
137 |
+ else: |
138 |
+ print2(" %24s: %8s (unspecified)" % (key, defaultValue)) |
139 |
+ |
140 |
+- globalParameters["ROCmPath"] = "/opt/rocm" |
141 |
++ globalParameters["ROCmPath"] = "@GENTOO_PORTAGE_EPREFIX@/usr" |
142 |
+ if "ROCM_PATH" in os.environ: |
143 |
+ globalParameters["ROCmPath"] = os.environ.get("ROCM_PATH") |
144 |
+ if "TENSILE_ROCM_PATH" in os.environ: |
145 |
+Index: Tensile-rocm-5.0.2/Tensile/ClientWriter.py |
146 |
+=================================================================== |
147 |
+--- Tensile-rocm-5.0.2.orig/Tensile/ClientWriter.py |
148 |
++++ Tensile-rocm-5.0.2/Tensile/ClientWriter.py |
149 |
+@@ -205,7 +205,7 @@ def getBuildClientLibraryScript(buildPat |
150 |
+ import io |
151 |
+ runScriptFile = io.StringIO() |
152 |
+ |
153 |
+- callCreateLibraryCmd = globalParameters["ScriptPath"] + "/bin/TensileCreateLibrary" |
154 |
++ callCreateLibraryCmd = "TensileCreateLibrary" |
155 |
+ |
156 |
+ |
157 |
+ if globalParameters["MergeFiles"]: |
158 |
+Index: Tensile-rocm-5.0.2/Tensile/GenerateSummations.py |
159 |
+=================================================================== |
160 |
+--- Tensile-rocm-5.0.2.orig/Tensile/GenerateSummations.py |
161 |
++++ Tensile-rocm-5.0.2/Tensile/GenerateSummations.py |
162 |
+@@ -57,7 +57,7 @@ def createLibraryForBenchmark(logicPath, |
163 |
+ Selection. |
164 |
+ """ |
165 |
+ |
166 |
+- pythonExePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin", "TensileCreateLibrary") |
167 |
++ pythonExePath = "TensileCreateLibrary" |
168 |
+ args = [pythonExePath, \ |
169 |
+ "--merge-files", "--new-client-only", "--no-short-file-names", "--no-library-print-debug", \ |
170 |
+ "--architecture=all", "--code-object-version=V3", "--cxx-compiler=hipcc", "--library-format=yaml", \ |
171 |
+Index: Tensile-rocm-5.0.2/HostLibraryTests/CMakeLists.txt |
172 |
+=================================================================== |
173 |
+--- Tensile-rocm-5.0.2.orig/HostLibraryTests/CMakeLists.txt |
174 |
++++ Tensile-rocm-5.0.2/HostLibraryTests/CMakeLists.txt |
175 |
+@@ -135,7 +135,7 @@ set(test_sources ${test_sources} |
176 |
+ ) |
177 |
+ |
178 |
+ if(TENSILE_USE_LLVM) |
179 |
+- find_package(LLVM 13.0 QUIET CONFIG) |
180 |
++ find_package(LLVM PATHS @LLVM_PATH@ QUIET CONFIG) |
181 |
+ if(NOT LLVM_FOUND) |
182 |
+ find_package(LLVM 12.0 QUIET CONFIG) |
183 |
+ if(NOT LLVM_FOUND) |