Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable enable_saved_for_backward_recomputation path by default #1659

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions thunder/core/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3160,8 +3160,6 @@ def backward_fn(saved_for_backward, cotangents):
enable_saved_for_backward_recomputation: None | bool = get_compile_option(
"enable_saved_for_backward_recomputation", "Enable save for backward tensors recomputation."
)
if enable_saved_for_backward_recomputation is None or remat_policy:
enable_saved_for_backward_recomputation = True
if enable_saved_for_backward_recomputation:
forward_trace, backward_trace = recompute_saved_for_backward(forward_trace, backward_trace)

Expand Down
2 changes: 1 addition & 1 deletion thunder/tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def forward(self, x):
model = MyModel()

# Do not recompute anything
jmodel = thunder.jit(model)
jmodel = thunder.jit(model, enable_saved_for_backward_recomputation=True)
jmodel(a)

fwd_trace = None
Expand Down
Loading