From 00a94845c295879fa92da3e9abeaff04119cdba4 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 29 Sep 2025 17:11:15 +0300 Subject: [PATCH] bench : warm-up all kernels --- examples/bench/bench.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/bench/bench.cpp b/examples/bench/bench.cpp index 4dbc1eb9b2a..36d56769289 100644 --- a/examples/bench/bench.cpp +++ b/examples/bench/bench.cpp @@ -99,7 +99,15 @@ static int whisper_bench_full(const whisper_params & params) { } // text-generation heat - if (int ret = whisper_decode(ctx, tokens, 1, 256, params.n_threads) != 0) { + for (int i = 0; i < 256; i++) { + if (int ret = whisper_decode(ctx, tokens, 1, i, params.n_threads) != 0) { + fprintf(stderr, "error: failed to decode: %d\n", ret); + return 4; + } + } + + // batched heat + if (int ret = whisper_decode(ctx, tokens, 5, 0, params.n_threads) != 0) { fprintf(stderr, "error: failed to decode: %d\n", ret); return 4; }