Skip to content

Commit 64c6af3

Browse files
ggml : fix n_threads_cur initialization with one thread (ggml-org#9538)
* ggml : fix n_threads_cur initialization with one thread * Update ggml/src/ggml.c --------- Co-authored-by: Max Krasnyansky <quic_maxk@quicinc.com>
1 parent 0d2f22e commit 64c6af3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ggml/src/ggml.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20239,6 +20239,7 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
2023920239
ggml_graph_compute_thread(&threadpool->workers[omp_get_thread_num()]);
2024020240
}
2024120241
} else {
20242+
atomic_store_explicit(&threadpool->n_threads_cur, 1, memory_order_relaxed);
2024220243
ggml_graph_compute_thread(&threadpool->workers[0]);
2024320244
}
2024420245
#else

0 commit comments

Comments
 (0)