4
4
# LICENSE file in the root directory of this source tree.
5
5
6
6
import pytest
7
-
8
7
import torch
9
8
from executorch .backends .arm .quantizer import (
10
9
get_symmetric_quantization_config ,
@@ -81,10 +80,13 @@ def forward(self, x):
81
80
82
81
83
82
@common .parametrize ("test_data" , test_data_suite )
84
- @pytest .mark .flaky (reruns = 32 ) # Flaky due to Vela bug: MLBEDSW-10642
85
83
def test_sigmoid_tosa_BI (test_data ):
86
84
pipeline = TosaPipelineBI (
87
- Sigmoid (), (test_data (),), Sigmoid .aten_op , Sigmoid .exir_op
85
+ Sigmoid (),
86
+ (test_data (),),
87
+ Sigmoid .aten_op ,
88
+ Sigmoid .exir_op ,
89
+ qtol = 1 ,
88
90
)
89
91
pipeline .change_args ("quantize" , get_16bit_sigmoid_quantizer ("TOSA-0.80+BI" ))
90
92
pipeline .run ()
@@ -97,10 +99,14 @@ def test_sigmoid_tosa_BI(test_data):
97
99
"ramp" : "AssertionError: Output 0 does not match reference output. MLETORCH-787"
98
100
},
99
101
)
100
- @pytest .mark .flaky (reruns = 32 ) # Flaky due to Vela bug: MLBEDSW-10642
102
+ @pytest .mark .flaky (reruns = 5 ) # MLETORCH-787: Investigate int16-int8 rescaling precision
101
103
def test_sigmoid_add_sigmoid_tosa_BI (test_data ):
102
104
pipeline = TosaPipelineBI (
103
- SigmoidAddSigmoid (), (test_data (),), Sigmoid .aten_op , Sigmoid .exir_op
105
+ SigmoidAddSigmoid (),
106
+ (test_data (),),
107
+ Sigmoid .aten_op ,
108
+ Sigmoid .exir_op ,
109
+ qtol = 1 ,
104
110
)
105
111
pipeline .change_args ("quantize" , get_16bit_sigmoid_quantizer ("TOSA-0.80+BI" ))
106
112
pipeline .run ()
@@ -110,7 +116,6 @@ def test_sigmoid_add_sigmoid_tosa_BI(test_data):
110
116
"test_data" ,
111
117
test_data_suite ,
112
118
)
113
- @pytest .mark .flaky (reruns = 32 ) # Flaky due to Vela bug: MLBEDSW-10642
114
119
def test_sigmoid_tosa_u55 (test_data ):
115
120
pipeline = OpNotSupportedPipeline (
116
121
Sigmoid (), (test_data (),), "TOSA-0.80+BI+u55" , {Sigmoid .exir_op : 1 }
@@ -123,7 +128,6 @@ def test_sigmoid_tosa_u55(test_data):
123
128
"test_data" ,
124
129
test_data_suite ,
125
130
)
126
- @pytest .mark .flaky (reruns = 32 ) # Flaky due to Vela bug: MLBEDSW-10642
127
131
def test_sigmoid_add_sigmoid_tosa_u55 (test_data ):
128
132
pipeline = OpNotSupportedPipeline (
129
133
SigmoidAddSigmoid (),
@@ -137,7 +141,6 @@ def test_sigmoid_add_sigmoid_tosa_u55(test_data):
137
141
138
142
139
143
@common .parametrize ("test_data" , test_data_suite )
140
- @pytest .mark .flaky (reruns = 32 ) # Flaky due to Vela bug: MLBEDSW-10642
141
144
@common .XfailIfNoCorstone320
142
145
def test_sigmoid_tosa_u85 (test_data ):
143
146
pipeline = EthosU85PipelineBI (
@@ -151,10 +154,10 @@ def test_sigmoid_tosa_u85(test_data):
151
154
"test_data" ,
152
155
test_data_suite ,
153
156
xfails = {
154
- "ramp" : "AssertionError: Output 0 does not match reference output." ,
157
+ "ramp" : "AssertionError: Output 0 does not match reference output. MLETORCH-787"
155
158
},
156
159
)
157
- @pytest .mark .flaky (reruns = 32 ) # Flaky due to Vela bug: MLBEDSW-10642
160
+ @pytest .mark .flaky (reruns = 5 ) # MLETORCH-787: Investigate int16-int8 rescaling precision
158
161
@common .XfailIfNoCorstone320
159
162
def test_sigmoid_add_sigmoid_tosa_u85 (test_data ):
160
163
pipeline = EthosU85PipelineBI (
0 commit comments