Skip to content
Merged
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
4 changes: 2 additions & 2 deletions backends/cadence/aot/replace_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,11 @@ class ReplaceConvolutionOptionalArgsWithConcreteArgsPass(ExportPass):
"""

def call_operator(self, op, args, kwargs, meta):
if get_edge_overload_packet(op) != exir_ops.edge.aten.convolution:
if get_edge_overload_packet(op) != exir_ops.edge.cadence.convolution:
return super().call_operator(op, args, kwargs, meta)

# Check if the bias is already concrete
assert len(args) == 9
assert len(args) == 8
if args[2] is not None:
return super().call_operator(op, args, kwargs, meta)

Expand Down
9 changes: 3 additions & 6 deletions backends/cadence/aot/tests/test_replace_ops_passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,6 @@ def test_replace_convolution_optional_args_with_concrete_args(
bias_enabled: bool = True,
channel_last: bool = False,
) -> None:
transposed = True
output_padding = [0]
groups = in_channels if depthwise else 1
builder = GraphBuilder()
x = builder.placeholder("x", torch.randn(*shape, dtype=torch.float32))
Expand All @@ -477,17 +475,16 @@ def test_replace_convolution_optional_args_with_concrete_args(
args=(x, [0, 2, 1]),
)
convolution = builder.call_operator(
op=exir_ops.edge.aten.convolution.default,
op=exir_ops.edge.cadence.convolution.default,
args=(
x,
weights,
bias,
[stride],
[padding],
[dilation],
transposed,
output_padding,
groups,
False,
),
)
if channel_last:
Expand All @@ -504,7 +501,7 @@ def test_replace_convolution_optional_args_with_concrete_args(
1,
)
self.assertEqual(
count_node(graph_after_passes, exir_ops.edge.aten.convolution.default),
count_node(graph_after_passes, exir_ops.edge.cadence.convolution.default),
1,
)

Expand Down
Loading