Skip to content

Commit bab97c8

Browse files
committed
tests : add "threads" to run-tests.sh
1 parent 3eaeb03 commit bab97c8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/run-tests.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#
1414
# Usage:
1515
#
16-
# ./tests/run-tests.sh <model_name>
16+
# ./tests/run-tests.sh <model_name> [threads]
1717
#
1818

1919
cd `dirname $0`
@@ -32,7 +32,7 @@ function list_models {
3232
}
3333

3434
if [ $# -eq 0 ]; then
35-
printf "Usage: $0 [model]\n\n"
35+
printf "Usage: $0 [model] [threads]\n\n"
3636
printf "No model specified. Aborting\n"
3737
list_models
3838
exit 1
@@ -41,6 +41,11 @@ fi
4141
model=$1
4242
main="../main"
4343

44+
threads=""
45+
if [ $# -eq 2 ]; then
46+
threads="-t $2"
47+
fi
48+
4449
if [ ! -f ../models/ggml-$model.bin ]; then
4550
printf "Model $model not found. Aborting\n"
4651
list_models
@@ -105,7 +110,7 @@ function run_lang() {
105110
fi
106111
fi
107112

108-
$main -m ../models/ggml-$model.bin -f $fname_dst -l $lang -otxt 2> /dev/null
113+
$main -m ../models/ggml-$model.bin $threads -f $fname_dst -l $lang -otxt 2> /dev/null
109114

110115
git diff --no-index --word-diff=color --word-diff-regex=. $lang-$i-ref.txt $fname_dst.txt
111116

0 commit comments

Comments
 (0)