-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathnet.mkiol.SpeechNote.Addon.amd.yaml
249 lines (241 loc) · 8.1 KB
/
net.mkiol.SpeechNote.Addon.amd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
id: net.mkiol.SpeechNote.Addon.amd
runtime: net.mkiol.SpeechNote
sdk: org.kde.Sdk//5.15-23.08
build-extension: true
build-options:
no-debuginfo: true
prefix: /app/extensions/amd
cleanup:
- /bin
- /lib/cmake
- /lib/pkgconfig
- /include
- "*.a"
modules:
- name: rocm
only-arches:
- x86_64
buildsystem: simple
build-commands:
- mkdir -p ${FLATPAK_DEST}/rocm
- |
set -e
for f in *.deb; do
if [ -f "$f" ]; then
ar x "$f"
rm control.tar.*
rm debian-binary
tar -xf data.tar.*
rm data.tar.*
fi
done
- mv --no-target-directory opt/rocm* ${FLATPAK_DEST}/rocm
- chmod -R 644 ${FLATPAK_DEST}/rocm/lib/llvm/share/gdb/python/ompd/*.so*
build-options:
strip: true
cleanup:
- /rocm/bin
- /rocm/hip*
- /rocm/hsa
- /rocm/roc*
- /rocm/miopen*
- /rocm/rccl*
- /rocm/oam
- /rocm/share/doc
- /rocm/share/dec
- /rocm/share/hip
- /rocm/share/hipfort
- /rocm/share/html
- /rocm/share/rccl
- /rocm/share/rocm
- /rocm/share/miopen/perf_models
- /rocm/share/openmp-extras
- /rocm/share/rocmcmakebuildtools
- /rocm/share/rocprofiler*
- /rocm/share/modulefiles
- /rocm/.info
- /rocm/include
- /rocm/opencl
- /rocm/lib/libOpenCL.so*
- /rocm/lib/cmake
- /rocm/lib/rocmmod
- /rocm/lib/CMakeFiles
- /rocm/lib/llvm/lib-debug
- /rocm/lib/llvm/share
- /rocm/libexec
- /rocm/llvm
sources:
- rocm-deb-sources.yaml
- name: oneapi
only-arches:
- x86_64
buildsystem: simple
cleanup:
- /oneapi
build-commands:
- sh l_BaseKit_p_2024.0.0.49564_offline.sh --extract-folder ./oneapi -a --eula accept --silent --install-dir ${FLATPAK_DEST}/oneapi
sources:
- type: file
url: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/20f4e6a1-6b0b-4752-b8c1-e5eacba10e01/l_BaseKit_p_2024.0.0.49564_offline.sh
sha256: f6613cb9c79fbf61c2e541144b8d5c70be845e071f29feb5686b64481528276d
- name: onednn
only-arches:
- x86_64
buildsystem: cmake-ninja
cleanup:
- /bin
- /include
- /share/doc
- /lib/cmake
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DONEDNN_LIBRARY_TYPE=STATIC
- -DONEDNN_BUILD_EXAMPLES=OFF
- -DONEDNN_BUILD_TESTS=OFF
- -DONEDNN_ENABLE_WORKLOAD=INFERENCE
- -DONEDNN_ENABLE_PRIMITIVE=CONVOLUTION;REORDER
- -DONEDNN_BUILD_GRAPH=OFF
sources:
- type: archive
url: https://github.com/oneapi-src/oneDNN/archive/refs/tags/v3.3.1.tar.gz
sha256: e0b7a9452162e854cf08b4e90bcd1b382b9903ace6a61503a872573880d24c3f
- name: python3-pybind11
only-arches:
- x86_64
buildsystem: simple
cleanup:
- /bin
- /lib/python3.11/site-packages/pybind11*
build-commands:
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
--prefix=${FLATPAK_DEST} "pybind11" --no-build-isolation
sources:
- type: file
url: https://files.pythonhosted.org/packages/06/55/9f73c32dda93fa4f539fafa268f9504e83c489f460c380371d94296126cd/pybind11-2.11.1-py3-none-any.whl
sha256: 33cdd02a6453380dd71cc70357ce388ad1ee8d32bd0e38fc22b273d050aa29b3
- name: ctranslate2-amd
only-arches:
- x86_64
buildsystem: cmake-ninja
build-options:
env:
PYTHONPATH: /app/extensions/amd/lib/python3.11/site-packages:/app/lib/python3.11/site-packages
CTRANSLATE2_ROOT: /app/extensions/amd
cleanup:
- /bin
- /include
- /lib/cmake
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_CLI=OFF
- -DCUDA_DYNAMIC_LOADING=ON
- -DOPENMP_RUNTIME=COMP
- -DWITH_MKL=ON
- -DWITH_DNNL=ON
- -DWITH_RUY=ON
- -DINTEL_ROOT=/app/extensions/amd/oneapi
- -DCMAKE_CXX_FLAGS=-msse4.1
- -DCMAKE_SYSTEM_PREFIX_PATH=/app
post-install:
- cd python && python setup.py bdist_wheel
- pip3 install --verbose --exists-action=i --no-index --prefix=${FLATPAK_DEST} --no-build-isolation python/dist/*.whl
- strip ${FLATPAK_DEST}/lib/libctranslate2.so.4.3.1
sources:
- type: git
url: https://github.com/OpenNMT/CTranslate2.git
commit: v4.3.1
- type: patch
path: ../patches/ctranslate2.patch
- name: python3-torch-rocm
only-arches:
- x86_64
buildsystem: simple
cleanup:
- /bin/convert*
- /bin/torch*
- /lib/python3.11/site-packages/torch/lib/rocblas
- /lib/python3.11/site-packages/torch/lib/libamd*
- /lib/python3.11/site-packages/torch/lib/libroc*
- /lib/python3.11/site-packages/torch/lib/libhip*
- /lib/python3.11/site-packages/torch/lib/libhsa*
- /lib/python3.11/site-packages/torch/lib/libMIOpen*
- /lib/python3.11/site-packages/torch/lib/librccl*
- /lib/python3.11/site-packages/torch/lib/libnuma*
- /lib/python3.11/site-packages/torch/lib/hipblas*
- /lib/python3.11/site-packages/torch/lib/msccl-algorithms
- /lib/python3.11/site-packages/torch/include
build-options:
env:
PYTHONPATH: /app/extensions/amd/lib/python3.11/site-packages:/app/lib/python3.11/site-packages
build-commands:
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
--prefix=${FLATPAK_DEST} torch torchaudio --no-build-isolation
sources:
- type: file
url: https://download.pytorch.org/whl/rocm6.2/torch-2.5.1%2Brocm6.2-cp311-cp311-linux_x86_64.whl
dest-filename: torch-2.5.1+rocm6.2-cp311-cp311-linux_x86_64.whl
sha256: 9c4c4d985923d0e31aab4108c56a1586ca599ab26abc919833b890f7f40dcc01
- type: file
url: https://download.pytorch.org/whl/rocm6.2/torchaudio-2.5.1%2Brocm6.2-cp311-cp311-linux_x86_64.whl
dest-filename: torchaudio-2.5.1+rocm6.2-cp311-cp311-linux_x86_64.whl
sha256: 334e2c8936533c656095022d89fcb74ac23278ac88e2210b63f49c1810c88e91
- type: file
url: https://download.pytorch.org/whl/pytorch_triton_rocm-3.1.0-cp311-cp311-linux_x86_64.whl
sha256: 4b0a563986aa591ecbbfd69d53f171447f64ba453cecaafd80d853b3f1047eca
- name: suitesparse
buildsystem: cmake-ninja
config-opts:
- -DBUILD_STATIC_LIBS=OFF
- -DBUILD_SHARED_LIBS=ON
- -DSUITESPARSE_ENABLE_PROJECTS=cholmod;amd;colamd;cxsparse
cleanup:
- /bin
- /include
- /lib/cmake
- /lib/debug
- /lib/*.a
- /lib/*.la
- /lib/pkgconfig
- /share/man
sources:
- type: git
url: https://github.com/DrTimothyAldenDavis/SuiteSparse.git
tag: v7.8.3
commit: d3c4926d2c47fd6ae558e898bfc072ade210a2a1
- name: whispercpp-hipblas
only-arches:
- x86_64
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DGGML_NATIVE=OFF
- -DGGML_HIPBLAS=ON
- -DCMAKE_HIP_ARCHITECTURES=gfx900;gfx902;gfx904;gfx906;gfx908;gfx909;gfx90a;gfx90c;gfx940;gfx1010;gfx1011;gfx1012;gfx1013;gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036;gfx1100;gfx1101;gfx1102;gfx1103
- -DROCM_PATH=/app/extensions/amd/rocm
- -Dhip_DIR=/app/extensions/amd/rocm/hip
- -Drocblas_DIR=/app/extensions/amd/rocm/rocblas
- -DHIP_PLATFORM=amd
- -DGGML_OPENMP=OFF
- -DGGML_AVX=ON
- -DGGML_AVX2=OFF
- -DGGML_FMA=OFF
- -DGGML_F16C=ON
- -DBUILD_SHARED_LIBS=ON
- -DWHISPER_BUILD_TESTS=OFF
- -DWHISPER_BUILD_EXAMPLES=OFF
- -DCMAKE_C_FLAGS=-O3
- -DCMAKE_CXX_FLAGS=-O3
- -DWHISPER_TARGET_NAME=whisper-hipblas
sources:
- type: archive
url: https://github.com/ggerganov/whisper.cpp/archive/refs/tags/v1.7.1.tar.gz
sha256: 97f19a32212f2f215e538ee37a16ff547aaebc54817bd8072034e02466ce6d55
- type: patch
path: ../patches/whispercpp.patch
- name: metadata
buildsystem: simple
build-commands:
- install -Dm644 -t ${FLATPAK_DEST}/share/metainfo ${FLATPAK_ID}.metainfo.xml
sources:
- type: file
path: net.mkiol.SpeechNote.Addon.amd.metainfo.xml