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