Skip to content

Commit

Permalink
Merge branch 'master' into fix_bwd_memcpy_4_infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
loadams authored Oct 29, 2024
2 parents 1fd255e + e4a247e commit 7795161
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepspeed/runtime/pipe/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ def _exec_reduce_tied_grads(self):
weight_group_list = self.module.get_tied_weights_and_groups()
for weight, group in weight_group_list:
grad = weight._hp_grad if self.using_bf16_optimizer else weight.grad
dist.all_reduce(grad, group=group)
if grad is not None:
dist.all_reduce(grad, group=group)

def _exec_reduce_grads(self):
self._force_grad_boundary = True
Expand Down

0 comments on commit 7795161

Please sign in to comment.