Skip to content

Commit

Permalink
fix: change floordiv to divmod for `//tests/core/lowering:test_remove…
Browse files Browse the repository at this point in the history
…_unnecessary_casts` (#3223)
  • Loading branch information
zewenli98 authored Oct 17, 2024
1 parent f3636a9 commit 0bf1231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lowering/passes/remove_unnecessary_casts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void RemoveSingleUse0DTensors(std::shared_ptr<torch::jit::Graph>& g) {
new_node->outputs()[0]->setType(c10::IntType::get());
user->outputs()[0]->replaceAllUsesWith(new_node->outputs()[0]);
user->destroy();
} else if (user->kind() == c10::Symbol::fromQualString("aten::floordiv")) {
} else if (user->kind() == c10::Symbol::fromQualString("aten::floor_divide")) {
new_node = g->create(c10::aten::floordiv, user->inputs(), 1);
new_node->insertAfter(user);
new_node->outputs()[0]->setType(c10::IntType::get());
Expand Down

0 comments on commit 0bf1231

Please sign in to comment.