Skip to content

Commit

Permalink
fix(remove_to): bug in remove_to.cpp, replace outputs()[0] with input…
Browse files Browse the repository at this point in the history
…s()[0]

Signed-off-by: inocsin <[email protected]>
  • Loading branch information
inocsin authored and narendasan committed Jan 28, 2021
1 parent 885439c commit 6c5118a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lowering/passes/remove_to.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct ToRemoval {
auto n = *it;
if (n->kind() == c10::Symbol::fromQualString("aten::to")) {
LOG_GRAPH("Found that node " << *n << " is an to node (RemoveTo)" << std::endl);
n->outputs()[0]->replaceAllUsesWith(n->inputs()[1]);
n->outputs()[0]->replaceAllUsesWith(n->inputs()[0]);
it.destroyCurrent();
}
}
Expand Down

0 comments on commit 6c5118a

Please sign in to comment.