Skip to content

Commit ed733e8

Browse files
committed
scripts : update to new build system
1 parent 5980b1a commit ed733e8

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
# Audio samples
33
#
44

5+
.PHONY: build
6+
build:
7+
cmake -B build
8+
cmake --build build --config Release
9+
510
# download a few audio samples into folder "./samples":
611
.PHONY: samples
712
samples:

scripts/bench-all.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Helper script to run the bench tool on all models and print the results in share-able format
44

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"
66

77
if [ -z "$1" ]; then
88
n_threads=4
@@ -38,13 +38,13 @@ if [ "$encoder_only" -eq 0 ]; then
3838
printf "Running memcpy benchmark\n"
3939
printf "\n"
4040

41-
./bench -w 1 -t $n_threads 2>&1
41+
./build/bin/bench -w 1 -t $n_threads 2>&1
4242

4343
printf "\n"
4444
printf "Running ggml_mul_mat benchmark with $n_threads threads\n"
4545
printf "\n"
4646

47-
./bench -w 2 -t $n_threads 2>&1
47+
./build/bin/bench -w 2 -t $n_threads 2>&1
4848

4949
printf "\n"
5050
printf "Running benchmark for all models\n"
@@ -64,7 +64,7 @@ printf "| %6s | %6s | %16s | %13s | %3s | %3s | %7s | %7s | %7s | %7s | %7s |\n"
6464
for model in "${models[@]}"; do
6565
# actual run
6666
# 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)
6868
ret=$?
6969

7070
# parse the output:

tests/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if [ $# -eq 0 ]; then
3939
fi
4040

4141
model=$1
42-
main="../main"
42+
main="../build/bin/main"
4343

4444
threads=""
4545
if [ $# -eq 2 ]; then

0 commit comments

Comments
 (0)