scripts : detect CUDA
This commit is contained in:
parent
57abd79f3c
commit
00a4ab627d
1 changed files with 16 additions and 2 deletions
|
@ -12,12 +12,26 @@ 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
|
||||
|
||||
opts=""
|
||||
|
||||
if [[ "$backend" == "cuda" ]]; then
|
||||
opts="LLAMA_CUBLAS=1"
|
||||
fi
|
||||
|
||||
git checkout $1
|
||||
make clean && LLAMA_CUBLAS=1 make -j32 llama-bench
|
||||
make clean && $opts make -j32 llama-bench
|
||||
./llama-bench -o sql $bench_args | tee /dev/tty | sqlite3 llama-bench.sqlite
|
||||
|
||||
git checkout $2
|
||||
make clean && LLAMA_CUBLAS=1 make -j32 llama-bench
|
||||
make clean && $opts make -j32 llama-bench
|
||||
./llama-bench -o sql $bench_args | tee /dev/tty | sqlite3 llama-bench.sqlite
|
||||
|
||||
./scripts/compare-llama-bench.py -b $1 -c $2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue