Skip to content

Commit 318aeb1

Browse files
Add a16w8 per-op test for conv1d (#19597)
Summary: Add int16 activation / int8 weight (a16w8) quantization tests for `aten.conv1d` on Ethos-U55 and Ethos-U85. ## Changes - Add `test_conv1d_a16w8_u55_INT` using `EthosU55PipelineINT` with `a16w8_quantization=True, symmetric_io_quantization=True`, reusing existing `test_data_INT` parameters - Add `test_conv1d_a16w8_u85_INT` using `EthosU85PipelineINT` with same kwargs - Register `ops/test_conv1d.py` in `fbcode/` and `xplat/` `targets.bzl` Reviewed By: Ninja91 Differential Revision: D104532360
1 parent 8805beb commit 318aeb1

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

backends/arm/test/ops/test_conv1d.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,3 +399,34 @@ def test_convolution_1d_vgf_quant_a8w4(test_data):
399399
get_symmetric_a8w4_quantization_config(is_per_channel=per_channel_quantization)
400400
)
401401
pipeline.run()
402+
403+
404+
@common.parametrize("test_data", test_data_INT)
405+
@common.XfailIfNoCorstone300
406+
def test_conv1d_a16w8_u55_INT(test_data):
407+
model, per_channel_quantization = test_data()
408+
pipeline = EthosU55PipelineINT[input_t](
409+
model,
410+
model.get_inputs(),
411+
aten_op,
412+
exir_op,
413+
a16w8_quantization=True,
414+
symmetric_io_quantization=True,
415+
per_channel_quantization=per_channel_quantization,
416+
)
417+
pipeline.run()
418+
419+
@common.parametrize("test_data", test_data_INT)
420+
@common.XfailIfNoCorstone320
421+
def test_conv1d_a16w8_u85_INT(test_data):
422+
model, per_channel_quantization = test_data()
423+
pipeline = EthosU85PipelineINT[input_t](
424+
model,
425+
model.get_inputs(),
426+
aten_op,
427+
exir_op,
428+
a16w8_quantization=True,
429+
symmetric_io_quantization=True,
430+
per_channel_quantization=per_channel_quantization,
431+
)
432+
pipeline.run()

backends/arm/test/targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def define_arm_tests():
4040
"ops/test_reciprocal.py",
4141
"ops/test_mean_dim.py",
4242
"ops/test_var.py",
43+
"ops/test_conv1d.py",
4344
]
4445

4546
# Quantization

0 commit comments

Comments
 (0)