Skip to content

Commit 6c97c6d

Browse files
author
Ali Alshaarawy
committed
handle out is none
1 parent 9d9ba4e commit 6c97c6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

thunder/core/rematerialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ def add_to_swapmap(p):
695695
if bsym.sym.id == PrimIDs.UNPACK_SEQUENCE:
696696
flattened_args = tree_flatten(bw_trace.args[1])[0]
697697
proxy_names = {y.name for y in flattened_args if isinstance(y, ProxyInterface)}
698-
if all(not isinstance(out, CollectionProxy) and out.name not in proxy_names for out in bsym.flat_outs):
698+
if all(not isinstance(out, CollectionProxy) and out.name not in proxy_names for out in bsym.flat_outs if out is not None):
699699
old_saved_for_backward_bw += bsym.flat_outs
700700
assert len(old_saved_for_backward_fw) == len(old_saved_for_backward_bw)
701701
new_required_for_bakward_fw_to_bw_map = {

0 commit comments

Comments
 (0)