Skip to content

Commit 614f8d6

Browse files
eigen-kfacebook-github-bot
authored andcommitted
Remove cadence.linalg_vector_norm from pass.
Summary: Removed unsupported op. Differential Revision: D75091020
1 parent 6daeb64 commit 614f8d6

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

532532
# Expect the linalg_vector_norm op to be removed by the pass
533533
self.assertEqual(
534-
count_node(graph_module, exir_ops.edge.aten.linalg_vector_norm.default)
535-
+ count_node(
536-
graph_module, exir_ops.edge.cadence.linalg_vector_norm.default
537-
),
534+
count_node(graph_module, exir_ops.edge.aten.linalg_vector_norm.default),
538535
0,
539536
)
540537

0 commit comments

Comments
 (0)