Skip to content

Commit 7ffe6b6

Browse files
committed
refactor(op_aliasing): Rename pass to op aliasing to cover all direct
1:1 op mappings Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent c514bf3 commit 7ffe6b6

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

core/lowering/lowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void LowerGraph(std::shared_ptr<torch::jit::Graph>& g) {
4848
// passes::UnpackBatchNorm(g);
4949
passes::UnpackLogSoftmax(g);
5050
passes::RemoveNOPs(g);
51-
passes::ElementWisePass(g);
51+
passes::AliasOperators(g);
5252
torch::jit::EliminateDeadCode(g);
5353
LOG_GRAPH(*g);
5454
}

core/lowering/passes/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cc_library(
2525
"unpack_addmm.cpp",
2626
"unpack_batch_norm.cpp",
2727
"unpack_log_softmax.cpp",
28-
"element_wise_pass.cpp"
28+
"op_aliasing.cpp"
2929
],
3030
deps = [
3131
"//core/util:prelude",

core/lowering/passes/element_wise_pass.cpp renamed to core/lowering/passes/op_aliasing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace core {
77
namespace lowering {
88
namespace passes {
99

10-
void ElementWisePass(std::shared_ptr<torch::jit::Graph>& graph) {
10+
void AliasOperators(std::shared_ptr<torch::jit::Graph>& graph) {
1111
std::string true_divide_pattern = R"IR(
1212
graph(%s, %o):
1313
%1 : Tensor = aten::true_divide(%s, %o)

core/lowering/passes/passes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void RemoveNOPs(std::shared_ptr<torch::jit::Graph> graph);
1919
void UnpackAddMM(std::shared_ptr<torch::jit::Graph>& graph);
2020
void UnpackBatchNorm(std::shared_ptr<torch::jit::Graph>& graph);
2121
void UnpackLogSoftmax(std::shared_ptr<torch::jit::Graph>& graph);
22-
void ElementWisePass(std::shared_ptr<torch::jit::Graph>& graph);
22+
void AliasOperators(std::shared_ptr<torch::jit::Graph>& graph);
2323

2424
} // namespace passes
2525
} // namespace lowering

tests/core/lowering/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ lowering_test(
2020
)
2121

2222
lowering_test(
23-
name = "test_element_wise_pass",
23+
name = "test_operator_aliasing_pass",
2424
)
2525

2626
test_suite(
@@ -29,6 +29,6 @@ test_suite(
2929
":test_remove_contiguous_pass",
3030
":test_remove_to",
3131
":test_remove_detach_pass",
32-
":test_element_wise_pass"
32+
":test_operator_aliasing_pass"
3333
]
3434
)

0 commit comments

Comments
 (0)