File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -18891,7 +18891,10 @@ void ggml_pause_threadpool(struct ggml_compute_threadpool * threadpool) {
18891
18891
#ifndef GGML_USE_OPENMP
18892
18892
GGML_ASSERT(!threadpool->disposable);
18893
18893
GGML_PRINT_DEBUG("Pausing threadpool\n");
18894
+ ggml_mutex_lock(&threadpool->mutex);
18894
18895
threadpool->pause = true;
18896
+ ggml_cond_broadcast(&threadpool->cond);
18897
+ ggml_mutex_unlock(&threadpool->mutex);
18895
18898
#else
18896
18899
UNUSED(threadpool);
18897
18900
#endif
@@ -19362,9 +19365,9 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
19362
19365
__thread_affinity(threadpool->workers[0].cpumask);
19363
19366
}
19364
19367
19365
- threadpool->new_work = true;
19366
19368
if (!threadpool->poll) {
19367
19369
ggml_mutex_lock(&threadpool->mutex);
19370
+ threadpool->new_work = true;
19368
19371
ggml_cond_broadcast(&threadpool->cond);
19369
19372
ggml_mutex_unlock(&threadpool->mutex);
19370
19373
}
You can’t perform that action at this time.
0 commit comments