@@ -127,7 +127,7 @@ def forward(self, x):
127127 def _test_linear_tosa_MI_pipeline (
128128 self , module : torch .nn .Module , test_data : Tuple [torch .Tensor ]
129129 ):
130- (
130+ tester = (
131131 ArmTester (
132132 module ,
133133 example_inputs = test_data ,
@@ -141,13 +141,14 @@ def _test_linear_tosa_MI_pipeline(
141141 .to_edge_transform_and_lower ()
142142 .check_count ({"torch.ops.higher_order.executorch_call_delegate" : 1 })
143143 .to_executorch ()
144- .run_method_and_compare_outputs (inputs = test_data )
145144 )
145+ if conftest .is_option_enabled ("tosa_ref_model" ):
146+ tester .run_method_and_compare_outputs (inputs = test_data )
146147
147148 def _test_linear_tosa_BI_pipeline (
148149 self , module : torch .nn .Module , test_data : Tuple [torch .Tensor ]
149150 ):
150- (
151+ tester = (
151152 ArmTester (
152153 module ,
153154 example_inputs = test_data ,
@@ -162,8 +163,9 @@ def _test_linear_tosa_BI_pipeline(
162163 .to_edge_transform_and_lower ()
163164 .check_count ({"torch.ops.higher_order.executorch_call_delegate" : 1 })
164165 .to_executorch ()
165- .run_method_and_compare_outputs (inputs = test_data , qtol = 1 )
166166 )
167+ if conftest .is_option_enabled ("tosa_ref_model" ):
168+ tester .run_method_and_compare_outputs (inputs = test_data , qtol = 1 )
167169
168170 def _test_linear_tosa_ethosu_BI_pipeline (
169171 self ,
@@ -186,9 +188,11 @@ def _test_linear_tosa_ethosu_BI_pipeline(
186188 .to_executorch ()
187189 .serialize ()
188190 )
191+ # TODO: Add FVP testing support.
189192 return tester
190193
191194 @parameterized .expand (test_data_suite_rank1 + test_data_suite_rank4 )
195+ @pytest .mark .tosa_ref_model
192196 def test_linear_tosa_MI (
193197 self ,
194198 test_name : str ,
@@ -208,6 +212,7 @@ def test_linear_tosa_MI(
208212 )
209213
210214 @parameterized .expand (test_data_suite_rank1 + test_data_suite_rank4 )
215+ @pytest .mark .tosa_ref_model
211216 def test_linear_tosa_BI (
212217 self ,
213218 test_name : str ,
@@ -249,6 +254,7 @@ def test_linear_tosa_u55_BI(
249254 tester .run_method_and_compare_outputs (qtol = 1 , inputs = test_data )
250255
251256 @parameterized .expand (test_data_suite_rank1 + test_data_suite_rank4 )
257+ @pytest .mark .corstone_fvp
252258 def test_linear_tosa_u85_BI (
253259 self ,
254260 test_name : str ,
0 commit comments