forked from ggerganov/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ggerganov:master' into master
- Loading branch information
Showing
11 changed files
with
139 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/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 | ||
|
||
backend="cpu" | ||
|
||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
backend="metal" | ||
elif command -v nvcc &> /dev/null; then | ||
backend="cuda" | ||
fi | ||
|
||
make_opts="" | ||
|
||
if [[ "$backend" == "cuda" ]]; then | ||
make_opts="LLAMA_CUBLAS=1" | ||
fi | ||
|
||
git checkout $1 | ||
make clean && make -j32 $make_opts llama-bench | ||
./llama-bench -o sql $bench_args | tee /dev/tty | sqlite3 llama-bench.sqlite | ||
|
||
git checkout $2 | ||
make clean && make -j32 $make_opts llama-bench | ||
./llama-bench -o sql $bench_args | tee /dev/tty | sqlite3 llama-bench.sqlite | ||
|
||
./scripts/compare-llama-bench.py -b $1 -c $2 |