Skip to content

Commit dc8dda6

Browse files
committed
bench : print system info before ctx check
1 parent 1ad258c commit dc8dda6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

examples/bench/bench.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,12 @@ static int whisper_bench_full(const whisper_params & params) {
6666
cparams.use_gpu = params.use_gpu;
6767
cparams.flash_attn = params.flash_attn;
6868

69-
struct whisper_context * ctx = whisper_init_from_file_with_params(params.model.c_str(), cparams);
70-
if (ctx == nullptr) {
71-
fprintf(stderr, "error: failed to initialize whisper context\n");
72-
return 2;
73-
}
74-
7569
{
7670
fprintf(stderr, "\n");
7771
fprintf(stderr, "system_info: n_threads = %d / %d | %s\n", params.n_threads, std::thread::hardware_concurrency(), whisper_print_system_info());
7872
}
7973

74+
struct whisper_context * ctx = whisper_init_from_file_with_params(params.model.c_str(), cparams);
8075
if (ctx == nullptr) {
8176
fprintf(stderr, "error: failed to initialize whisper context\n");
8277
return 2;

scripts/bench-all.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ for model in "${models[@]}"; do
104104

105105
if [[ $system_info == *"METAL = 1"* ]]; then
106106
config="$config METAL"
107+
elif [[ $system_info == *"Metal : EMBED_LIBRARY = 1"* ]]; then
108+
config="$config METAL"
107109
fi
108110

109111
commit=$(git rev-parse --short HEAD)

0 commit comments

Comments
 (0)