[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user