Skip to content

Commit 96a1dc2

Browse files
authored
llama : prevent system info string accumulation across calls (#11101)
1 parent 6369f86 commit 96a1dc2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/llama.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -12458,6 +12458,8 @@ int llama_split_prefix(char * dest, size_t maxlen, const char * split_path, int
1245812458

1245912459
const char * llama_print_system_info(void) {
1246012460
static std::string s;
12461+
s.clear(); // Clear the string, since it's static, otherwise it will accumulate data from previous calls.
12462+
1246112463

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

0 commit comments

Comments
 (0)