File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -19586,8 +19586,6 @@ struct ggml_compute_threadpool * ggml_create_threadpool(struct ggml_threadpool_p
19586
19586
}
19587
19587
}
19588
19588
19589
- // Set the main-thread's affinity last
19590
- __thread_affinity(workers[0].cpumask);
19591
19589
// Ensure all threads entered the compute loop before returning.
19592
19590
while (atomic_load(&threadpool->n_ready) != threadpool->n_threads_max) { ; }
19593
19591
@@ -20119,6 +20117,9 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
20119
20117
threadpool->workers[j].ith = j;
20120
20118
}
20121
20119
20120
+ // Update main thread affinity to match the current threadpool
20121
+ __thread_affinity(threadpool->workers[0].cpumask);
20122
+
20122
20123
// Set up work
20123
20124
threadpool->cgraph = cgraph;
20124
20125
threadpool->cplan = cplan;
You can’t perform that action at this time.
0 commit comments