From d7c042d1aed8a916723d711fde94a731f64c9832 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Wed, 11 Sep 2024 21:12:11 +0300 Subject: [PATCH] ggml : make n_threads_cur atomic_int --- ggml/src/ggml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index d7157ca6d4b83..b9a946ea5167e 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -1997,7 +1997,7 @@ struct ggml_threadpool { struct ggml_compute_state * workers; // per thread state int n_threads_max; // number of threads in the pool - int n_threads_cur; // number of threads used in the current graph + atomic_int n_threads_cur; // number of threads used in the current graph int32_t prio; // Scheduling priority uint32_t poll; // Polling level (0 - no polling)