From 96a1dc27c3f09bf1ed83a26292d571795bcf27fa Mon Sep 17 00:00:00 2001 From: Asghar Ghorbani Date: Mon, 6 Jan 2025 12:21:46 +0100 Subject: [PATCH] llama : prevent system info string accumulation across calls (#11101) --- src/llama.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/llama.cpp b/src/llama.cpp index 60728e5bb..c162c31a6 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -12458,6 +12458,8 @@ int llama_split_prefix(char * dest, size_t maxlen, const char * split_path, int const char * llama_print_system_info(void) { static std::string s; + s.clear(); // Clear the string, since it's static, otherwise it will accumulate data from previous calls. + for (size_t i = 0; i < ggml_backend_reg_count(); i++) { auto * reg = ggml_backend_reg_get(i);