Skip to content

Commit 6986d91

Browse files
Arm backend: Up tolerance for conv2d, upsample_bilinear2d, etc. (#18494)
Increased the tolerance for: - conv2 on TOSA FP/VGF - ic3 on TOSA FP16 - T5 on TOSA INT/VGF Change-Id: I42e912a4b609f93adeb5a55a9a71e8121368fae8 cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell Signed-off-by: Christoffer J.L. <christoffer.johanssonlundqvist@arm.com>
1 parent d8e9394 commit 6986d91

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

backends/arm/test/models/test_T5ForConditionalGeneration_arm.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ def test_t5_for_conditional_generation_tosa_INT():
114114
aten_op=[],
115115
exir_op=[],
116116
use_to_edge_transform_and_lower=True,
117-
atol=5, # TODO: MLETORCH-1703: Reduce the tolerance of quantized T5ForConditionalGeneration
117+
atol=14, # TODO: MLETORCH-1703: Reduce the tolerance of quantized T5ForConditionalGeneration
118+
frobenius_threshold=0.3,
118119
)
119120
pipeline.change_args(
120121
"check_count.exir",
@@ -161,7 +162,7 @@ def test_t5_for_conditional_generation_vgf_quant():
161162
aten_op=[],
162163
exir_op=[],
163164
use_to_edge_transform_and_lower=True,
164-
atol=5, # TODO: MLETORCH-1703: Reduce the tolerance of quantized T5ForConditionalGeneration
165+
atol=14, # TODO: MLETORCH-1703: Reduce the tolerance of quantized T5ForConditionalGeneration
165166
quantize=True,
166167
)
167168
pipeline.change_args(

backends/arm/test/models/test_inception_v3_arm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_ic3_tosa_FP_fp16():
5656
aten_op=[],
5757
exir_op=[],
5858
use_to_edge_transform_and_lower=True,
59-
atol=5e-2,
59+
atol=0.2,
6060
)
6161
pipeline.run()
6262

backends/arm/test/ops/test_conv2d.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ def test_convolution_2d_tosa_FP(test_data):
510510
aten_op,
511511
exir_op,
512512
tosa_extensions=["bf16"],
513+
atol=3e-3,
514+
rtol=3e-3,
513515
)
514516
pipeline.run()
515517

@@ -620,6 +622,8 @@ def test_convolution_2d_vgf_no_quant(test_data):
620622
aten_op,
621623
exir_op,
622624
quantize=False,
625+
atol=3e-3,
626+
rtol=3e-3,
623627
)
624628
pipeline.run()
625629

backends/arm/test/ops/test_upsample_bilinear2d.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,8 @@ def test_upsample_bilinear2d_vec_vgf_no_quant_UpsamplingBilinear2d(
426426
aten_op,
427427
exir_op,
428428
quantize=False,
429+
atol=2e-3,
430+
rtol=2e-3,
429431
)
430432
if not compare:
431433
pipeline.pop_stage(-1)

0 commit comments

Comments
 (0)