diff --git a/backends/arm/test/ops/test_conv_combos.py b/backends/arm/test/ops/test_conv_combos.py index 17083b129f..a64e14869a 100644 --- a/backends/arm/test/ops/test_conv_combos.py +++ b/backends/arm/test/ops/test_conv_combos.py @@ -256,6 +256,33 @@ def _test_conv_combo_ethos_BI_pipeline( if conftest.is_option_enabled("corstone_fvp"): tester.run_method_and_compare_outputs(qtol=1, inputs=test_data) + def _test_conv_combo_ethos_MI_pipeline( + self, + module: torch.nn.Module, + compile_spec: CompileSpec, + test_data: Tuple[torch.Tensor], + atol: float = 1e-3, + rtol: float = 1e-3, + ): + ( + ArmTester( + module, + example_inputs=test_data, + compile_spec=compile_spec, + ) + .quantize() + .export() + .to_edge() + .partition() + .check_count({"torch.ops.higher_order.executorch_call_delegate": 1}) + .check_not(list(module.edge_op_list)) + .to_executorch() + .serialize() + .run_method_and_compare_outputs( + inputs=test_data, atol=atol, rtol=rtol, qtol=1 + ) + ) + #################### ## Conv + meandim ## #################### @@ -276,6 +303,15 @@ def test_conv_meandim_u55_BI(self): model.get_inputs(), ) + @pytest.mark.corstone_fvp + def test_conv_meandim_u55_MI(self): + model = ComboConv2dMeandim() + self._test_conv_combo_ethos_MI_pipeline( + model, + common.get_u55_compile_spec(permute_memory_to_nhwc=True), + model.get_inputs(), + ) + @pytest.mark.corstone_fvp def test_conv_meandim_u85_BI(self): model = ComboConv2dMeandim() @@ -303,6 +339,13 @@ def test_conv_batchnorm_relu6_u55_BI(self): model, common.get_u55_compile_spec(), model.get_inputs() ) + @pytest.mark.corstone_fvp + def test_conv_batchnorm_relu6_u55_MI(self): + model = ComboConvBatchnormRelu6() + self._test_conv_combo_ethos_MI_pipeline( + model, common.get_u55_compile_spec(), model.get_inputs() + ) + @pytest.mark.corstone_fvp def test_conv_batchnorm_relu_u85_BI(self): model = ComboConvBatchnormRelu6() @@ -336,6 +379,14 @@ def test_conv_relu6_u55_BI(self, test_data: torch.Tensor): model, common.get_u55_compile_spec(permute_memory_to_nhwc=True), test_data ) + @parameterized.expand(ComboConvRelu6.test_data) + def test_conv_relu6_u55_MI(self, test_data: torch.Tensor): + model = ComboConvRelu6() + test_data = (test_data,) + self._test_conv_combo_ethos_MI_pipeline( + model, common.get_u55_compile_spec(permute_memory_to_nhwc=True), test_data + ) + @parameterized.expand(ComboConvRelu6.test_data) @pytest.mark.corstone_fvp def test_conv_relu6_u85_BI(self, test_data: torch.Tensor): @@ -367,6 +418,15 @@ def test_block_bottleneck_residual_u55_BI(self): model.get_inputs(), ) + @pytest.mark.corstone_fvp + def test_block_bottleneck_residual_u55_MI(self): + model = ComboBlockBottleneckResidual() + self._test_conv_combo_ethos_MI_pipeline( + model, + common.get_u55_compile_spec(permute_memory_to_nhwc=True), + model.get_inputs(), + ) + @pytest.mark.corstone_fvp def test_block_bottleneck_residual_u85_BI(self): model = ComboBlockBottleneckResidual() @@ -402,6 +462,16 @@ def test_conv_avgpool2d_u55_BI(self, test_data: torch.Tensor): test_data, ) + @parameterized.expand(ComboConvAvgPool2d.test_data) + def test_conv_avgpool2d_u55_MI(self, test_data: torch.Tensor): + model = ComboConvAvgPool2d() + test_data = (test_data,) + self._test_conv_combo_ethos_MI_pipeline( + model, + common.get_u55_compile_spec(), + test_data, + ) + @parameterized.expand(ComboConvAvgPool2d.test_data) @pytest.mark.corstone_fvp def test_conv_avgpool2d_u85_BI(self, test_data: torch.Tensor):