Skip to content

Commit d7f1ccb

Browse files
Arm backend: Reduce atol of some model tests (pytorch#20109)
Change-Id: If516eed4f503d38f9193cc574b70aee36afe64be cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani Signed-off-by: Yufeng Shi <yufeng.shi@arm.com>
1 parent a630b56 commit d7f1ccb

4 files changed

Lines changed: 4 additions & 17 deletions

File tree

backends/arm/test/models/stable_diffusion/test_CLIPTextModelWithProjection.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ def test_clip_text_with_projection_tosa_INT():
109109
aten_op=[],
110110
exir_op=[],
111111
use_to_edge_transform_and_lower=True,
112-
atol=0.8,
113112
frobenius_threshold=None,
114113
cosine_threshold=None,
115114
)
@@ -132,7 +131,6 @@ def test_clip_text_with_projection_vgf_no_quant():
132131
aten_op=[],
133132
exir_op=[],
134133
use_to_edge_transform_and_lower=True,
135-
atol=4,
136134
transform_passes=[
137135
ConvertInt64ConstOpsToInt32Pass(),
138136
ConvertInt64OutputOpsToInt32Pass(),
@@ -159,7 +157,6 @@ def test_clip_text_with_projection_vgf_quant():
159157
aten_op=[],
160158
exir_op=[],
161159
use_to_edge_transform_and_lower=True,
162-
atol=0.8,
163160
quantize=True,
164161
)
165162
pipeline.change_args(

backends/arm/test/models/stable_diffusion/test_SD3Transformer2DModel.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ def test_sd3_transformer_tosa_FP():
117117
aten_op=[],
118118
exir_op=[],
119119
use_to_edge_transform_and_lower=True,
120-
rtol=1.0, # TODO: MLETORCH-875: Reduce tolerance of SD3Transformer2DModel with FP and INT
121-
atol=4.0,
122120
)
123121
pipeline.change_args(
124122
"check_count.exir", TestSD3Transformer2DModel.ops_after_partitioner_FP
@@ -137,9 +135,7 @@ def test_sd3_transformer_tosa_INT():
137135
aten_op=[],
138136
exir_op=[],
139137
use_to_edge_transform_and_lower=True,
140-
qtol=1.0, # TODO: MLETORCH-875: Reduce tolerance of SD3Transformer2DModel with FP and INT
141-
rtol=1.0,
142-
atol=4.0,
138+
atol=0.1, # TODO: MLETORCH-875: Reduce tolerance of SD3Transformer2DModel with FP and INT
143139
frobenius_threshold=None,
144140
cosine_threshold=None,
145141
)
@@ -161,8 +157,6 @@ def test_sd3_transformer_vgf_no_quant():
161157
aten_op=[],
162158
exir_op=[],
163159
use_to_edge_transform_and_lower=True,
164-
rtol=1.0, # TODO: MLETORCH-875: Reduce tolerance of SD3Transformer2DModel with FP and INT,
165-
atol=4.0,
166160
quantize=False,
167161
)
168162
pipeline.change_args(
@@ -184,9 +178,7 @@ def test_sd3_transformer_vgf_quant():
184178
aten_op=[],
185179
exir_op=[],
186180
use_to_edge_transform_and_lower=True,
187-
qtol=1.0,
188-
rtol=1.0, # TODO: MLETORCH-875: Reduce tolerance of SD3Transformer2DModel with FP and INT,
189-
atol=4.0,
181+
atol=0.1, # TODO: MLETORCH-875: Reduce tolerance of SD3Transformer2DModel with FP and INT
190182
quantize=True,
191183
)
192184
pipeline.change_args(

backends/arm/test/models/stable_diffusion/test_vae_AutoencoderKL.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_vae_tosa_INT():
7979
aten_op=[],
8080
exir_op=[],
8181
use_to_edge_transform_and_lower=True,
82-
atol=1.0, # TODO: MLETORCH-990 Reduce tolerance of vae(AutoencoderKL) with INT
82+
atol=0.1, # TODO: MLETORCH-990 Reduce tolerance of vae(AutoencoderKL) with INT
8383
frobenius_threshold=None,
8484
cosine_threshold=None,
8585
)
@@ -115,7 +115,7 @@ def test_vae_vgf_quant():
115115
aten_op=[],
116116
exir_op=[],
117117
use_to_edge_transform_and_lower=True,
118-
atol=1.0, # TODO: MLETORCH-990 Reduce tolerance of vae(AutoencoderKL) with INT
118+
atol=0.1, # TODO: MLETORCH-990 Reduce tolerance of vae(AutoencoderKL) with INT
119119
quantize=True,
120120
)
121121
pipeline.run()

backends/arm/test/models/test_T5ForConditionalGeneration_arm.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ def test_t5_for_conditional_generation_tosa_INT():
114114
aten_op=[],
115115
exir_op=[],
116116
use_to_edge_transform_and_lower=True,
117-
atol=14, # TODO: MLETORCH-1703: Reduce the tolerance of quantized T5ForConditionalGeneration
118117
frobenius_threshold=0.3,
119118
)
120119
pipeline.change_args(
@@ -162,7 +161,6 @@ def test_t5_for_conditional_generation_vgf_quant():
162161
aten_op=[],
163162
exir_op=[],
164163
use_to_edge_transform_and_lower=True,
165-
atol=14, # TODO: MLETORCH-1703: Reduce the tolerance of quantized T5ForConditionalGeneration
166164
quantize=True,
167165
)
168166
pipeline.change_args(

0 commit comments

Comments
 (0)