Skip to content

Commit 32704bb

Browse files
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.
1 parent 6e7ae3d commit 32704bb

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

ggml/src/ggml.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19362,8 +19362,6 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
1936219362
threadpool->cgraph = cgraph;
1936319363
threadpool->cplan = cplan;
1936419364
threadpool->n_threads_cur = n_threads;
19365-
threadpool->n_barrier = 0;
19366-
threadpool->n_barrier_passed = 0;
1936719365
threadpool->current_chunk = 0;
1936819366
threadpool->ec = GGML_STATUS_SUCCESS;
1936919367
}

0 commit comments

Comments
 (0)