Skip to content

Commit

Permalink
Update on "[cp] fix the device mesh access issue when CP is not used …
Browse files Browse the repository at this point in the history
…with DP"

[ghstack-poisoned]
  • Loading branch information
XilunWu committed Nov 20, 2024
1 parent ac2c7e1 commit 9736890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchtitan/parallelisms/parallel_dims.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def build_mesh(self, device_type):
if self.cp > 1:
if self.dp_replicate > 1 and self.dp_shard > 1: # HSDP
mesh["dp_replicate", "dp_shard", "cp"]._flatten(mesh_dim_name="dp_cp")
elif self.dp_replicate > 1 or self.dp_shard > 1: # FSDP or DDP
elif self.dp_shard > 1: # FSDP
mesh["dp", "cp"]._flatten(mesh_dim_name="dp_cp")

return mesh
Expand Down

0 comments on commit 9736890

Please sign in to comment.