Skip to content

Commit 377bc78

Browse files
committed
clear numa affinity for main thread even with openmp
1 parent fa864af commit 377bc78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ggml.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19698,9 +19698,6 @@ static enum ggml_status ggml_graph_compute_parallel(struct ggml_compute_state *
1969819698
// this is a work thread too
1969919699
ggml_graph_compute_thread(&workers[0]);
1970019700

19701-
// don't leave affinity set on the main thread
19702-
clear_numa_thread_affinity();
19703-
1970419701
// join or kill thread pool
1970519702
if (n_threads > 1) {
1970619703
for (int j = 1; j < n_threads; j++) {
@@ -19710,6 +19707,9 @@ static enum ggml_status ggml_graph_compute_parallel(struct ggml_compute_state *
1971019707
}
1971119708
}
1971219709
#endif
19710+
// don't leave affinity set on the main thread
19711+
clear_numa_thread_affinity();
19712+
1971319713
for (int j = 0; j < n_threads; j++) {
1971419714
if (workers[j].ec != GGML_STATUS_SUCCESS) {
1971519715
compute_status = workers[j].ec;

0 commit comments

Comments
 (0)