@@ -127,7 +127,7 @@ def forward(self, x):
127
127
def _test_linear_tosa_MI_pipeline (
128
128
self , module : torch .nn .Module , test_data : Tuple [torch .Tensor ]
129
129
):
130
- (
130
+ tester = (
131
131
ArmTester (
132
132
module ,
133
133
example_inputs = test_data ,
@@ -141,13 +141,14 @@ def _test_linear_tosa_MI_pipeline(
141
141
.to_edge_transform_and_lower ()
142
142
.check_count ({"torch.ops.higher_order.executorch_call_delegate" : 1 })
143
143
.to_executorch ()
144
- .run_method_and_compare_outputs (inputs = test_data )
145
144
)
145
+ if conftest .is_option_enabled ("tosa_ref_model" ):
146
+ tester .run_method_and_compare_outputs (inputs = test_data )
146
147
147
148
def _test_linear_tosa_BI_pipeline (
148
149
self , module : torch .nn .Module , test_data : Tuple [torch .Tensor ]
149
150
):
150
- (
151
+ tester = (
151
152
ArmTester (
152
153
module ,
153
154
example_inputs = test_data ,
@@ -162,8 +163,9 @@ def _test_linear_tosa_BI_pipeline(
162
163
.to_edge_transform_and_lower ()
163
164
.check_count ({"torch.ops.higher_order.executorch_call_delegate" : 1 })
164
165
.to_executorch ()
165
- .run_method_and_compare_outputs (inputs = test_data , qtol = 1 )
166
166
)
167
+ if conftest .is_option_enabled ("tosa_ref_model" ):
168
+ tester .run_method_and_compare_outputs (inputs = test_data , qtol = 1 )
167
169
168
170
def _test_linear_tosa_ethosu_BI_pipeline (
169
171
self ,
@@ -186,9 +188,11 @@ def _test_linear_tosa_ethosu_BI_pipeline(
186
188
.to_executorch ()
187
189
.serialize ()
188
190
)
191
+ # TODO: Add FVP testing support.
189
192
return tester
190
193
191
194
@parameterized .expand (test_data_suite_rank1 + test_data_suite_rank4 )
195
+ @pytest .mark .tosa_ref_model
192
196
def test_linear_tosa_MI (
193
197
self ,
194
198
test_name : str ,
@@ -208,6 +212,7 @@ def test_linear_tosa_MI(
208
212
)
209
213
210
214
@parameterized .expand (test_data_suite_rank1 + test_data_suite_rank4 )
215
+ @pytest .mark .tosa_ref_model
211
216
def test_linear_tosa_BI (
212
217
self ,
213
218
test_name : str ,
@@ -249,6 +254,7 @@ def test_linear_tosa_u55_BI(
249
254
tester .run_method_and_compare_outputs (qtol = 1 , inputs = test_data )
250
255
251
256
@parameterized .expand (test_data_suite_rank1 + test_data_suite_rank4 )
257
+ @pytest .mark .corstone_fvp
252
258
def test_linear_tosa_u85_BI (
253
259
self ,
254
260
test_name : str ,
0 commit comments