mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-10-31 07:00:16 +01:00
adc9ff3841
compare-commits.sh : hide stdout, use -oe to print markdown
28 lines
750 B
Bash
Executable File
28 lines
750 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo "usage: ./scripts/compare-commits.sh <commit1> <commit2> [additional llama-bench arguments]"
|
|
exit 1
|
|
fi
|
|
|
|
set -e
|
|
set -x
|
|
|
|
bench_args="${@:3}"
|
|
|
|
rm -f llama-bench.sqlite > /dev/null
|
|
|
|
# to test a backend, call the script with the corresponding environment variable (e.g. LLAMA_CUDA=1 ./scripts/compare-commits.sh ...)
|
|
|
|
git checkout $1 > /dev/null
|
|
make clean > /dev/null
|
|
make -j$(nproc) $make_opts llama-bench > /dev/null
|
|
./llama-bench -o sql -oe md $bench_args | sqlite3 llama-bench.sqlite
|
|
|
|
git checkout $2 > /dev/null
|
|
make clean > /dev/null
|
|
make -j$(nproc) $make_opts llama-bench > /dev/null
|
|
./llama-bench -o sql -oe md $bench_args | sqlite3 llama-bench.sqlite
|
|
|
|
./scripts/compare-llama-bench.py -b $1 -c $2
|