From e13469a323147aed0c93f5b4efde10fcc379e977 Mon Sep 17 00:00:00 2001 From: asbelin <71226900+asbelin@users.noreply.github.com> Date: Wed, 16 Sep 2026 08:39:43 +0300 Subject: [PATCH] llama-bench: support --version to print build info (#28971) --- tools/llama-bench/llama-bench.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/llama-bench/llama-bench.cpp b/tools/llama-bench/llama-bench.cpp index 17adda3809..6541bb5078 100644 --- a/tools/llama-bench/llama-bench.cpp +++ b/tools/llama-bench/llama-bench.cpp @@ -427,6 +427,7 @@ static void print_usage(int /* argc */, char ** argv) { printf("\n"); printf("options:\n"); printf(" -h, --help\n"); + printf(" --version show version and build info\n"); printf(" --numa numa mode (default: disabled)\n"); printf(" -r, --repetitions number of times to repeat each test (default: %d)\n", cmd_params_defaults.reps); printf(" --prio <-1|0|1|2|3> process/thread priority (default: %d)\n", cmd_params_defaults.prio); @@ -550,6 +551,9 @@ static cmd_params parse_cmd_params(int argc, char ** argv) { if (arg == "-h" || arg == "--help") { print_usage(argc, argv); exit(0); + } else if (arg == "--version") { + llama_print_build_info(llama_version()); + exit(0); } else if (arg == "-m" || arg == "--model") { if (++i >= argc) { invalid_param = true;