Skip to content

Commit 6c5118a

Browse files
inocsinnarendasan
authored andcommitted
fix(remove_to): bug in remove_to.cpp, replace outputs()[0] with inputs()[0]
Signed-off-by: inocsin <[email protected]>
1 parent 885439c commit 6c5118a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/lowering/passes/remove_to.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct ToRemoval {
3333
auto n = *it;
3434
if (n->kind() == c10::Symbol::fromQualString("aten::to")) {
3535
LOG_GRAPH("Found that node " << *n << " is an to node (RemoveTo)" << std::endl);
36-
n->outputs()[0]->replaceAllUsesWith(n->inputs()[1]);
36+
n->outputs()[0]->replaceAllUsesWith(n->inputs()[0]);
3737
it.destroyCurrent();
3838
}
3939
}

0 commit comments

Comments
 (0)