File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 2
2
# Audio samples
3
3
#
4
4
5
+ .PHONY : build
6
+ build :
7
+ cmake -B build
8
+ cmake --build build --config Release
9
+
5
10
# download a few audio samples into folder "./samples":
6
11
.PHONY : samples
7
12
samples :
Original file line number Diff line number Diff line change 2
2
3
3
# Helper script to run the bench tool on all models and print the results in share-able format
4
4
5
- printf " Usage: ./bench.sh [n_threads] [encoder-only] [flash-attn]\n"
5
+ printf " Usage: ./scripts/ bench-all .sh [n_threads] [encoder-only] [flash-attn]\n"
6
6
7
7
if [ -z " $1 " ]; then
8
8
n_threads=4
@@ -38,13 +38,13 @@ if [ "$encoder_only" -eq 0 ]; then
38
38
printf " Running memcpy benchmark\n"
39
39
printf " \n"
40
40
41
- ./bench -w 1 -t $n_threads 2>&1
41
+ ./build/bin/ bench -w 1 -t $n_threads 2>&1
42
42
43
43
printf " \n"
44
44
printf " Running ggml_mul_mat benchmark with $n_threads threads\n"
45
45
printf " \n"
46
46
47
- ./bench -w 2 -t $n_threads 2>&1
47
+ ./build/bin/ bench -w 2 -t $n_threads 2>&1
48
48
49
49
printf " \n"
50
50
printf " Running benchmark for all models\n"
@@ -64,7 +64,7 @@ printf "| %6s | %6s | %16s | %13s | %3s | %3s | %7s | %7s | %7s | %7s | %7s |\n"
64
64
for model in " ${models[@]} " ; do
65
65
# actual run
66
66
# store stderr output in a variable in order to parse it later
67
- output=$( ./bench -m ./models/ggml-$model .bin -t $n_threads $fattn 2>&1 )
67
+ output=$( ./build/bin/ bench -m ./models/ggml-$model .bin -t $n_threads $fattn 2>&1 )
68
68
ret=$?
69
69
70
70
# parse the output:
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ if [ $# -eq 0 ]; then
39
39
fi
40
40
41
41
model=$1
42
- main=" ../main"
42
+ main=" ../build/bin/ main"
43
43
44
44
threads=" "
45
45
if [ $# -eq 2 ]; then
You can’t perform that action at this time.
0 commit comments