Skip to content

Commit f2fb351

Browse files
authored
Remove cadence.linalg_vector_norm from pass.
Differential Revision: D75091020 Pull Request resolved: #11054
1 parent 4014cc6 commit f2fb351

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

backends/cadence/aot/remove_ops.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,7 @@ def call_operator(
235235
kwargs: dict[str, Argument],
236236
meta: NodeMetadata,
237237
) -> ProxyValue:
238-
if op not in {
239-
exir_ops.edge.aten.linalg_vector_norm.default,
240-
exir_ops.edge.cadence.linalg_vector_norm.default,
241-
}:
238+
if op is not exir_ops.edge.aten.linalg_vector_norm.default:
242239
return super().call_operator(op, args, kwargs, meta)
243240

244241
# If the op has three args or less, it can't be a nop

backends/cadence/aot/tests/test_remove_ops_passes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,7 @@ def forward(self, x: torch.Tensor):
467467

468468
# Expect the linalg_vector_norm op to be removed by the pass
469469
self.assertEqual(
470-
count_node(graph_module, exir_ops.edge.aten.linalg_vector_norm.default)
471-
+ count_node(
472-
graph_module, exir_ops.edge.cadence.linalg_vector_norm.default
473-
),
470+
count_node(graph_module, exir_ops.edge.aten.linalg_vector_norm.default),
474471
0,
475472
)
476473

0 commit comments

Comments
 (0)