mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-26 12:42:14 +02:00
bench : print system info before ctx check
This commit is contained in:
parent
1ad258ca31
commit
dc8dda60ee
@ -66,17 +66,12 @@ static int whisper_bench_full(const whisper_params & params) {
|
|||||||
cparams.use_gpu = params.use_gpu;
|
cparams.use_gpu = params.use_gpu;
|
||||||
cparams.flash_attn = params.flash_attn;
|
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, "\n");
|
||||||
fprintf(stderr, "system_info: n_threads = %d / %d | %s\n", params.n_threads, std::thread::hardware_concurrency(), whisper_print_system_info());
|
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) {
|
if (ctx == nullptr) {
|
||||||
fprintf(stderr, "error: failed to initialize whisper context\n");
|
fprintf(stderr, "error: failed to initialize whisper context\n");
|
||||||
return 2;
|
return 2;
|
||||||
|
@ -104,6 +104,8 @@ for model in "${models[@]}"; do
|
|||||||
|
|
||||||
if [[ $system_info == *"METAL = 1"* ]]; then
|
if [[ $system_info == *"METAL = 1"* ]]; then
|
||||||
config="$config METAL"
|
config="$config METAL"
|
||||||
|
elif [[ $system_info == *"Metal : EMBED_LIBRARY = 1"* ]]; then
|
||||||
|
config="$config METAL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
commit=$(git rev-parse --short HEAD)
|
commit=$(git rev-parse --short HEAD)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user