[BugFix] Dense multinode DP rescope with regression test (#49212)

Signed-off-by: Andy Lo <andy@mistral.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Co-authored-by: Andy Lo <andy@mistral.ai>
This commit is contained in:
aoshen02
2026-08-05 18:12:03 -07:00
committed by GitHub
co-authored by Andy Lo
parent 47a4e410ba
commit 8cfa01cdd2
3 changed files with 38 additions and 7 deletions
+11
View File
@@ -1034,3 +1034,14 @@ class ParallelConfig:
)
return self
def reconfigure_for_independent_dp_rank(self) -> None:
"""Reconfigure for a single independent non-MoE DP rank."""
# Capture these before changing DP fields.
nnodes = self.nnodes_within_dp
node_rank = self.node_rank_within_dp
self.data_parallel_size = 1
self.data_parallel_size_local = 1
self.data_parallel_rank = 0
self.nnodes = nnodes
self.node_rank = node_rank