Skip to content

Commit 71ec0d2

Browse files
Ninja91facebook-github-bot
authored andcommitted
Updating tests for 16A8W ops which are supported (#14945)
Summary: Updating the TOSA, U55 & U85 tests to remove xfails. These ops are supported now and updating tests to not expect failure. Differential Revision: D84262200
1 parent 75f968d commit 71ec0d2

File tree

5 files changed

+0
-34
lines changed

5 files changed

+0
-34
lines changed

backends/arm/test/ops/test_add.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,6 @@ def get_symmetric_a16w8_add_quantizer(per_channel_quantization=False):
260260

261261

262262
@common.parametrize("test_data", Add.test_data)
263-
@pytest.mark.xfail(
264-
reason="missing int16 add ops support; fails at TOSA reference model with Unsupported operation type or rank. See: https://github.com/pytorch/executorch/issues/13730"
265-
)
266263
def test_add_tensor_16a8w_tosa_INT(test_data: input_t1):
267264
"""Test add operation with 16A8W quantization (16-bit activations, 8-bit weights)"""
268265
per_channel_quantization = False

backends/arm/test/ops/test_cat.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ def get_symmetric_a16w8_cat_quantizer(per_channel_quantization=False):
178178

179179

180180
@common.parametrize("test_data", Cat.test_parameters)
181-
@pytest.mark.xfail(
182-
reason="missing int16 cat ops support; fails at TOSA reference model with Unsupported operation type or rank. See: https://github.com/pytorch/executorch/issues/13978"
183-
)
184181
def test_cat_16a8w_tosa_INT(test_data: Tuple):
185182
"""Test cat operation with 16A8W quantization (16-bit activations, 8-bit weights)"""
186183
per_channel_quantization = False
@@ -206,9 +203,6 @@ def test_cat_16a8w_tosa_INT(test_data: Tuple):
206203

207204
@common.parametrize("test_data", Cat.test_parameters)
208205
@common.XfailIfNoCorstone300
209-
@pytest.mark.xfail(
210-
reason="Vela compilation fails with 'Invalid arguments' for int16 cat operations"
211-
)
212206
def test_cat_16a8w_u55_INT16(test_data: Tuple):
213207
"""Test cat operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)"""
214208
per_channel_quantization = False
@@ -233,9 +227,6 @@ def test_cat_16a8w_u55_INT16(test_data: Tuple):
233227

234228
@common.parametrize("test_data", Cat.test_parameters)
235229
@common.XfailIfNoCorstone320
236-
@pytest.mark.xfail(
237-
reason="Vela compilation fails with 'Invalid arguments' for int16 cat operations"
238-
)
239230
def test_cat_16a8w_u85_INT16(test_data: Tuple):
240231
"""Test cat operation with 16A8W quantization on U85 (16-bit activations, 8-bit weights)"""
241232
per_channel_quantization = False

backends/arm/test/ops/test_mul.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,6 @@ def get_symmetric_a16w8_mul_quantizer(per_channel_quantization=False):
310310

311311

312312
@common.parametrize("test_data", test_data_suite)
313-
@pytest.mark.xfail(
314-
reason="missing int16 mul ops support; fails at TOSA reference model with Unsupported operation type or rank. See: https://github.com/pytorch/executorch/issues/13947"
315-
)
316313
def test_mul_tensor_16a8w_tosa_INT(test_data: input_t1):
317314
"""Test mul operation with 16A8W quantization (16-bit activations, 8-bit weights)"""
318315
per_channel_quantization = False

backends/arm/test/ops/test_slice.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ def get_symmetric_a16w8_slice_quantizer(per_channel_quantization=False):
154154

155155

156156
@common.parametrize("test_data", test_data_suite)
157-
@pytest.mark.xfail(
158-
reason="missing int16 slice ops support; fails at TOSA reference model with Unsupported operation type or rank. See: https://github.com/pytorch/executorch/issues/13976"
159-
)
160157
def test_slice_tensor_16a8w_tosa_INT(test_data: torch.Tensor):
161158
"""Test slice operation with 16A8W quantization (16-bit activations, 8-bit weights)"""
162159
per_channel_quantization = False
@@ -182,9 +179,6 @@ def test_slice_tensor_16a8w_tosa_INT(test_data: torch.Tensor):
182179

183180
@common.parametrize("test_data", test_data_suite)
184181
@common.XfailIfNoCorstone300
185-
@pytest.mark.xfail(
186-
reason="Vela compilation fails with 'Invalid arguments' for int16 slice operations"
187-
)
188182
def test_slice_tensor_16a8w_u55_INT16(test_data: torch.Tensor):
189183
"""Test slice operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)"""
190184
per_channel_quantization = False
@@ -209,9 +203,6 @@ def test_slice_tensor_16a8w_u55_INT16(test_data: torch.Tensor):
209203

210204
@common.parametrize("test_data", test_data_suite)
211205
@common.XfailIfNoCorstone320
212-
@pytest.mark.xfail(
213-
reason="Vela compilation fails with 'Invalid arguments' for int16 slice operations"
214-
)
215206
def test_slice_tensor_16a8w_u85_INT16(test_data: torch.Tensor):
216207
"""Test slice operation with 16A8W quantization on U85 (16-bit activations, 8-bit weights)"""
217208
per_channel_quantization = False

backends/arm/test/ops/test_view.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
from typing import Tuple
1111

12-
import pytest
1312
import torch
1413
from executorch.backends.arm.quantizer.arm_quantizer import (
1514
get_symmetric_a16w8_quantization_config,
@@ -180,9 +179,6 @@ def get_symmetric_a16w8_view_quantizer(per_channel_quantization=False):
180179

181180

182181
@common.parametrize("test_data", View.needs_transpose_tests)
183-
@pytest.mark.xfail(
184-
reason="missing int16 view ops support; fails at TOSA reference model with Unsupported operation type or rank. See: https://github.com/pytorch/executorch/issues/13977"
185-
)
186182
def test_view_16a8w_tosa_INT(test_data: Tuple):
187183
"""Test view operation with 16A8W quantization (16-bit activations, 8-bit weights)"""
188184
per_channel_quantization = False
@@ -209,9 +205,6 @@ def test_view_16a8w_tosa_INT(test_data: Tuple):
209205

210206
@common.parametrize("test_data", View.needs_transpose_tests)
211207
@common.XfailIfNoCorstone300
212-
@pytest.mark.xfail(
213-
reason="Vela compilation fails with 'Invalid arguments' for int16 view operations"
214-
)
215208
def test_view_16a8w_u55_INT16(test_data: Tuple):
216209
"""Test view operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)"""
217210
per_channel_quantization = False
@@ -237,9 +230,6 @@ def test_view_16a8w_u55_INT16(test_data: Tuple):
237230

238231
@common.parametrize("test_data", View.needs_transpose_tests)
239232
@common.XfailIfNoCorstone320
240-
@pytest.mark.xfail(
241-
reason="Vela compilation fails with 'Invalid arguments' for int16 view operations"
242-
)
243233
def test_view_16a8w_u85_INT16(test_data: Tuple):
244234
"""Test view operation with 16A8W quantization on U85 (16-bit activations, 8-bit weights)"""
245235
per_channel_quantization = False

0 commit comments

Comments
 (0)