Skip to content
Closed
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: 1 addition & 1 deletion torch/_functorch/partitioners.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def min_cut_rematerialization_partition(
def classify_nodes(joint_module):
required_bw_nodes = set()
for node in joint_module.graph.nodes:
if node.op == 'placeholder' and "tangents" in node.target:
if node.op == 'placeholder' and "tangents" in node.target or must_recompute(node):
required_bw_nodes.add(node)
if node in required_bw_nodes:
for user in node.users:
Expand Down