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 @@ -18953,7 +18953,10 @@ void ggml_pause_threadpool(struct ggml_compute_threadpool * threadpool) {
18953
18953
#ifndef GGML_USE_OPENMP
18954
18954
GGML_ASSERT(!threadpool->disposable);
18955
18955
GGML_PRINT_DEBUG("Pausing threadpool\n");
18956
+ ggml_mutex_lock(&threadpool->mutex);
18956
18957
threadpool->pause = true;
18958
+ ggml_cond_broadcast(&threadpool->cond);
18959
+ ggml_mutex_unlock(&threadpool->mutex);
18957
18960
#else
18958
18961
UNUSED(threadpool);
18959
18962
#endif
@@ -19424,9 +19427,9 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
19424
19427
__thread_affinity(threadpool->workers[0].cpumask);
19425
19428
}
19426
19429
19427
- threadpool->new_work = true;
19428
19430
if (!threadpool->poll) {
19429
19431
ggml_mutex_lock(&threadpool->mutex);
19432
+ threadpool->new_work = true;
19430
19433
ggml_cond_broadcast(&threadpool->cond);
19431
19434
ggml_mutex_unlock(&threadpool->mutex);
19432
19435
}
You can’t perform that action at this time.
0 commit comments