From 138e20b697620b1cba9e97279ec547ffda11452b Mon Sep 17 00:00:00 2001 From: slaren Date: Wed, 18 Sep 2024 19:13:08 +0200 Subject: [PATCH] ggml : fix n_threads_cur initialization with one thread (llama/9538) * ggml : fix n_threads_cur initialization with one thread * Update ggml/src/ggml.c --------- Co-authored-by: Max Krasnyansky --- ggml/src/ggml.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index 368d5e62..8baeca06 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -20444,6 +20444,7 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl ggml_graph_compute_thread(&threadpool->workers[omp_get_thread_num()]); } } else { + atomic_store_explicit(&threadpool->n_threads_cur, 1, memory_order_relaxed); ggml_graph_compute_thread(&threadpool->workers[0]); } #else