# Helper script to run the bench tool on all models and print the results in share-able format
-printf "Usage: ./bench.sh [n_threads] [encoder-only] [flash-attn]\n"
+printf "Usage: ./scripts/bench-all.sh [n_threads] [encoder-only] [flash-attn]\n"
if [ -z "$1" ]; then
n_threads=4
printf "Running memcpy benchmark\n"
printf "\n"
- ./bench -w 1 -t $n_threads 2>&1
+ ./build/bin/bench -w 1 -t $n_threads 2>&1
printf "\n"
printf "Running ggml_mul_mat benchmark with $n_threads threads\n"
printf "\n"
- ./bench -w 2 -t $n_threads 2>&1
+ ./build/bin/bench -w 2 -t $n_threads 2>&1
printf "\n"
printf "Running benchmark for all models\n"
for model in "${models[@]}"; do
# actual run
# store stderr output in a variable in order to parse it later
- output=$(./bench -m ./models/ggml-$model.bin -t $n_threads $fattn 2>&1)
+ output=$(./build/bin/bench -m ./models/ggml-$model.bin -t $n_threads $fattn 2>&1)
ret=$?
# parse the output: