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 @@ -18932,7 +18932,10 @@ void ggml_pause_threadpool(struct ggml_compute_threadpool * threadpool) {
18932
18932
#ifndef GGML_USE_OPENMP
18933
18933
GGML_ASSERT(!threadpool->disposable);
18934
18934
GGML_PRINT_DEBUG("Pausing threadpool\n");
18935
+ ggml_mutex_lock(&threadpool->mutex);
18935
18936
threadpool->pause = true;
18937
+ ggml_cond_broadcast(&threadpool->cond);
18938
+ ggml_mutex_unlock(&threadpool->mutex);
18936
18939
#else
18937
18940
UNUSED(threadpool);
18938
18941
#endif
@@ -19403,9 +19406,9 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
19403
19406
__thread_affinity(threadpool->workers[0].cpumask);
19404
19407
}
19405
19408
19406
- threadpool->new_work = true;
19407
19409
if (!threadpool->poll) {
19408
19410
ggml_mutex_lock(&threadpool->mutex);
19411
+ threadpool->new_work = true;
19409
19412
ggml_cond_broadcast(&threadpool->cond);
19410
19413
ggml_mutex_unlock(&threadpool->mutex);
19411
19414
}
You can’t perform that action at this time.
0 commit comments