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
3 changes: 2 additions & 1 deletion backends/cadence/aot/replace_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ def call(self, graph_module: torch.fx.GraphModule) -> PassResult:
# Extract an argument to a separate full op.
with graph_module.graph.inserting_before(mul_node):
full_tensor = graph_module.graph.call_function(
exir_ops.edge.aten.full.default, args=([1], full_arg)
torch.ops.aten.full.default, args=([1], full_arg)
)
new_mul_node = graph_module.graph.call_function(
torch.ops.aten.mul.Tensor, args=(x_arg, full_tensor)
Expand Down Expand Up @@ -2449,4 +2449,5 @@ class CadenceReplaceOpsInGraph:
ReplaceAtenApproxGeluWithApproxGeluPass,
ReplaceSplitWithSlicePass,
ReplacePowWithMulPass,
ReplaceMulTensorWithMulAndFullOpsPass,
]
2 changes: 1 addition & 1 deletion backends/cadence/aot/tests/test_replace_ops_passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ def test_extract_mul_argument_to_full(
graph_after_passes,
expected_op_counts={
torch.ops.aten.mul.Tensor: 1,
exir_ops.edge.aten.full.default: 1,
torch.ops.aten.full.default: 1,
},
)
)
Expand Down
Loading