Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
comment out special treatment of copy
  • Loading branch information
riccardofelluga committed May 27, 2025
commit 524142b76c6d8f618ee3fa12e505f682695aae55
10 changes: 5 additions & 5 deletions thunder/transforms/autodiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@ def split_into_forward_and_backward(joint_trace: TraceCtx):
continue

# copy_ updating a forward proxy is special regardless of the output
if bsym.sym == prims.copy_ and bsym.args[1].name in forward_proxy_names:
# todo: should we also handle ltorch.copy_ ?
forward_part_bsyms.insert(0, bsym.from_bsym())
forward_proxy_names.update(a.name for a in bsym.flat_proxy_args)
continue
# if bsym.sym == prims.copy_ and bsym.args[1].name in forward_proxy_names:
# # todo: should we also handle ltorch.copy_ ?
# forward_part_bsyms.insert(0, bsym.from_bsym())
# forward_proxy_names.update(a.name for a in bsym.flat_proxy_args)
# continue

# if we don't need to have it in the forward, it is part of the backward
backward_part_bsyms.insert(0, bsym.from_bsym())
Expand Down
Loading