Skip to content

Commit

Permalink
Update engine.py
Browse files Browse the repository at this point in the history
Remove PP Grad Tail Check (until microsoft#2538 is merged to upstream)
  • Loading branch information
Quentin-Anthony authored Mar 9, 2023
1 parent 457850d commit 64d6c5a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions deepspeed/runtime/pipe/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,7 @@ def _exec_send_grads(self, buffer_id):
if isinstance(inputs, tuple):
first_input = inputs[0]
assert all([torch.is_tensor(elt) for elt in inputs[1:]])
inputs_grad_tail = [
elt.grad for elt in inputs[1:] if elt.grad is not None
]
inputs_grad_tail = [elt.grad for elt in inputs[1:]]
elif torch.is_tensor(inputs):
first_input = inputs
inputs_grad_tail = []
Expand Down

0 comments on commit 64d6c5a

Please sign in to comment.