]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
bench : print system info before ctx check
authorGeorgi Gerganov <redacted>
Wed, 25 Jun 2025 12:59:23 +0000 (15:59 +0300)
committerGeorgi Gerganov <redacted>
Wed, 25 Jun 2025 13:01:32 +0000 (16:01 +0300)
examples/bench/bench.cpp
scripts/bench-all.sh

index 1512f316e54ea9089491f9221746f7679c1a3680..4dbc1eb9b2a776114d3183e30729840eb96d6e69 100644 (file)
@@ -66,17 +66,12 @@ static int whisper_bench_full(const whisper_params & params) {
     cparams.use_gpu    = params.use_gpu;
     cparams.flash_attn = params.flash_attn;
 
-    struct whisper_context * ctx = whisper_init_from_file_with_params(params.model.c_str(), cparams);
-    if (ctx == nullptr) {
-        fprintf(stderr, "error: failed to initialize whisper context\n");
-        return 2;
-    }
-
     {
         fprintf(stderr, "\n");
         fprintf(stderr, "system_info: n_threads = %d / %d | %s\n", params.n_threads, std::thread::hardware_concurrency(), whisper_print_system_info());
     }
 
+    struct whisper_context * ctx = whisper_init_from_file_with_params(params.model.c_str(), cparams);
     if (ctx == nullptr) {
         fprintf(stderr, "error: failed to initialize whisper context\n");
         return 2;
index 01d6143ce313943b5173c9eb3f825735843a9c1a..4c1a7a101fd0c72399726a79f7d7e02cb418f06c 100755 (executable)
@@ -104,6 +104,8 @@ for model in "${models[@]}"; do
 
     if [[ $system_info == *"METAL = 1"* ]]; then
         config="$config METAL"
+    elif [[ $system_info == *"Metal : EMBED_LIBRARY = 1"* ]]; then
+        config="$config METAL"
     fi
 
     commit=$(git rev-parse --short HEAD)