threadpool: do not clear barrier counters between graphs computes (fixes race with small graphs)
This fixes the race condition with very small graphs where the main thread happens to start a new graph while the workers are just about to exit from barriers.
This commit is contained in:
parent
538bd9f730
commit
db45b6d3a9
1 changed files with 0 additions and 2 deletions
|
@ -19375,8 +19375,6 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
|
||||||
threadpool->cgraph = cgraph;
|
threadpool->cgraph = cgraph;
|
||||||
threadpool->cplan = cplan;
|
threadpool->cplan = cplan;
|
||||||
threadpool->n_threads_cur = n_threads;
|
threadpool->n_threads_cur = n_threads;
|
||||||
threadpool->n_barrier = 0;
|
|
||||||
threadpool->n_barrier_passed = 0;
|
|
||||||
threadpool->current_chunk = 0;
|
threadpool->current_chunk = 0;
|
||||||
threadpool->ec = GGML_STATUS_SUCCESS;
|
threadpool->ec = GGML_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue