Skip to content

Commit

Permalink
fix: remove wrong async
Browse files Browse the repository at this point in the history
  • Loading branch information
samsja committed Sep 26, 2024
1 parent 867350d commit e31fffa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/zeroband/diloco.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@ def sync_pseudo_gradient(self, model: nn.Module):

# gloo does not support AVG
param_offloaded.grad = param_offloaded.grad / self.elastic_device_mesh.global_pg.size()
dist.all_reduce(
param_offloaded.grad, op=dist.ReduceOp.SUM, group=self.elastic_device_mesh.global_pg, async_op=True
)
# todo async here
dist.all_reduce(param_offloaded.grad, op=dist.ReduceOp.SUM, group=self.elastic_device_mesh.global_pg)
# todo maybe do async here

def sync_inner_model(self, model: nn.Module):
"""
Expand Down

0 comments on commit e31fffa

Please sign in to comment.