From b2f6338d2fde56f62d011ff63d868d0205e15aaa Mon Sep 17 00:00:00 2001 From: jianyuzh Date: Thu, 1 Feb 2024 23:02:29 +0800 Subject: [PATCH] fix code format, change print for --no-mmap --- examples/llama-bench/llama-bench.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/llama-bench/llama-bench.cpp b/examples/llama-bench/llama-bench.cpp index b8e465e8e..b7ad8a18f 100644 --- a/examples/llama-bench/llama-bench.cpp +++ b/examples/llama-bench/llama-bench.cpp @@ -127,14 +127,16 @@ static std::string get_gpu_info() { ggml_sycl_get_gpu_list(device_list, GGML_SYCL_MAX_DEVICES); for (int i = 0; i < GGML_SYCL_MAX_DEVICES; i++) { - if (device_list[i]>0){ + if (device_list[i] >0 ){ char buf[128]; ggml_sycl_get_device_description(i, buf, sizeof(buf)); id += buf; id += "/"; } } - if(id.length()>2) id.pop_back(); + if (id.length() >2 ) { + id.pop_back(); + } #endif // TODO: other backends return id; @@ -218,7 +220,7 @@ static void print_usage(int /* argc */, char ** argv) { printf(" -sm, --split-mode (default: %s)\n", join(transform_to_str(cmd_params_defaults.split_mode, split_mode_str), ",").c_str()); printf(" -mg, --main-gpu (default: %s)\n", join(cmd_params_defaults.main_gpu, ",").c_str()); printf(" -nkvo, --no-kv-offload <0|1> (default: %s)\n", join(cmd_params_defaults.no_kv_offload, ",").c_str()); - printf(" -nmmap, --no-mmap (default: %s)\n", cmd_params_defaults.use_mmap ? "0" : "1"); + printf(" -nmmap, --no-mmap\n"); printf(" -mmq, --mul-mat-q <0|1> (default: %s)\n", join(cmd_params_defaults.mul_mat_q, ",").c_str()); printf(" -ts, --tensor_split (default: 0)\n"); printf(" -r, --repetitions (default: %d)\n", cmd_params_defaults.reps); @@ -512,7 +514,6 @@ struct cmd_params_instance { cparams.mul_mat_q = mul_mat_q; cparams.offload_kqv = !no_kv_offload; - return cparams; } };