Skip to content

Remove cadence.linalg_vector_norm from pass. #11054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions backends/cadence/aot/remove_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,7 @@ def call_operator(
kwargs: dict[str, Argument],
meta: NodeMetadata,
) -> ProxyValue:
if op not in {
exir_ops.edge.aten.linalg_vector_norm.default,
exir_ops.edge.cadence.linalg_vector_norm.default,
}:
if op is not exir_ops.edge.aten.linalg_vector_norm.default:
return super().call_operator(op, args, kwargs, meta)

# If the op has three args or less, it can't be a nop
Expand Down
5 changes: 1 addition & 4 deletions backends/cadence/aot/tests/test_remove_ops_passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,7 @@ def forward(self, x: torch.Tensor):

# Expect the linalg_vector_norm op to be removed by the pass
self.assertEqual(
count_node(graph_module, exir_ops.edge.aten.linalg_vector_norm.default)
+ count_node(
graph_module, exir_ops.edge.cadence.linalg_vector_norm.default
),
count_node(graph_module, exir_ops.edge.aten.linalg_vector_norm.default),
0,
)

Expand Down
Loading