bench : print system info before ctx check

This commit is contained in:
Georgi Gerganov 2025-06-25 15:59:23 +03:00
parent 1ad258ca31
commit dc8dda60ee
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 3 additions and 6 deletions

View 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;

View File

@ -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)