Skip to content

Commit e4658a3

Browse files
committed
Revert "Update Q/DQ Folding pass test to sequence of ops"
This reverts commit 99d5b80. Signed-off-by: Digant Desai <[email protected]>
1 parent 3917336 commit e4658a3

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

backends/arm/test/passes/test_fold_qdq_pass.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,17 @@
2020

2121

2222
class SimpleQuantizeModel(torch.nn.Module):
23-
def forward(self, x, y):
24-
return x + torch.max((x + x), (y + y))
23+
def forward(self, x):
24+
return x + x
2525

2626
def get_inputs(self):
27-
return (torch.rand(1, 1280, 7, 7), torch.rand(1, 1280, 7, 7))
27+
return (torch.rand(1, 1280, 7, 7),)
2828

2929

3030
class FoldAndAnnotateQParamsPassTestClass(FoldAndAnnotateQParamsPass):
3131
def __init__(self):
3232
super(FoldAndAnnotateQParamsPassTestClass, self).__init__(
33-
[
34-
exir_ops.edge.aten.add.Tensor,
35-
exir_ops.edge.aten.maximum.default,
36-
]
33+
[exir_ops.edge.aten.add.Tensor]
3734
)
3835

3936

@@ -61,15 +58,15 @@ def test_fold_qdq_pass(self):
6158
.to_edge()
6259
.check_count(
6360
{
64-
"executorch_exir_dialects_edge__ops_quantized_decomposed_dequantize_per_tensor_default": 7,
65-
"executorch_exir_dialects_edge__ops_quantized_decomposed_quantize_per_tensor_default": 6,
61+
"executorch_exir_dialects_edge__ops_quantized_decomposed_dequantize_per_tensor_default": 2,
62+
"executorch_exir_dialects_edge__ops_quantized_decomposed_quantize_per_tensor_default": 2,
6663
}
6764
)
6865
.run_passes(test_pass_stage)
6966
.check_count(
7067
{
7168
"executorch_exir_dialects_edge__ops_quantized_decomposed_dequantize_per_tensor_default": 1,
72-
"executorch_exir_dialects_edge__ops_quantized_decomposed_quantize_per_tensor_default": 2,
69+
"executorch_exir_dialects_edge__ops_quantized_decomposed_quantize_per_tensor_default": 1,
7370
}
7471
)
7572
)

0 commit comments

Comments
 (0)