]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : prevent system info string accumulation across calls (#11101)
authorAsghar Ghorbani <redacted>
Mon, 6 Jan 2025 11:21:46 +0000 (12:21 +0100)
committerGitHub <redacted>
Mon, 6 Jan 2025 11:21:46 +0000 (13:21 +0200)
src/llama.cpp

index 60728e5bb91cabcaa504362d5b37c95aa23ecf98..c162c31a67a40864b274b229ed278ef5af6d80a3 100644 (file)
@@ -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);