forked from tum-ei-eda/etiss_riscv_examples
-
Notifications
You must be signed in to change notification settings - Fork 0
356 lines (324 loc) · 13.6 KB
/
etiss_riscv_examples.yml
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
name: Build and Run ETISS RISCV Examples
on:
repository_dispatch:
types: [ seal5-event ]
env:
SEAL5_PREBUILT_DIR: /home/runner/work/seal5_prebuilt/release # TODO: change
ETISS_PREBUILT_DIR: /home/runner/work/etiss_prebuilt
PROG: s4emac
jobs:
compile-riscv-examples-openasip:
if: ${{ github.event.client_payload.name }} == 'openasip_demo'
runs-on: ubuntu-${{ matrix.ubuntu-version }}
strategy:
fail-fast: false
matrix:
ubuntu-version:
- 22.04
build_type:
- Release
# - Debug
tc:
- {version: 2024.09.03, variant: rv32gc_ilp32d, name: riscv32-unknown-elf, arch: rv32gc_xopenasipbase, abi: ilp32d}
# - {version: 2024.09.03_gcc14, variant: rv32gc_ilp32d, name: riscv32-unknown-elf, arch: rv32gc_xopenasipbase, abi: ilp32d}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get current date
run: |
echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
id: date
- name: Download Cached Seal5 Binaries
id: cache-seal5
uses: actions/cache@v4
env:
cache-name: cache-seal5-binaries
with:
path: /home/runner/work/seal5_prebuilt
key: seal5-binaries-${{ matrix.ubuntu-version }}-${{ steps.date.outputs.date }}
restore-keys: |
seal5-binaries-${{ matrix.ubuntu-version }}-
seal5-binaries-
- name: Download Seal5 Pre-built
if: steps.cache-seal5.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
name: demo-install # TODO: add ubuntu version to artifact name
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }}
repository: tum-ei-eda/seal5
path: /home/runner/work/seal5_prebuilt
run-id: ${{ github.event.client_payload.triggered_run_id }}
- name: Download Cached GCC Binaries
id: cache-gcc
uses: actions/cache@v4
env:
cache-name: cache-gcc-binaries
with:
path: gnu/
key: gcc-binaries-${{ matrix.ubuntu-version }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ steps.date.outputs.date }}
restore-keys: |
gcc-binaries-${{ matrix.ubuntu-version }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}
gcc-binaries-${{ matrix.ubuntu-version }}
gcc-binaries-
- name: Download RISCV-GNU-Toolchain
if: steps.cache-gcc.outputs.cache-hit != 'true'
run: |
wget https://syncandshare.lrz.de/dl/fi2p5Ds5PHktjmZGKzR9tx/GCC/default/${{ matrix.tc.version }}/Ubuntu/${{ matrix.ubuntu-version }}/${{ matrix.tc.variant }}.tar.xz
mkdir gnu
cd gnu
tar xvf ../${{ matrix.tc.variant }}.tar.xz
cd ..
rm ${{ matrix.tc.variant }}.tar.xz
- name: Setup Dependencies
run: |
sudo apt -qq install -y cmake
# TODO: install llvm/clang if no seal5 trigger?
- name: Build ETISS RISCV Examples for Testing
run: |
export PATH=$SEAL5_PREBUILT_DIR/bin/:$PATH
chmod +x $SEAL5_PREBUILT_DIR/bin/*
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=rv32gc-llvm-toolchain.cmake -DBUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=$(pwd)/install -DRISCV_ARCH=${{ matrix.tc.arch }} -DRISCV_ABI=${{ matrix.tc.abi }} -DRISCV_TOOLCHAIN_PREFIX=$(pwd)/gnu/ -DRISCV_TOOLCHAIN_BASENAME=${{ matrix.tc.name }}
cmake --build build -j$(nproc)
cmake --install build
- name: Upload ETISS RISCV Built Example Files
uses: actions/upload-artifact@v4
with:
name: etiss-riscv-examples-prebuilt-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }}
path: install/
compile-riscv-examples-s4e:
if: ${{ github.event.client_payload.name }} == 's4e_demo'
runs-on: ubuntu-${{ matrix.ubuntu-version }}
strategy:
fail-fast: false
matrix:
ubuntu-version:
- 22.04
build_type:
- Release
# - Debug
tc:
- {version: 2024.09.03, variant: rv32im_zicsr_zifencei_ilp32, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xs4emac, abi: ilp32}
# - {version: 2024.09.03_gcc14, variant: rv32im_zicsr_zifencei_ilp32, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xs4emac, abi: ilp32}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get current date
run: |
echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
id: date
- name: Download Cached Seal5 Binaries
id: cache-seal5
uses: actions/cache@v4
env:
cache-name: cache-seal5-binaries
with:
path: /home/runner/work/seal5_prebuilt
key: seal5-binaries-${{ matrix.ubuntu-version }}-${{ steps.date.outputs.date }}
restore-keys: |
seal5-binaries-${{ matrix.ubuntu-version }}-
seal5-binaries-
- name: Download Seal5 Pre-built
if: steps.cache-seal5.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
name: demo-install # TODO: add ubuntu version to artifact name
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }}
repository: tum-ei-eda/seal5
path: /home/runner/work/seal5_prebuilt
run-id: ${{ github.event.client_payload.triggered_run_id }}
- name: Download Cached GCC Binaries
id: cache-gcc
uses: actions/cache@v4
env:
cache-name: cache-gcc-binaries
with:
path: gnu/
key: gcc-binaries-${{ matrix.ubuntu-version }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ steps.date.outputs.date }}
restore-keys: |
gcc-binaries-${{ matrix.ubuntu-version }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}
gcc-binaries-${{ matrix.ubuntu-version }}
gcc-binaries-
- name: Download RISCV-GNU-Toolchain
if: steps.cache-gcc.outputs.cache-hit != 'true'
run: |
wget https://syncandshare.lrz.de/dl/fi2p5Ds5PHktjmZGKzR9tx/GCC/default/${{ matrix.tc.version }}/Ubuntu/${{ matrix.ubuntu-version }}/${{ matrix.tc.variant }}.tar.xz
mkdir gnu
cd gnu
tar xvf ../${{ matrix.tc.variant }}.tar.xz
cd ..
rm ${{ matrix.tc.variant }}.tar.xz
- name: Setup Dependencies
run: |
sudo apt -qq install -y cmake
# TODO: install llvm/clang if no seal5 trigger?
- name: Build ETISS RISCV Examples for Testing
run: |
export PATH=$SEAL5_PREBUILT_DIR/bin/:$PATH
chmod +x $SEAL5_PREBUILT_DIR/bin/*
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=rv32gc-llvm-toolchain.cmake -DBUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=$(pwd)/install -DRISCV_ARCH=${{ matrix.tc.arch }} -DRISCV_ABI=${{ matrix.tc.abi }} -DRISCV_TOOLCHAIN_PREFIX=$(pwd)/gnu/ -DRISCV_TOOLCHAIN_BASENAME=${{ matrix.tc.name }}
cmake --build build -j$(nproc)
cmake --install build
- name: Upload ETISS RISCV Built Example Files
uses: actions/upload-artifact@v4
with:
name: etiss-riscv-examples-prebuilt-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }}
path: install/
run-riscv-examples-openasip:
if: ${{ github.event.client_payload.name }} == 'openasip_demo'
needs: compile-riscv-examples-openasip
runs-on: ubuntu-${{ matrix.ubuntu-version }}
strategy:
fail-fast: false
matrix:
ubuntu-version:
- 22.04
build_type:
- Release
# - Debug
tc:
- {version: 2024.09.03, variant: rv32gc_ilp32d, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xopenasipbase, abi: ilp32d}
# - {version: 2024.09.03_gcc14, variant: rv32gc_ilp32d, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xopenasipbase, abi: ilp32d}
etiss_arch:
- RV32IMAFDC
- RV32IMAFDCXOPENASIP
prog:
# - dhry
# - embench_aha-mont64
# - embench_crc32
# - embench_cubic
# - embench_edn
# - embench_huffbench
# - embench_matmult-int
# - embench_md5sum
# - embench_minver
# - embench_nbody
# - embench_nettle-aes
# - embench_nettle-sha256
# - embench_nsichneu
# - embench_picojpeg
# - embench_primecount
# - embench_qrduino
# - embench_sglib-combined
# - embench_slre
# - embench_st
# - example_c
# - example_cpp
- hello_world
# - interactive
# - semihosting_cpp
# - test_cases
# - tflm_toy
# - tvm_toy
# TODO: openasip example
steps:
- name: Download Pre-built ETISS Artifact
uses: actions/download-artifact@v4
with:
name: etiss_prebuilt
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }}
path: /home/runner/work/etiss_prebuilt
repository: tum-ei-eda/etiss_riscv_test_env
run-id: ${{ github.event.client_payload.etiss_run_id }}
- name: Download ETISS RISCV Examples Artifact
uses: actions/download-artifact@v4
with:
name: etiss-riscv-examples-prebuilt-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }}
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }}
path: install
- name: Setup Dependencies
run: |
sudo apt -qq install -y libboost-system-dev libboost-filesystem-dev libboost-program-options-dev
# TODO: install llvm/clang if no seal5 trigger?
- name: Run ETISS Example ${{ matrix.config.prog }} on ${{ matrix.config.etiss_arch }}
run: |
chmod +x $ETISS_PREBUILT_DIR/bin/bare_etiss_processor
export LD_LIBRARY_PATH=$ETISS_PREBUILT_DIR/lib:$ETISS_PREBUILT_DIR/lib/plugins:$LD_LIBRRARY_PATH
export PATH=$ETISS_PREBUILT_DIR/bin/:$PATH
bare_etiss_processor -iinstall/ini/${{ matrix.config.prog }}.ini --arch.cpu=${{ matrix.config.etiss_arch }} 2>&1 | tee out.txt
- name: Upload ETISS Outputs
uses: actions/upload-artifact@v4
with:
name: etiss-output-${{ matrix.prog }}-${{ matrix.etiss_arch }}-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }}
path: out.txt
run-riscv-examples-s4e:
if: ${{ github.event.client_payload.name }} == 's4e_demo'
needs: compile-riscv-examples-s4e
runs-on: ubuntu-${{ matrix.ubuntu-version }}
strategy:
fail-fast: false
matrix:
ubuntu-version:
- 22.04
build_type:
- Release
# - Debug
tc:
- {version: 2024.09.03, variant: rv32im_zicsr_zifencei_ilp32, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xs4emac, abi: ilp32}
# - {version: 2024.09.03_gcc14, variant: rv32im_zicsr_zifencei_ilp32, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xs4emac, abi: ilp32}
etiss_arch:
- RV32IMAFDC
- RV32IMCXS4EMAC
prog:
# - dhry
# - embench_aha-mont64
# - embench_crc32
# - embench_cubic
# - embench_edn
# - embench_huffbench
# - embench_matmult-int
# - embench_md5sum
# - embench_minver
# - embench_nbody
# - embench_nettle-aes
# - embench_nettle-sha256
# - embench_nsichneu
# - embench_picojpeg
# - embench_primecount
# - embench_qrduino
# - embench_sglib-combined
# - embench_slre
# - embench_st
# - example_c
# - example_cpp
- hello_world
# - interactive
# - semihosting_cpp
# - test_cases
# - tflm_toy
# - tvm_toy
- s4emac
exclude:
- etiss_arch: RV32IMAFDC
prog: s4emac
steps:
- name: Download Pre-built ETISS Artifact
uses: actions/download-artifact@v4
with:
name: etiss_prebuilt
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }}
path: /home/runner/work/etiss_prebuilt
repository: tum-ei-eda/etiss_riscv_test_env
run-id: ${{ github.event.client_payload.etiss_run_id }}
- name: Download ETISS RISCV Examples Artifact
uses: actions/download-artifact@v4
with:
name: etiss-riscv-examples-prebuilt-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }}
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }}
path: install
- name: Setup Dependencies
run: |
sudo apt -qq install -y libboost-system-dev libboost-filesystem-dev libboost-program-options-dev
# TODO: install llvm/clang if no seal5 trigger?
- name: Run ETISS Example ${{ matrix.config.prog }} on ${{ matrix.config.etiss_arch }}
run: |
chmod +x $ETISS_PREBUILT_DIR/bin/bare_etiss_processor
export LD_LIBRARY_PATH=$ETISS_PREBUILT_DIR/lib:$ETISS_PREBUILT_DIR/lib/plugins:$LD_LIBRRARY_PATH
export PATH=$ETISS_PREBUILT_DIR/bin/:$PATH
bare_etiss_processor -iinstall/ini/${{ matrix.config.prog }}.ini --arch.cpu=${{ matrix.config.etiss_arch }} 2>&1 | tee out.txt
- name: Upload ETISS Outputs
uses: actions/upload-artifact@v4
with:
name: etiss-output-${{ matrix.prog }}-${{ matrix.etiss_arch }}-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }}
path: out.txt