ggerganov commited on
Commit
835c3e8
·
unverified ·
1 Parent(s): 9f0c009

bench : print system info before ctx check

Browse files
Files changed (2) hide show
  1. examples/bench/bench.cpp +1 -6
  2. scripts/bench-all.sh +2 -0
examples/bench/bench.cpp CHANGED
@@ -66,17 +66,12 @@ static int whisper_bench_full(const whisper_params & params) {
66
  cparams.use_gpu = params.use_gpu;
67
  cparams.flash_attn = params.flash_attn;
68
 
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
-
75
  {
76
  fprintf(stderr, "\n");
77
  fprintf(stderr, "system_info: n_threads = %d / %d | %s\n", params.n_threads, std::thread::hardware_concurrency(), whisper_print_system_info());
78
  }
79
 
 
80
  if (ctx == nullptr) {
81
  fprintf(stderr, "error: failed to initialize whisper context\n");
82
  return 2;
 
66
  cparams.use_gpu = params.use_gpu;
67
  cparams.flash_attn = params.flash_attn;
68
 
 
 
 
 
 
 
69
  {
70
  fprintf(stderr, "\n");
71
  fprintf(stderr, "system_info: n_threads = %d / %d | %s\n", params.n_threads, std::thread::hardware_concurrency(), whisper_print_system_info());
72
  }
73
 
74
+ struct whisper_context * ctx = whisper_init_from_file_with_params(params.model.c_str(), cparams);
75
  if (ctx == nullptr) {
76
  fprintf(stderr, "error: failed to initialize whisper context\n");
77
  return 2;
scripts/bench-all.sh CHANGED
@@ -104,6 +104,8 @@ for model in "${models[@]}"; do
104
 
105
  if [[ $system_info == *"METAL = 1"* ]]; then
106
  config="$config METAL"
 
 
107
  fi
108
 
109
  commit=$(git rev-parse --short HEAD)
 
104
 
105
  if [[ $system_info == *"METAL = 1"* ]]; then
106
  config="$config METAL"
107
+ elif [[ $system_info == *"Metal : EMBED_LIBRARY = 1"* ]]; then
108
+ config="$config METAL"
109
  fi
110
 
111
  commit=$(git rev-parse --short HEAD)