-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
230 lines (202 loc) · 5.97 KB
/
.gitlab-ci.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
stages:
- preevaluation
- synthesis
- benchmark
- analysis
- release
variables:
TAG_NAME: cibuild-${CI_PIPELINE_IID}
RELEASE_NAME: CI build ${CI_PIPELINE_IID}
PACKAGE_REGISTRY_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic
default:
before_script:
- source scripts/env.sh
id_tokens:
CI_JOB_JWT:
aud: https://git.uni-paderborn.de
.cheap_job:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Run for all merge-requests (even drafts)
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run on the main branch
.expensive_job:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TITLE !~ /^Draft:/ # Run for non-draft merge requests
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run on the main branch
.synthesis:
extends: .expensive_job
stage: synthesis
tags:
- noctua2
variables:
SCHEDULER_PARAMETERS: -A hpc-lco-kenter -p normal -q fpgasynthesis -t 1-00:00:00 -c 8 --mem 120G
script:
- ./scripts/synthesize.sh "${PACKAGE_REGISTRY_URL}" "${TAG_NAME}" "${STST_EXAMPLE}" "${STST_EXECUTABLE}"
artifacts:
when: always
paths:
- "build/examples/${STST_EXAMPLE}/${STST_EXECUTABLE}"
- "build/examples/${STST_EXAMPLE}/${STST_EXECUTABLE}.prj/reports"
- "build/examples/${STST_EXAMPLE}/${STST_EXECUTABLE}.prj/quartuserr.tmp"
- "build/examples/${STST_EXAMPLE}/${STST_EXECUTABLE}.prj/quartus_sh_compile.log"
- "build/examples/${STST_EXAMPLE}/${STST_EXECUTABLE}.tar.gz"
# =============
# Preevaluation
# =============
documentation:
extends: .cheap_job
stage: preevaluation
tags:
- docker-shared
image: alpine
before_script:
- apk add --no-cache doxygen graphviz font-noto
script:
- doxygen
artifacts:
paths:
- doxygen/html
unit test:
extends: .cheap_job
stage: preevaluation
tags:
- noctua2
variables:
SCHEDULER_PARAMETERS: -A hpc-lco-kenter -p normal -t 0:10:00 -c 16 --mem 4G
script:
- mkdir -p build
- cd build
- cmake ..
- make unit_test -j16
- ./tests/unit_test
# ==========
# Convection
# ==========
convection synthesis:
extends: .synthesis
variables:
STST_EXAMPLE: "convection"
STST_EXECUTABLE: "convection"
convection benchmark:
extends: .expensive_job
stage: benchmark
needs:
- convection synthesis
tags:
- noctua2
variables:
SCHEDULER_PARAMETERS: -A hpc-lco-kenter -p fpga --constraint=bittware_520n_20.4.0_hpc -t 00:15:00
script:
- cd examples/convection
- ./scripts/benchmark.jl default ../../build/examples/convection/convection
- ./scripts/render_animation.jl out
artifacts:
paths:
- examples/convection/out
- examples/convection/animation.mp4
- examples/convection/metrics.json
- examples/convection/pseudo_transient_runtimes.csv
# ==================
# Hotspot (Monotile)
# ==================
hotspot (monotile) synthesis:
extends: .synthesis
variables:
STST_EXAMPLE: "hotspot"
STST_EXECUTABLE: "hotspot_mono"
.hotspot benchmark:
extends: .expensive_job
stage: benchmark
tags:
- noctua2
variables:
SCHEDULER_PARAMETERS: -A hpc-lco-kenter -p fpga --constraint=bittware_520n_20.4.0_hpc -t 00:15:00
script:
- cd examples/hotspot
- ./scripts/benchmark.jl max_perf ../../build/examples/hotspot/${STST_EXECUTABLE} ${STST_VARIANT}
artifacts:
paths:
- examples/hotspot/metrics.*.json
hotspot (monotile) benchmark:
extends: .expensive_job
extends: .hotspot benchmark
needs:
- hotspot (monotile) synthesis
variables:
STST_EXECUTABLE: hotspot_mono
STST_VARIANT: monotile
# ================
# Hotspot (Tiling)
# ================
hotspot (tiling) synthesis:
extends: .synthesis
variables:
STST_EXAMPLE: "hotspot"
STST_EXECUTABLE: "hotspot_tiling"
hotspot (tiling) benchmark:
extends: .hotspot benchmark
needs:
- hotspot (tiling) synthesis
variables:
STST_EXECUTABLE: hotspot_tiling
STST_VARIANT: tiling
stage: benchmark
# ===============
# FDTD (Monotile)
# ===============
fdtd (monotile) synthesis:
extends: .synthesis
variables:
STST_EXAMPLE: "fdtd"
STST_EXECUTABLE: "fdtd_coef_device_mono"
.fdtd benchmark:
extends: .expensive_job
stage: benchmark
tags:
- noctua2
variables:
SCHEDULER_PARAMETERS: -A hpc-lco-kenter -p fpga --constraint=bittware_520n_20.4.0_hpc -t 00:15:00
script:
- cd examples/fdtd
- ./scripts/benchmark.jl max_perf ../../build/examples/fdtd/${STST_EXECUTABLE} ${STST_VARIANT}
- ./scripts/plot_frames.jl frames .
artifacts:
paths:
- examples/fdtd/*.csv
- examples/fdtd/*.png
- examples/fdtd/metrics.*.json
fdtd (monotile) benchmark:
extends: .fdtd benchmark
needs:
- fdtd (monotile) synthesis
variables:
STST_EXECUTABLE: fdtd_coef_device_mono
STST_VARIANT: monotile
# =============
# FDTD (Tiling)
# =============
fdtd (tiling) synthesis:
extends: .synthesis
variables:
STST_EXAMPLE: "fdtd"
STST_EXECUTABLE: "fdtd_coef_device_tiling"
fdtd (tiling) benchmark:
extends: .fdtd benchmark
needs:
- fdtd (tiling) synthesis
variables:
STST_EXECUTABLE: fdtd_coef_device_tiling
STST_VARIANT: tiling
# =======
# Release
# =======
release:
stage: release
when: always
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Only deploy the binaries on the main branch
tags:
- noctua2
variables:
SCHEDULER_PARAMETERS: -A hpc-lco-kenter -p normal -c 8 --mem 2G -t 00:05:00
script:
- ./scripts/publish-release.sh