Skip to content

Commit 57abd79

Browse files
committed
scripts : add helpers script for bench comparing commits
1 parent 594845a commit 57abd79

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

scripts/compare-commits.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -x
5+
6+
if [ $# -lt 2 ]; then
7+
echo "usage: ./scripts/compare-commits.sh <commit1> <commit2> [additional llama-bench arguments]"
8+
exit 1
9+
fi
10+
11+
bench_args="${@:3}"
12+
13+
rm -f llama-bench.sqlite
14+
15+
git checkout $1
16+
make clean && LLAMA_CUBLAS=1 make -j32 llama-bench
17+
./llama-bench -o sql $bench_args | tee /dev/tty | sqlite3 llama-bench.sqlite
18+
19+
git checkout $2
20+
make clean && LLAMA_CUBLAS=1 make -j32 llama-bench
21+
./llama-bench -o sql $bench_args | tee /dev/tty | sqlite3 llama-bench.sqlite
22+
23+
./scripts/compare-llama-bench.py -b $1 -c $2

0 commit comments

Comments
 (0)