Unverified Commit 43aa3892 authored by Weiguang Li's avatar Weiguang Li Committed by GitHub
Browse files

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


Signed-off-by: default avatarliweiguang <codingpunk@gmail.com>
Co-authored-by: default avatarClaude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: default avatarLi, Jiang <jiang1.li@intel.com>
parent 384425f8
...@@ -144,12 +144,10 @@ class CPUWorker(Worker): ...@@ -144,12 +144,10 @@ class CPUWorker(Worker):
allowed_numa_nodes, logical_cpu_list = ( allowed_numa_nodes, logical_cpu_list = (
CpuPlatform.get_allowed_cpu_core_node_list() CpuPlatform.get_allowed_cpu_core_node_list()
) )
assert ( local_world_size = self.parallel_config.local_world_size
len(allowed_numa_nodes) >= self.parallel_config.world_size assert len(allowed_numa_nodes) >= local_world_size or sim_multi_numa_nodes, (
or sim_multi_numa_nodes
), (
f"Not enough allowed NUMA nodes to bind threads of " 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}. " f"Allowed NUMA nodes are {allowed_numa_nodes}. "
"Please try to bind threads manually." "Please try to bind threads manually."
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment