|
8 | 8 |
|
9 | 9 | from typing import Optional, Tuple, Union |
10 | 10 |
|
11 | | -import pytest |
12 | 11 | import torch |
13 | 12 | from executorch.backends.arm.test import common |
14 | 13 |
|
@@ -181,29 +180,27 @@ def test_div_scalar_vgf_no_quant(test_data: input_t1): |
181 | 180 | pipeline.run() |
182 | 181 |
|
183 | 182 |
|
| 183 | +aten_ops_quant = [ |
| 184 | + "torch.ops.aten.reciprocal.default", |
| 185 | + "torch.ops.aten.mul.Tensor", |
| 186 | +] |
| 187 | + |
| 188 | +exir_ops_quant = [ |
| 189 | + "executorch_exir_dialects_edge__ops_aten_reciprocal_default", |
| 190 | + "executorch_exir_dialects_edge__ops_aten_mul_Tensor", |
| 191 | +] |
| 192 | + |
| 193 | + |
184 | 194 | @common.parametrize("test_data", test_data_suite_scalar) |
185 | | -@pytest.mark.xfail( |
186 | | - reason=( |
187 | | - "Quantized div.Scalar is rewritten to div.Tensor after the initial " |
188 | | - "quantizer support match, so it misses DecomposeDivPass and remains " |
189 | | - "outside the VGF delegate. MLETORCH-2366" |
190 | | - ), |
191 | | - strict=True, |
192 | | -) |
193 | 195 | @common.SkipIfNoModelConverter |
194 | 196 | def test_div_scalar_vgf_quant(test_data: input_t1): |
195 | | - """Test Tensor / Scalar division (VGF INT). |
196 | | -
|
197 | | - The quantized scalar path is rewritten before the ATen and should not be |
198 | | - checked as div.Scalar. We keep expected op lists empty, matching the |
199 | | - existing quantized div.Tensor test. |
200 | | -
|
201 | | - """ |
| 197 | + """Test Tensor / Scalar division (VGF INT).""" |
202 | 198 | pipeline = VgfPipeline[input_t1]( |
203 | 199 | DivScalar(), |
204 | 200 | test_data(), |
205 | | - [], |
206 | | - [], |
| 201 | + aten_op=aten_ops_quant, |
| 202 | + exir_op=exir_ops_quant, |
207 | 203 | quantize=True, |
| 204 | + use_to_edge_transform_and_lower=False, |
208 | 205 | ) |
209 | 206 | pipeline.run() |
0 commit comments