From cc544b20572277e0e2b165adb3d1b22b4f465631 Mon Sep 17 00:00:00 2001 From: slaren Date: Fri, 25 Aug 2023 15:11:57 +0200 Subject: [PATCH] back to GiB --- examples/llama-bench/llama-bench.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/llama-bench/llama-bench.cpp b/examples/llama-bench/llama-bench.cpp index a931dc02e..822bba543 100755 --- a/examples/llama-bench/llama-bench.cpp +++ b/examples/llama-bench/llama-bench.cpp @@ -806,7 +806,11 @@ struct markdown_printer : public printer { if (field == "model") { value = t.model_type; } else if (field == "size") { - snprintf(buf, sizeof(buf), "%.2f GB", t.model_size / 1024.0 / 1024.0 / 1024.0); + if (t.model_size < 1024*1024*1024) { + snprintf(buf, sizeof(buf), "%.2f MiB", t.model_size / 1024.0 / 1024.0); + } else { + snprintf(buf, sizeof(buf), "%.2f GiB", t.model_size / 1024.0 / 1024.0 / 1024.0); + } value = buf; } else if (field == "params") { if (t.model_n_params < 1000*1000*1000) {