Skip to content

Commit a4da829

Browse files
eigen-kfacebook-github-bot
authored andcommitted
Remove cadence.linalg_vector_norm from pass. (#11054)
Summary: Removed unsupported op. Reviewed By: hsharma35 Differential Revision: D75091020
1 parent 77e342d commit a4da829

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
@@ -465,10 +465,7 @@ def forward(self, x: torch.Tensor):
465465

466466
# Expect the linalg_vector_norm op to be removed by the pass
467467
self.assertEqual(
468-
count_node(graph_module, exir_ops.edge.aten.linalg_vector_norm.default)
469-
+ count_node(
470-
graph_module, exir_ops.edge.cadence.linalg_vector_norm.default
471-
),
468+
count_node(graph_module, exir_ops.edge.aten.linalg_vector_norm.default),
472469
0,
473470
)
474471

0 commit comments

Comments
 (0)