mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-02 12:08:00 +02:00
tests : add "threads" to run-tests.sh
This commit is contained in:
parent
3eaeb030ff
commit
bab97c83d0
@ -13,7 +13,7 @@
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# ./tests/run-tests.sh <model_name>
|
||||
# ./tests/run-tests.sh <model_name> [threads]
|
||||
#
|
||||
|
||||
cd `dirname $0`
|
||||
@ -32,7 +32,7 @@ function list_models {
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
printf "Usage: $0 [model]\n\n"
|
||||
printf "Usage: $0 [model] [threads]\n\n"
|
||||
printf "No model specified. Aborting\n"
|
||||
list_models
|
||||
exit 1
|
||||
@ -41,6 +41,11 @@ fi
|
||||
model=$1
|
||||
main="../main"
|
||||
|
||||
threads=""
|
||||
if [ $# -eq 2 ]; then
|
||||
threads="-t $2"
|
||||
fi
|
||||
|
||||
if [ ! -f ../models/ggml-$model.bin ]; then
|
||||
printf "Model $model not found. Aborting\n"
|
||||
list_models
|
||||
@ -105,7 +110,7 @@ function run_lang() {
|
||||
fi
|
||||
fi
|
||||
|
||||
$main -m ../models/ggml-$model.bin -f $fname_dst -l $lang -otxt 2> /dev/null
|
||||
$main -m ../models/ggml-$model.bin $threads -f $fname_dst -l $lang -otxt 2> /dev/null
|
||||
|
||||
git diff --no-index --word-diff=color --word-diff-regex=. $lang-$i-ref.txt $fname_dst.txt
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user