Skip to content

Commit

Permalink
ggml : fix n_threads_cur initialization with one thread (#9538)
Browse files Browse the repository at this point in the history
* ggml : fix n_threads_cur initialization with one thread

* Update ggml/src/ggml.c

---------

Co-authored-by: Max Krasnyansky <[email protected]>
  • Loading branch information
slaren and max-krasnyansky authored Sep 18, 2024
1 parent 0d2f22e commit 64c6af3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ggml/src/ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -20239,6 +20239,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
Expand Down

0 comments on commit 64c6af3

Please sign in to comment.