[Bugfix] Fix CPU OMP autobind assertion to use local_world_size (#35815)

Signed-off-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Li, Jiang <jiang1.li@intel.com>
This commit is contained in:
Weiguang Li
2026-03-09 11:07:29 +08:00
committed by GitHub
parent 384425f84e
commit 43aa389231

View File

@@ -144,12 +144,10 @@ class CPUWorker(Worker):
allowed_numa_nodes, logical_cpu_list = (
CpuPlatform.get_allowed_cpu_core_node_list()
)
assert (
len(allowed_numa_nodes) >= self.parallel_config.world_size
or sim_multi_numa_nodes
), (
local_world_size = self.parallel_config.local_world_size
assert len(allowed_numa_nodes) >= local_world_size or sim_multi_numa_nodes, (
f"Not enough allowed NUMA nodes to bind threads of "
f"{self.parallel_config.world_size} CPUWorkers. "
f"{local_world_size} local CPUWorkers. "
f"Allowed NUMA nodes are {allowed_numa_nodes}. "
"Please try to bind threads manually."
)