Skip to content

Commit 23fe7d3

Browse files
committed
fix the threads number larger than numa node numbers
1 parent a7a6ce9 commit 23fe7d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-cpu/ggml-cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ void ggml_barrier_numa_aware(struct ggml_threadpool * tp, int ith, int node_n) {
593593
int cores_per_numa = g_state.numa.nodes[0].n_cpus;
594594
int numa_nodes = n_threads / cores_per_numa;
595595
int remaining_cores = n_threads % cores_per_numa;
596-
if (numa_nodes <= 1 || remaining_cores) {
596+
if ((numa_nodes != GGML_NUMA_MIGRATE_NODES) || remaining_cores) {
597597
ggml_barrier(tp);
598598
return;
599599
}

0 commit comments

Comments
 (0)