From: slaren Date: Wed, 18 Sep 2024 17:13:08 +0000 (+0200) Subject: ggml : fix n_threads_cur initialization with one thread (llama/9538) X-Git-Tag: upstream/0.0.1642~361 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=d2fe2cb2ce722af5df48d6d4ec4bcb8c620f115a;p=pkg%2Fggml%2Fsources%2Fggml 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 --- diff --git a/src/ggml.c b/src/ggml.c index 368d5e62..8baeca06 100644 --- a/src/ggml.c +++ b/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