Skip to content

Commit 64d6c5a

Browse files
Update engine.py
Remove PP Grad Tail Check (until deepspeedai#2538 is merged to upstream)
1 parent 457850d commit 64d6c5a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

deepspeed/runtime/pipe/engine.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,9 +990,7 @@ def _exec_send_grads(self, buffer_id):
990990
if isinstance(inputs, tuple):
991991
first_input = inputs[0]
992992
assert all([torch.is_tensor(elt) for elt in inputs[1:]])
993-
inputs_grad_tail = [
994-
elt.grad for elt in inputs[1:] if elt.grad is not None
995-
]
993+
inputs_grad_tail = [elt.grad for elt in inputs[1:]]
996994
elif torch.is_tensor(inputs):
997995
first_input = inputs
998996
inputs_grad_tail = []

0 commit comments

Comments
 (0)