File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1313#
1414# Usage:
1515#
16- # ./tests/run-tests.sh <model_name>
16+ # ./tests/run-tests.sh <model_name> [threads]
1717#
1818
1919cd ` dirname $0 `
@@ -32,7 +32,7 @@ function list_models {
3232}
3333
3434if [ $# -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
4141model=$1
4242main=" ../main"
4343
44+ threads=" "
45+ if [ $# -eq 2 ]; then
46+ threads=" -t $2 "
47+ fi
48+
4449if [ ! -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
You can’t perform that action at this time.
0 commit comments