Skip to content

Commit 00a9484

Browse files
committed
bench : warm-up all kernels
1 parent 22c12ee commit 00a9484

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/bench/bench.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,15 @@ static int whisper_bench_full(const whisper_params & params) {
9999
}
100100

101101
// text-generation heat
102-
if (int ret = whisper_decode(ctx, tokens, 1, 256, params.n_threads) != 0) {
102+
for (int i = 0; i < 256; i++) {
103+
if (int ret = whisper_decode(ctx, tokens, 1, i, params.n_threads) != 0) {
104+
fprintf(stderr, "error: failed to decode: %d\n", ret);
105+
return 4;
106+
}
107+
}
108+
109+
// batched heat
110+
if (int ret = whisper_decode(ctx, tokens, 5, 0, params.n_threads) != 0) {
103111
fprintf(stderr, "error: failed to decode: %d\n", ret);
104112
return 4;
105113
}

0 commit comments

Comments
 (0)