From 01e8e1138c6090c328de9612f2c06ea79d536780 Mon Sep 17 00:00:00 2001 From: Zingo Andersen Date: Tue, 19 Nov 2024 09:23:09 +0100 Subject: [PATCH] Arm Backend: Update Ethos-U compiler Vela to 4.1.0 This fix a code generation problem. Some Ethos-U85 tests starts working and some Ethos-U55 tests are disabled due to more stricts testing added to vela compiler. Signed-off-by: Zingo Andersen Change-Id: I53a10a1675cea34e105e04f864dfa3cb4cc626fa --- backends/arm/test/ops/test_bmm.py | 19 +++++--- backends/arm/test/ops/test_conv_combos.py | 2 - backends/arm/test/ops/test_depthwise_conv.py | 25 ++++++++--- backends/arm/test/ops/test_div.py | 46 +++++++++++++++----- backends/arm/test/ops/test_layer_norm.py | 7 ++- backends/arm/test/ops/test_logsoftmax.py | 46 ++++++++++++++++---- backends/arm/test/ops/test_mean_dim.py | 4 +- backends/arm/test/ops/test_mul.py | 7 +-- backends/arm/test/ops/test_softmax.py | 29 +++++++++++- backends/arm/test/ops/test_sum.py | 24 +++++++++- backends/arm/test/ops/test_var.py | 32 ++++++++++++-- examples/arm/aot_arm_compiler.py | 4 +- examples/arm/setup.sh | 11 +++-- 13 files changed, 201 insertions(+), 55 deletions(-) diff --git a/backends/arm/test/ops/test_bmm.py b/backends/arm/test/ops/test_bmm.py index 824ec463724..2cf90b2119b 100644 --- a/backends/arm/test/ops/test_bmm.py +++ b/backends/arm/test/ops/test_bmm.py @@ -22,8 +22,8 @@ class TestBMM(unittest.TestCase): class BMM(torch.nn.Module): test_parameters = [ - (torch.rand(5, 3, 5), torch.rand(5, 5, 2)), (torch.rand(2, 1, 1), torch.rand(2, 1, 1)), + (torch.rand(5, 3, 5), torch.rand(5, 5, 2)), (torch.ones(1, 55, 3), torch.ones(1, 3, 44)), (10000 * torch.randn(10, 1, 10), torch.randn(10, 10, 5)), (-10 * torch.randn(2, 32, 64), 5 + 5 * torch.randn(2, 64, 32)), @@ -147,32 +147,37 @@ def test_bmm_single_input_tosa_BI(self, operand1: torch.Tensor): @parameterized.expand(BMM.test_parameters) @unittest.expectedFailure - def test_bmm_u55_BI(self, operand1: torch.Tensor, operand2: torch.Tensor): + def test_bmm_u55_BI_xfails(self, operand1: torch.Tensor, operand2: torch.Tensor): test_data = (operand1, operand2) self._test_bmm_ethosu_BI_pipeline( self.BMM(), common.get_u55_compile_spec(), test_data ) - @parameterized.expand(BMM.test_parameters) - @common.expectedFailureOnFVP + @parameterized.expand(BMM.test_parameters[:1]) def test_bmm_u85_BI(self, operand1: torch.Tensor, operand2: torch.Tensor): test_data = (operand1, operand2) self._test_bmm_ethosu_BI_pipeline( self.BMM(), common.get_u85_compile_spec(), test_data ) + @parameterized.expand(BMM.test_parameters[1:]) + @unittest.expectedFailure + def test_bmm_u85_BI_xfails(self, operand1: torch.Tensor, operand2: torch.Tensor): + test_data = (operand1, operand2) + self._test_bmm_ethosu_BI_pipeline( + self.BMM(), common.get_u85_compile_spec(), test_data + ) + # Expected to fail with error: Warning, unsupported fusing of TOSA Rescale previous operator is of type: Memcpy @parameterized.expand(BMMSingleInput.test_parameters) @unittest.expectedFailure - def test_bmm_single_input_u55_BI(self, operand1: torch.Tensor): + def test_bmm_single_input_u55_BI_xfails(self, operand1: torch.Tensor): test_data = (operand1,) self._test_bmm_ethosu_BI_pipeline( self.BMMSingleInput(), common.get_u55_compile_spec(), test_data ) - # Numerical issues on FVP, MLETORCH 534 @parameterized.expand(BMMSingleInput.test_parameters) - @common.expectedFailureOnFVP def test_bmm_single_input_u85_BI(self, operand1: torch.Tensor): test_data = (operand1,) self._test_bmm_ethosu_BI_pipeline( diff --git a/backends/arm/test/ops/test_conv_combos.py b/backends/arm/test/ops/test_conv_combos.py index 7555fff7206..001c4a2bd58 100644 --- a/backends/arm/test/ops/test_conv_combos.py +++ b/backends/arm/test/ops/test_conv_combos.py @@ -275,8 +275,6 @@ def test_conv_meandim_u55_BI(self): model.get_inputs(), ) - # Numerical Issues on FVP, MLETORCH-520 - @common.expectedFailureOnFVP def test_conv_meandim_u85_BI(self): model = ComboConv2dMeandim() self._test_conv_combo_ethos_BI_pipeline( diff --git a/backends/arm/test/ops/test_depthwise_conv.py b/backends/arm/test/ops/test_depthwise_conv.py index 28cb9ac8443..628b25c259e 100644 --- a/backends/arm/test/ops/test_depthwise_conv.py +++ b/backends/arm/test/ops/test_depthwise_conv.py @@ -156,6 +156,19 @@ ("two_dw_conv2d", two_dw_conv2d), ] +testsuite_conv2d_u85 = [ + ("2x2_1x6x4x4_gp6_st1", dw_conv2d_2x2_1x6x4x4_gp6_st1), + ("3x3_1x3x256x256_gp3_st1", dw_conv2d_3x3_1x3x256x256_gp3_st1), + ("3x3_1x4x256x256_gp4_st1", dw_conv2d_3x3_1x4x256x256_gp4_st1), + ("3x3_1x4x256x256_gp4_nobias", dw_conv2d_3x3_1x4x256x256_gp4_nobias), +] + +testsuite_conv2d_u85_xfails = [ + ("3x3_2x8x198x198_gp8_st3", dw_conv2d_3x3_2x8x198x198_gp8_st3), + ("two_dw_conv2d", two_dw_conv2d), +] + + testsuite_conv1d = [ ("2_1x6x4_gp6_st1", dw_conv1d_2_1x6x4_gp6_st1), ("two_dw_conv1d", two_dw_conv1d), @@ -274,10 +287,8 @@ def test_dw_conv1d_u55_BI( model.get_inputs(), ) - # All test cases except 3x3_1x3x256x256_gp3_st1 have numerical issues on FVP. MLETORCH-520 - @parameterized.expand(testsuite_conv1d[:-2] + testsuite_conv2d) - @common.expectedFailureOnFVP - def test_dw_conv_u85_BI_xfails( + @parameterized.expand(testsuite_conv1d + testsuite_conv2d_u85) + def test_dw_conv_u85_BI( self, test_name: str, model: torch.nn.Module, set_quantize_io: bool = False ): self._test_dw_conv_ethos_BI_pipeline( @@ -288,8 +299,10 @@ def test_dw_conv_u85_BI_xfails( model.get_inputs(), ) - @parameterized.expand(testsuite_conv1d[-2:]) - def test_dw_conv_u85_BI( + # All test cases except 3x3_1x3x256x256_gp3_st1 have numerical issues on FVP. MLETORCH-520 + @parameterized.expand(testsuite_conv2d_u85_xfails) + @common.expectedFailureOnFVP + def test_dw_conv_u85_BI_xfails( self, test_name: str, model: torch.nn.Module, set_quantize_io: bool = False ): self._test_dw_conv_ethos_BI_pipeline( diff --git a/backends/arm/test/ops/test_div.py b/backends/arm/test/ops/test_div.py index b3815f3e7c6..27febd714e5 100644 --- a/backends/arm/test/ops/test_div.py +++ b/backends/arm/test/ops/test_div.py @@ -26,18 +26,18 @@ torch.ones(5), None, ), - ( - "op_div_rank1_rand", - torch.rand(5) * 5, - torch.rand(5) * 5, - None, - ), ( "op_div_rank1_negative_ones", torch.ones(5) * (-1), torch.ones(5) * (-1), None, ), + ( + "op_div_rank1_rand", + torch.rand(5) * 5, + torch.rand(5) * 5, + None, + ), ( "op_div_rank4_ones", torch.ones(5, 10, 25, 20), @@ -183,9 +183,7 @@ def test_div_tosa_BI( test_data = (input_, other_) self._test_div_tosa_BI_pipeline(self.Div(), test_data) - # Numerical issues on FVP likely due to mul op, MLETORCH-521 - @parameterized.expand(test_data_suite) - @common.expectedFailureOnFVP + @parameterized.expand(test_data_suite[:2]) def test_div_u55_BI( self, test_name: str, @@ -199,8 +197,21 @@ def test_div_u55_BI( ) # Numerical issues on FVP likely due to mul op, MLETORCH-521 - @parameterized.expand(test_data_suite) + @parameterized.expand(test_data_suite[2:]) @common.expectedFailureOnFVP + def test_div_u55_BI_xfails( + self, + test_name: str, + input_: Union[torch.Tensor, torch.types.Number], + other_: Union[torch.Tensor, torch.types.Number], + rounding_mode: Optional[str] = None, + ): + test_data = (input_, other_) + self._test_div_ethos_BI_pipeline( + self.Div(), common.get_u55_compile_spec(), test_data + ) + + @parameterized.expand(test_data_suite[:2]) def test_div_u85_BI( self, test_name: str, @@ -212,3 +223,18 @@ def test_div_u85_BI( self._test_div_ethos_BI_pipeline( self.Div(), common.get_u85_compile_spec(), test_data ) + + # Numerical issues on FVP likely due to mul op, MLETORCH-521 + @parameterized.expand(test_data_suite[2:]) + @common.expectedFailureOnFVP + def test_div_u85_BI_xfails( + self, + test_name: str, + input_: Union[torch.Tensor, torch.types.Number], + other_: Union[torch.Tensor, torch.types.Number], + rounding_mode: Optional[str] = None, + ): + test_data = (input_, other_) + self._test_div_ethos_BI_pipeline( + self.Div(), common.get_u85_compile_spec(), test_data + ) diff --git a/backends/arm/test/ops/test_layer_norm.py b/backends/arm/test/ops/test_layer_norm.py index 0b06044a59a..7375a253835 100644 --- a/backends/arm/test/ops/test_layer_norm.py +++ b/backends/arm/test/ops/test_layer_norm.py @@ -170,9 +170,8 @@ def test_layer_norm_u55_BI( ) # Numerical issues on FVP likely due to mul op, MLETORCH-521 - @parameterized.expand(test_data_suite[:-1]) - @common.expectedFailureOnFVP - def test_layer_norm_u85_BI_fvp_xfails( + @parameterized.expand(test_data_suite[:-2]) + def test_layer_norm_u85_BI_fvp( self, test_name: str, test_data: torch.Tensor, @@ -182,7 +181,7 @@ def test_layer_norm_u85_BI_fvp_xfails( self.LayerNorm(*model_params), common.get_u85_compile_spec(), (test_data,) ) - @parameterized.expand(test_data_suite[-1:]) + @parameterized.expand(test_data_suite[-2:]) @unittest.skip # Flaky def test_layer_norm_u85_BI( self, diff --git a/backends/arm/test/ops/test_logsoftmax.py b/backends/arm/test/ops/test_logsoftmax.py index 5d84fa127fd..910384e0a09 100644 --- a/backends/arm/test/ops/test_logsoftmax.py +++ b/backends/arm/test/ops/test_logsoftmax.py @@ -17,14 +17,29 @@ test_data_suite = [ # (test_name, test_data, dim) - ("zeros", torch.zeros(10, 10, 10, 10), 0), - ("zeros_neg_dim", torch.zeros(10, 10, 10, 10), -4), + ("zeros", torch.zeros(10, 8, 5, 2), 0), + ("zeros_neg_dim", torch.zeros(10, 7, 8, 9), -4), ("ones", torch.ones(10, 10), 1), - ("rand_neg_dim", torch.rand(10, 10, 10), -1), - ("rand", torch.rand(10, 10, 10, 10), 2), - ("rand_neg_dim", torch.rand(10, 10, 2, 3), -2), - ("randn", torch.randn(10, 10, 5, 10), 3), - ("randn_neg_dim", torch.randn(1, 10, 10, 10), -3), + ("ones_neg_dim", torch.ones(10, 3, 4), -1), + ("rand", torch.rand(1, 2, 5, 8), 2), + ("rand_neg_dim", torch.rand(2, 10, 8, 10), -2), + ("randn", torch.randn(10, 10, 10, 10), 3), + ("randn_neg_dim", torch.randn(10, 5, 8, 7), -3), +] +test_data_suite_u55 = [ + # (test_name, test_data, dim) + ("ones", torch.ones(10, 10), 1), + ("ones_neg_dim", torch.ones(10, 3, 4), -1), + ("randn_neg_dim", torch.randn(10, 5, 8, 7), -3), +] + +test_data_suite_u55_xfails = [ + # (test_name, test_data, dim) + ("zeros", torch.zeros(10, 8, 5, 2), 0), + ("zeros_neg_dim", torch.zeros(10, 7, 8, 9), -4), + ("rand", torch.rand(1, 2, 5, 8), 2), + ("rand_neg_dim", torch.rand(2, 10, 8, 10), -2), + ("randn", torch.randn(10, 10, 10, 10), 3), ] @@ -135,7 +150,7 @@ def test_logsoftmax_tosa_BI( ): self._test_logsoftmax_tosa_BI_pipeline(self.LogSoftmax(dim=dim), (test_data,)) - @parameterized.expand(test_data_suite) + @parameterized.expand(test_data_suite_u55) def test_logsoftmax_tosa_u55_BI( self, test_name: str, @@ -146,6 +161,19 @@ def test_logsoftmax_tosa_u55_BI( self.LogSoftmax(dim=dim), (test_data,) ) + # Expected to fail as this is not supported on u55. + @parameterized.expand(test_data_suite_u55_xfails) + @unittest.expectedFailure + def test_logsoftmax_tosa_u55_BI_xfails( + self, + test_name: str, + test_data: torch.Tensor, + dim: int, + ): + self._test_logsoftmax_tosa_u55_BI_pipeline( + self.LogSoftmax(dim=dim), (test_data,) + ) + @parameterized.expand(test_data_suite) def test_logsoftmax_tosa_u85_BI( self, @@ -153,6 +181,6 @@ def test_logsoftmax_tosa_u85_BI( test_data: torch.Tensor, dim: int, ): - self._test_logsoftmax_tosa_u55_BI_pipeline( + self._test_logsoftmax_tosa_u85_BI_pipeline( self.LogSoftmax(dim=dim), (test_data,) ) diff --git a/backends/arm/test/ops/test_mean_dim.py b/backends/arm/test/ops/test_mean_dim.py index e8320cf1df3..3cb8c5f815e 100644 --- a/backends/arm/test/ops/test_mean_dim.py +++ b/backends/arm/test/ops/test_mean_dim.py @@ -269,8 +269,10 @@ def test_meandim_tosa_BI( ): self._test_meandim_tosa_BI_pipeline(self.MeanDim(dim, keepdim), (test_data,)) + # Expected to fail as this is not supported on u55. @parameterized.expand(MeanDim.test_data_suite) - def test_meandim_tosa_u55_BI( + @unittest.expectedFailure + def test_meandim_tosa_u55_BI_xfails( self, test_name: str, test_data: torch.Tensor, diff --git a/backends/arm/test/ops/test_mul.py b/backends/arm/test/ops/test_mul.py index 8f0321ea5f7..6d6922628ef 100644 --- a/backends/arm/test/ops/test_mul.py +++ b/backends/arm/test/ops/test_mul.py @@ -152,9 +152,7 @@ def test_mul_tosa_BI( test_data = (input_, other_) self._test_mul_tosa_BI_pipeline(self.Mul(), test_data) - # Numerical issues on FVP, MLETORCH-521 @parameterized.expand(test_data_sute) - @common.expectedFailureOnFVP def test_mul_u55_BI( self, test_name: str, @@ -166,10 +164,7 @@ def test_mul_u55_BI( common.get_u55_compile_spec(), self.Mul(), test_data ) - # Numerical issues on FVP, MLETORCH-521 - # test_data_sute[0] works on U85 - @parameterized.expand(test_data_sute[1:]) - @common.expectedFailureOnFVP + @parameterized.expand(test_data_sute) def test_mul_u85_BI( self, test_name: str, diff --git a/backends/arm/test/ops/test_softmax.py b/backends/arm/test/ops/test_softmax.py index f883d6b8deb..30215b47f3e 100644 --- a/backends/arm/test/ops/test_softmax.py +++ b/backends/arm/test/ops/test_softmax.py @@ -28,6 +28,22 @@ ("randn_neg_dim", torch.randn(10, 5, 8, 7), -3), ] +test_data_suite_u55 = [ + # (test_name, test_data, dim) + ("ones", torch.ones(10, 10), 1), + ("ones_neg_dim", torch.ones(10, 3, 4), -1), + ("randn_neg_dim", torch.randn(10, 5, 8, 7), -3), +] + +test_data_suite_u55_xfails = [ + # (test_name, test_data, dim) + ("zeros", torch.zeros(10, 8, 5, 2), 0), + ("zeros_neg_dim", torch.zeros(10, 7, 8, 9), -4), + ("rand", torch.rand(1, 2, 5, 8), 2), + ("rand_neg_dim", torch.rand(2, 10, 8, 10), -2), + ("randn", torch.randn(10, 10, 10, 10), 3), +] + class TestSoftmax(unittest.TestCase): """Tests softmax.""" @@ -136,7 +152,7 @@ def test_softmax_tosa_BI( ): self._test_softmax_tosa_BI_pipeline(self.Softmax(dim=dim), (test_data,)) - @parameterized.expand(test_data_suite) + @parameterized.expand(test_data_suite_u55) def test_softmax_tosa_u55_BI( self, test_name: str, @@ -145,6 +161,17 @@ def test_softmax_tosa_u55_BI( ): self._test_softmax_tosa_u55_BI_pipeline(self.Softmax(dim=dim), (test_data,)) + # Expected to fail as this is not supported on u55. + @parameterized.expand(test_data_suite_u55_xfails) + @unittest.expectedFailure + def test_softmax_tosa_u55_BI_xfails( + self, + test_name: str, + test_data: torch.Tensor, + dim: int, + ): + self._test_softmax_tosa_u55_BI_pipeline(self.Softmax(dim=dim), (test_data,)) + @parameterized.expand(test_data_suite) def test_softmax_tosa_u85_BI( self, diff --git a/backends/arm/test/ops/test_sum.py b/backends/arm/test/ops/test_sum.py index 9cd63b0a22e..111517afbba 100644 --- a/backends/arm/test/ops/test_sum.py +++ b/backends/arm/test/ops/test_sum.py @@ -35,6 +35,18 @@ class Sum(torch.nn.Module): ((torch.rand(1, 2, 8, 8), [2, 3, 0], True),), ] + test_parameters_u55: list[Tuple[exampledata_t]] = [ + ((torch.rand(10), 0, True),), + ((torch.rand(10, 10), 1, False),), + ((torch.rand(1, 2, 3, 4), 3, True),), + ] + + test_parameters_u55_xfails: list[Tuple[exampledata_t]] = [ + ((torch.rand(10, 10, 10), [-3, 1], True),), + ((torch.rand(2, 1, 5, 8), 1, False),), + ((torch.rand(1, 2, 8, 8), [2, 3, 0], True),), + ] + def forward(self, x: torch.Tensor, dim: int, keepdim: bool): return x.sum(dim=dim, keepdim=keepdim) @@ -112,7 +124,7 @@ def test_sum_tosa_MI(self, test_data: tuple[exampledata_t]): def test_sum_tosa_BI(self, test_data: tuple[exampledata_t]): self._test_sum_tosa_BI_pipeline(self.Sum(), test_data) - @parameterized.expand(Sum.test_parameters) + @parameterized.expand(Sum.test_parameters_u55) def test_sum_u55_BI(self, test_data: tuple[exampledata_t]): self._test_sum_ethosu_BI_pipeline( self.Sum(), @@ -120,6 +132,16 @@ def test_sum_u55_BI(self, test_data: tuple[exampledata_t]): common.get_u55_compile_spec(permute_memory_to_nhwc=False), ) + # Expected to fail as this is not supported on u55. + @parameterized.expand(Sum.test_parameters_u55_xfails) + @unittest.expectedFailure + def test_sum_u55_BI_xfails(self, test_data: tuple[exampledata_t]): + self._test_sum_ethosu_BI_pipeline( + self.Sum(), + test_data, + common.get_u55_compile_spec(permute_memory_to_nhwc=False), + ) + @parameterized.expand(Sum.test_parameters) def test_sum_u85_BI(self, test_data: tuple[exampledata_t]): self._test_sum_ethosu_BI_pipeline( diff --git a/backends/arm/test/ops/test_var.py b/backends/arm/test/ops/test_var.py index 3a1285e6daf..06671848cc9 100644 --- a/backends/arm/test/ops/test_var.py +++ b/backends/arm/test/ops/test_var.py @@ -50,6 +50,16 @@ class VarDim(torch.nn.Module): (torch.rand(1, 50, 10, 20), -1, True, True), ] + test_parameters_u55 = [ + (torch.randn(1, 50, 10, 20), 1, True, False), + (torch.randn(1, 30, 15, 20), -3, True, True), + ] + + test_parameters_u55_xfails = [ + (torch.rand(1, 50, 10), -2, True, False), + (torch.rand(1, 50, 10, 20), -1, True, True), + ] + def forward( self, x: torch.Tensor, @@ -148,8 +158,10 @@ def test_var_tosa_MI(self, test_tensor: torch.Tensor, keepdim, correction): def test_var_tosa_BI(self, test_tensor: torch.Tensor, keepdim, correction): self._test_var_tosa_BI_pipeline(self.Var(), (test_tensor, keepdim, correction)) + # Expected to fail as this is not supported on u55. @parameterized.expand(Var.test_parameters) - def test_var_u55_BI(self, test_tensor: torch.Tensor, keepdim, correction): + @unittest.expectedFailure + def test_var_u55_BI_xfails(self, test_tensor: torch.Tensor, keepdim, correction): self._test_var_ethosu_BI_pipeline( self.Var(), common.get_u55_compile_spec(), @@ -176,7 +188,7 @@ def test_var_dim_tosa_BI(self, test_tensor: torch.Tensor, dim, keepdim, correcti self.VarDim(), (test_tensor, dim, keepdim, correction) ) - @parameterized.expand(VarDim.test_parameters) + @parameterized.expand(VarDim.test_parameters_u55) def test_var_dim_u55_BI(self, test_tensor: torch.Tensor, dim, keepdim, correction): self._test_var_ethosu_BI_pipeline( self.VarDim(), @@ -184,6 +196,18 @@ def test_var_dim_u55_BI(self, test_tensor: torch.Tensor, dim, keepdim, correctio (test_tensor, dim, keepdim, correction), ) + # Expected to fail as this is not supported on u55. + @parameterized.expand(VarDim.test_parameters_u55_xfails) + @unittest.expectedFailure + def test_var_dim_u55_BI_xfails( + self, test_tensor: torch.Tensor, dim, keepdim, correction + ): + self._test_var_ethosu_BI_pipeline( + self.VarDim(), + common.get_u55_compile_spec(), + (test_tensor, dim, keepdim, correction), + ) + @parameterized.expand(VarDim.test_parameters) def test_var_dim_u85_BI(self, test_tensor: torch.Tensor, dim, keepdim, correction): self._test_var_ethosu_BI_pipeline( @@ -208,8 +232,10 @@ def test_var_correction_tosa_BI( self.VarCorrection(), (test_tensor, dim, keepdim, correction) ) + # Expected to fail as this is not supported on u55. @parameterized.expand(VarCorrection.test_parameters) - def test_var_correction_u55_BI( + @unittest.expectedFailure + def test_var_correction_u55_BI_xfails( self, test_tensor: torch.Tensor, dim, keepdim, correction ): self._test_var_ethosu_BI_pipeline( diff --git a/examples/arm/aot_arm_compiler.py b/examples/arm/aot_arm_compiler.py index ddd5fd6b0bb..a16d947dd6c 100644 --- a/examples/arm/aot_arm_compiler.py +++ b/examples/arm/aot_arm_compiler.py @@ -263,7 +263,7 @@ def get_compile_spec( target, system_config="Ethos_U55_High_End_Embedded", memory_mode="Shared_Sram", - extra_flags="--debug-force-regor --output-format=raw", + extra_flags="--debug-force-regor --output-format=raw --verbose-operators --verbose-cycle-estimate", ) .set_permute_memory_format(True) .set_quantize_io(True) @@ -276,7 +276,7 @@ def get_compile_spec( target, system_config="Ethos_U85_SYS_DRAM_Mid", memory_mode="Shared_Sram", - extra_flags="--output-format=raw", + extra_flags="--output-format=raw --verbose-operators --verbose-cycle-estimate", ) .set_permute_memory_format(True) .set_quantize_io(True) diff --git a/examples/arm/setup.sh b/examples/arm/setup.sh index 583237729d0..84f23714664 100755 --- a/examples/arm/setup.sh +++ b/examples/arm/setup.sh @@ -89,7 +89,11 @@ ethos_u_base_rev="24.08" # tosa reference model tosa_reference_model_url="https://review.mlplatform.org/tosa/reference_model" tosa_reference_model_rev="f9ea4ab7da19318fe36b1c34d68a3e40fd6e56c5" - + +# vela +vela_repo_url="https://review.mlplatform.org/ml/ethos-u/ethos-u-vela" +vela_rev="a08fc18780827b5fefc814dd0162ee6317ce0ae7" + ######## ### Mandatory user args ######## @@ -198,6 +202,7 @@ function setup_ethos_u() { cd ethos-u git reset --hard ${ethos_u_base_rev} python3 ./fetch_externals.py -c ${ethos_u_base_rev}.json fetch + pip install pyelftools echo "[${FUNCNAME[0]}] Done @ $(git describe --all --long 3> /dev/null) in ${root_dir}/ethos-u dir." } @@ -259,9 +264,9 @@ function setup_vela() { # cd "${root_dir}" if [[ ! -e ethos-u-vela ]]; then - git clone https://review.mlplatform.org/ml/ethos-u/ethos-u-vela + git clone ${vela_repo_url} repo_dir="${root_dir}/ethos-u-vela" - base_rev=57ce18c89ccc6f6309333dccb24ed30dc68b571f + base_rev=${vela_rev} patch_repo fi cd "${root_dir}/ethos-u-vela"