[CPU] Fix NUMA/core binding for DP ranks (#32856)
This commit is contained in:
@@ -1415,8 +1415,14 @@ class ModelRunner:
|
||||
)
|
||||
|
||||
def init_threads_binding(self):
|
||||
# With --enable-dp-attention, dp partitions the existing TP group
|
||||
# rather than spawning additional processes, so dp_size must not be
|
||||
# multiplied into the process count here (unlike regular DP, where
|
||||
# dp_size * tp_size * pp_size is the true worker count).
|
||||
dp_size = 1 if get_parallel().enable_dp_attention else self.ps.dp_size
|
||||
self.local_omp_cpuid = numa_utils.init_threads_binding(
|
||||
tp_rank=self.ps.tp_rank, tp_size=self.ps.tp_size
|
||||
numa_index=self.gpu_id,
|
||||
world_size=dp_size * self.ps.tp_size * self.ps.pp_size,
|
||||
)
|
||||
|
||||
def apply_torch_tp(self):
|
||||
|
||||
Reference in New Issue
Block a user