Skip to content

Commit

Permalink
Avoid KeyError
Browse files Browse the repository at this point in the history
  • Loading branch information
crcrpar authored Nov 8, 2024
1 parent a0a6151 commit a6b56ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thunder/core/transform_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def dce(trace: Trace, needed_proxies: None | set[Variable] = None) -> Trace:
# may mark some of the operation's outputs as unused
some_unused = False
for out in bsym.flat_proxy_outs:
if variableify(out) in needed_proxies and producer_map[out] == bsym:
if variableify(out) in needed_proxies and producer_map.get(out, None) == bsym:
needed = True
else:
some_unused = True
Expand Down

0 comments on commit a6b56ec

Please sign in to comment.