Skip to content

Commit

Permalink
llama : prevent system info string accumulation across calls (#11101)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-ghorbani authored Jan 6, 2025
1 parent 6369f86 commit 96a1dc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 96a1dc2

Please sign in to comment.