Skip to content

Commit

Permalink
Speed up _extract_graph_with_inputs_outputs
Browse files Browse the repository at this point in the history
ghstack-source-id: 6787796ed5033d8bf22730703fbd547575b1a366
Pull Request resolved: #125937
  • Loading branch information
aorenste committed May 10, 2024
1 parent 946b96f commit 00f811d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/_functorch/partitioners.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _extract_graph_with_inputs_outputs(joint_graph, inputs, outputs):
env[node] = new_node

for node in joint_graph.nodes:
if node in inputs:
if node in env:
continue
elif node.op == "placeholder":
env[node] = InvalidNode
Expand Down

0 comments on commit 00f811d

Please sign in to comment.