Skip to content

Commit

Permalink
DeviceMesh BC fix (#387)
Browse files Browse the repository at this point in the history
fix BC issues

There's another pipeline bc issue :(
  • Loading branch information
wanchaol authored Jun 9, 2024
1 parent 104bd6c commit ccf1ed8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions torchtitan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ def set_pg_timeouts(timeout, world_mesh):
torch.distributed.barrier()
torch.cuda.synchronize()

groups = (
[world_mesh.get_group()] if world_mesh.ndim == 1 else world_mesh.get_group()
)
groups = [world_mesh.get_group(mesh_dim) for mesh_dim in range(world_mesh.ndim)]

# None represents the 'default' PG, not part of the mesh
groups.append(None)
Expand Down

0 comments on commit ccf1ed8

Please sign in to comment.