]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
bench : warm-up all kernels (#3438)
authorGeorgi Gerganov <redacted>
Mon, 29 Sep 2025 14:27:53 +0000 (17:27 +0300)
committerGitHub <redacted>
Mon, 29 Sep 2025 14:27:53 +0000 (17:27 +0300)
examples/bench/bench.cpp

index 4dbc1eb9b2a776114d3183e30729840eb96d6e69..36d56769289f27d0e508274afc218e617d4f3f29 100644 (file)
@@ -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;
     }