Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitij12345 committed Nov 13, 2024
1 parent b71214c commit 4346842
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thunder/core/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ def __call__(self, *args, **kwargs):
# vjp transform (applied later).
def tag_tensorproxy_output_as_detached(proxy):
if isinstance(proxy, TensorProxy):
# We need to remove name from trace, otherwise replace will return a proxy with new name.
trace.names.remove(proxy.name)
return proxy.replace(tags=(ProxyTag.DETACHED_AUTOGRAD_GRAPH,))
return proxy

Expand Down

0 comments on commit 4346842

Please sign in to comment.