@@ -3,6 +3,22 @@ name: coprocessor-benchmark-gpu
3
3
4
4
on :
5
5
workflow_dispatch :
6
+ inputs :
7
+ profile :
8
+ description : " Instance type"
9
+ required : true
10
+ type : choice
11
+ options :
12
+ - " l40 (n3-L40x1)"
13
+ - " 4-l40 (n3-L40x4)"
14
+ - " single-h100 (n3-H100x1)"
15
+ - " 2-h100 (n3-H100x2)"
16
+ - " 4-h100 (n3-H100x4)"
17
+ - " multi-h100 (n3-H100x8)"
18
+ - " multi-h100-nvlink (n3-H100x8-NVLink)"
19
+ - " multi-h100-sxm5 (n3-H100x8-SXM5)"
20
+ - " multi-h100-sxm5_fallback (n3-H100x8-SXM5)"
21
+
6
22
schedule :
7
23
# Weekly tests @ 1AM
8
24
- cron : " 0 1 * * 6"
17
33
RUST_BACKTRACE : " full"
18
34
RUST_MIN_STACK : " 8388608"
19
35
CHECKOUT_TOKEN : ${{ secrets.REPO_CHECKOUT_TOKEN || secrets.GITHUB_TOKEN }}
20
- PROFILE : " multi-h100-sxm5 (n3-H100x8-SXM5)"
36
+ PROFILE_SCHEDULED_RUN : " multi-h100-sxm5 (n3-H100x8-SXM5)"
37
+ PROFILE_MANUAL_RUN : ${{ inputs.profile }}
38
+ IS_MANUAL_RUN : ${{ github.event_name == 'workflow_dispatch' }}
21
39
BENCHMARK_TYPE : " ALL"
22
40
OPTIMIZATION_TARGET : " throughput"
23
41
BATCH_SIZE : " 5000"
@@ -40,15 +58,25 @@ jobs:
40
58
- name : Parse profile
41
59
id : parse_profile
42
60
run : |
61
+ if [[ ${IS_MANUAL_RUN} == true ]]; then
62
+ PROFILE_RAW="${PROFILE_MANUAL_RUN}"
63
+ else
64
+ PROFILE_RAW="${PROFILE_SCHEDULED_RUN}"
65
+ fi
43
66
# shellcheck disable=SC2001
44
- PROFILE_VAL=$(echo "${PROFILE }" | sed 's|\(.*\)[[:space:]](.*)|\1|')
67
+ PROFILE_VAL=$(echo "${PROFILE_RAW }" | sed 's|\(.*\)[[:space:]](.*)|\1|')
45
68
echo "profile=$PROFILE_VAL" >> "${GITHUB_OUTPUT}"
46
69
47
70
- name : Parse hardware name
48
71
id : parse_hardware_name
49
72
run : |
73
+ if [[ ${IS_MANUAL_RUN} == true ]]; then
74
+ PROFILE_RAW="${PROFILE_MANUAL_RUN}"
75
+ else
76
+ PROFILE_RAW="${PROFILE}"
77
+ fi
50
78
# shellcheck disable=SC2001
51
- PROFILE_VAL=$(echo "${PROFILE }" | sed 's|.*[[:space:]](\(.*\))|\1|')
79
+ PROFILE_VAL=$(echo "${PROFILE_RAW }" | sed 's|.*[[:space:]](\(.*\))|\1|')
52
80
echo "name=$PROFILE_VAL" >> "${GITHUB_OUTPUT}"
53
81
54
82
setup-instance :
@@ -130,6 +158,13 @@ jobs:
130
158
} >> "${GITHUB_ENV}"
131
159
working-directory : tfhe-rs/
132
160
161
+ - name : Setup Hyperstack dependencies
162
+ uses : ./tfhe-rs/.github/actions/gpu_setup
163
+ with :
164
+ cuda-version : ${{ matrix.cuda }}
165
+ gcc-version : ${{ matrix.gcc }}
166
+ github-instance : ${{ env.SECRETS_AVAILABLE == 'false' }}
167
+
133
168
- name : Check fhEVM and TFHE-rs repos
134
169
run : |
135
170
pwd
@@ -140,21 +175,14 @@ jobs:
140
175
run : git lfs checkout
141
176
working-directory : fhevm/
142
177
143
- - name : Setup Hyperstack dependencies
144
- uses : ./fhevm/.github/actions/gpu_setup
145
- with :
146
- cuda-version : ${{ matrix.cuda }}
147
- gcc-version : ${{ matrix.gcc }}
148
- github-instance : ${{ env.SECRETS_AVAILABLE == 'false' }}
149
-
150
178
- name : Install rust
151
179
uses : dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # zizmor: ignore[stale-action-refs] this action doesn't create releases
152
180
with :
153
181
toolchain : nightly
154
182
155
183
- name : Install cargo dependencies
156
184
run : |
157
- sudo apt-get install -y protobuf-compiler cmake pkg-config libssl-dev \
185
+ sudo apt-get install -y protobuf-compiler pkg-config libssl-dev \
158
186
libclang-dev docker-compose-v2 docker.io acl
159
187
sudo usermod -aG docker "$USER"
160
188
newgrp docker
@@ -181,9 +209,16 @@ jobs:
181
209
username : ${{ github.actor }}
182
210
password : ${{ secrets.GITHUB_TOKEN }}
183
211
212
+ - name : Login to Chainguard Registry
213
+ uses : docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
214
+ with :
215
+ registry : cgr.dev
216
+ username : ${{ secrets.CGR_USERNAME }}
217
+ password : ${{ secrets.CGR_PASSWORD }}
218
+
184
219
- name : Init database
185
220
run : make init_db
186
- working-directory : fhevm/coprocessor/fhevm-engine/coprocessor
221
+ working-directory : fhevm/coprocessor/fhevm-engine/tfhe-worker
187
222
188
223
- name : Use Node.js
189
224
uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
@@ -203,8 +238,12 @@ jobs:
203
238
204
239
- name : Profile erc20 no-cmux benchmark on GPU
205
240
run : |
206
- BENCHMARK_BATCH_SIZE="${BATCH_SIZE}" FHEVM_DF_SCHEDULE="${SCHEDULING_POLICY}" BENCHMARK_TYPE="LATENCY" OPTIMIZATION_TARGET="${OPTIMIZATION_TARGET}" make -e "profile_erc20_gpu"
207
- working-directory : fhevm/coprocessor/fhevm-engine/coprocessor
241
+ BENCHMARK_BATCH_SIZE="${BATCH_SIZE}" \
242
+ FHEVM_DF_SCHEDULE="${SCHEDULING_POLICY}" \
243
+ BENCHMARK_TYPE="THROUGHPUT_200" \
244
+ OPTIMIZATION_TARGET="${OPTIMIZATION_TARGET}" \
245
+ make -e "profile_erc20_gpu"
246
+ working-directory : fhevm/coprocessor/fhevm-engine/tfhe-worker
208
247
209
248
- name : Get nsys profile name
210
249
id : nsys_profile_name
@@ -215,25 +254,25 @@ jobs:
215
254
REPORT_NAME : ${{ steps.nsys_profile_name.outputs.profile }}
216
255
run : |
217
256
mv report1.nsys-rep ${{ env.REPORT_NAME }}
218
- working-directory : fhevm/coprocessor/fhevm-engine/coprocessor
257
+ working-directory : fhevm/coprocessor/fhevm-engine/tfhe-worker
219
258
220
259
- name : Upload profile artifact
221
260
env :
222
261
REPORT_NAME : ${{ steps.nsys_profile_name.outputs.profile }}
223
262
uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
224
263
with :
225
264
name : ${{ env.REPORT_NAME }}
226
- path : fhevm/coprocessor/fhevm-engine/coprocessor /${{ env.REPORT_NAME }}
265
+ path : fhevm/coprocessor/fhevm-engine/tfhe-worker /${{ env.REPORT_NAME }}
227
266
228
267
- name : Run latency benchmark on GPU
229
268
run : |
230
269
BENCHMARK_BATCH_SIZE="${BATCH_SIZE}" FHEVM_DF_SCHEDULE="${SCHEDULING_POLICY}" BENCHMARK_TYPE="LATENCY" OPTIMIZATION_TARGET="${OPTIMIZATION_TARGET}" make -e "benchmark_${BENCHMARKS}_gpu"
231
- working-directory : fhevm/coprocessor/fhevm-engine/coprocessor
270
+ working-directory : fhevm/coprocessor/fhevm-engine/tfhe-worker
232
271
233
272
- name : Run throughput benchmarks on GPU
234
273
run : |
235
274
BENCHMARK_BATCH_SIZE="${BATCH_SIZE}" FHEVM_DF_SCHEDULE="${SCHEDULING_POLICY}" BENCHMARK_TYPE="THROUGHPUT_200" OPTIMIZATION_TARGET="${OPTIMIZATION_TARGET}" make -e "benchmark_${BENCHMARKS}_gpu"
236
- working-directory : fhevm/coprocessor/fhevm-engine/coprocessor
275
+ working-directory : fhevm/coprocessor/fhevm-engine/tfhe-worker
237
276
238
277
- name : Parse results
239
278
run : |
@@ -246,7 +285,7 @@ jobs:
246
285
--commit-date "${COMMIT_DATE}" \
247
286
--bench-date "${BENCH_DATE}" \
248
287
--walk-subdirs \
249
- --crate "coprocessor/fhevm-engine/coprocessor " \
288
+ --crate "coprocessor/fhevm-engine/tfhe-worker " \
250
289
--name-suffix "operation_batch_size_${BATCH_SIZE}-schedule_${SCHEDULING_POLICY}-optimization_target_${OPTIMIZATION_TARGET}"
251
290
working-directory : fhevm/
252
291
0 commit comments