From 9e04f2cb52fb5c2ea0f9406e8023f753cf3483fe Mon Sep 17 00:00:00 2001 From: slaren Date: Fri, 4 Oct 2024 00:54:02 +0200 Subject: [PATCH] llama : print devices used on model load --- src/llama.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/llama.cpp b/src/llama.cpp index 3a49ecffb2191a..9e83c79133478f 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -19100,8 +19100,13 @@ struct llama_model * llama_load_model_from_file( case GGML_BACKEND_DEVICE_TYPE_GPU: case GGML_BACKEND_DEVICE_TYPE_GPU_FULL: + { + size_t free, total; // NOLINT + ggml_backend_dev_memory(dev, &free, &total); + LLAMA_LOG_INFO("%s: using device %s (%s) - %zu MiB free\n", __func__, ggml_backend_dev_name(dev), ggml_backend_dev_description(dev), free/1024/1024); model->devices.push_back(dev); break; + } } }