File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -296,18 +296,9 @@ struct gpt_log * gpt_log_init() {
296
296
}
297
297
298
298
struct gpt_log * gpt_log_main () {
299
- // this is supposed to be thread-safe but sanitizer complains
300
- // https://github.com/ggerganov/llama.cpp/actions/runs/10815973423/job/30006101803?pr=9418#step:6:3731
301
- // static struct gpt_log * log = gpt_log_init();
302
-
303
- // let's try this instead
304
- static struct gpt_log * log = nullptr ;
305
- static std::once_flag flag;
306
- std::call_once (flag, []() {
307
- log = gpt_log_init ();
308
- });
309
-
310
- return log;
299
+ static struct gpt_log log{256 };
300
+
301
+ return &log;
311
302
}
312
303
313
304
void gpt_log_pause (struct gpt_log * log) {
Original file line number Diff line number Diff line change @@ -33,7 +33,5 @@ int main() {
33
33
threads[i].join ();
34
34
}
35
35
36
- gpt_log_free (gpt_log_main ());
37
-
38
36
return 0 ;
39
37
}
You can’t perform that action at this time.
0 commit comments