From: Georgi Gerganov Date: Mon, 29 Sep 2025 14:27:53 +0000 (+0300) Subject: bench : warm-up all kernels (#3438) X-Git-Tag: upstream/1.8.0~13 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=a77d11d91e77ffdd947b0748df2c62c62c2f7fb6;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp bench : warm-up all kernels (#3438) --- diff --git a/examples/bench/bench.cpp b/examples/bench/bench.cpp index 4dbc1eb9..36d56769 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; }