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 @@ -18932,7 +18932,10 @@ void ggml_pause_threadpool(struct ggml_compute_threadpool * threadpool) {
1893218932#ifndef GGML_USE_OPENMP
1893318933 GGML_ASSERT(!threadpool->disposable);
1893418934 GGML_PRINT_DEBUG("Pausing threadpool\n");
18935+ ggml_mutex_lock(&threadpool->mutex);
1893518936 threadpool->pause = true;
18937+ ggml_cond_broadcast(&threadpool->cond);
18938+ ggml_mutex_unlock(&threadpool->mutex);
1893618939#else
1893718940 UNUSED(threadpool);
1893818941#endif
@@ -19403,9 +19406,9 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
1940319406 __thread_affinity(threadpool->workers[0].cpumask);
1940419407 }
1940519408
19406- threadpool->new_work = true;
1940719409 if (!threadpool->poll) {
1940819410 ggml_mutex_lock(&threadpool->mutex);
19411+ threadpool->new_work = true;
1940919412 ggml_cond_broadcast(&threadpool->cond);
1941019413 ggml_mutex_unlock(&threadpool->mutex);
1941119414 }
You can’t perform that action at this time.
0 commit comments