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 @@ -18889,7 +18889,10 @@ void ggml_pause_threadpool(struct ggml_compute_threadpool * threadpool) {
1888918889#ifndef GGML_USE_OPENMP
1889018890 GGML_ASSERT(!threadpool->disposable);
1889118891 GGML_PRINT_DEBUG("Pausing threadpool\n");
18892+ ggml_mutex_lock(&threadpool->mutex);
1889218893 threadpool->pause = true;
18894+ ggml_cond_broadcast(&threadpool->cond);
18895+ ggml_mutex_unlock(&threadpool->mutex);
1889318896#else
1889418897 UNUSED(threadpool);
1889518898#endif
@@ -19360,9 +19363,9 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
1936019363 __thread_affinity(threadpool->workers[0].cpumask);
1936119364 }
1936219365
19363- threadpool->new_work = true;
1936419366 if (!threadpool->poll) {
1936519367 ggml_mutex_lock(&threadpool->mutex);
19368+ threadpool->new_work = true;
1936619369 ggml_cond_broadcast(&threadpool->cond);
1936719370 ggml_mutex_unlock(&threadpool->mutex);
1936819371 }
You can’t perform that action at this time.
0 commit comments