Skip to content

Commit adfcd72

Browse files
a-ghorbaniNeoZhangJianyu
authored andcommitted
llama : prevent system info string accumulation across calls (ggml-org#11101)
1 parent 6bf6a0a commit adfcd72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/llama.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12467,6 +12467,8 @@ int llama_split_prefix(char * dest, size_t maxlen, const char * split_path, int
1246712467

1246812468
const char * llama_print_system_info(void) {
1246912469
static std::string s;
12470+
s.clear(); // Clear the string, since it's static, otherwise it will accumulate data from previous calls.
12471+
1247012472

1247112473
for (size_t i = 0; i < ggml_backend_reg_count(); i++) {
1247212474
auto * reg = ggml_backend_reg_get(i);

0 commit comments

Comments
 (0)