mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-27 12:05:03 +00:00
scripts : add option to compare commits in Debug (#13806)
* scripts : add option to compare commits in Debug * cont : reuse existing CMAKE_OPTS
This commit is contained in:
@ -17,14 +17,14 @@ rm -f llama-bench.sqlite > /dev/null
|
|||||||
|
|
||||||
# to test a backend, call the script with the corresponding environment variable (e.g. GGML_CUDA=1 ./scripts/compare-commits.sh ...)
|
# to test a backend, call the script with the corresponding environment variable (e.g. GGML_CUDA=1 ./scripts/compare-commits.sh ...)
|
||||||
if [ -n "$GGML_CUDA" ]; then
|
if [ -n "$GGML_CUDA" ]; then
|
||||||
cmake_opts="-DGGML_CUDA=ON"
|
CMAKE_OPTS="${CMAKE_OPTS} -DGGML_CUDA=ON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dir="build-bench"
|
dir="build-bench"
|
||||||
|
|
||||||
function run {
|
function run {
|
||||||
rm -fr ${dir} > /dev/null
|
rm -fr ${dir} > /dev/null
|
||||||
cmake -B ${dir} -S . $cmake_opts > /dev/null
|
cmake -B ${dir} -S . ${CMAKE_OPTS} > /dev/null
|
||||||
cmake --build ${dir} -t llama-bench > /dev/null
|
cmake --build ${dir} -t llama-bench > /dev/null
|
||||||
${dir}/bin/llama-bench -o sql -oe md $bench_args | sqlite3 llama-bench.sqlite
|
${dir}/bin/llama-bench -o sql -oe md $bench_args | sqlite3 llama-bench.sqlite
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user