From a6fd6c861f94a50ec0504d4ceace91cceef13b19 Mon Sep 17 00:00:00 2001 From: Erik Lundell Date: Thu, 4 Dec 2025 10:50:05 +0100 Subject: [PATCH] Arm backend: Update ethos-u-vela to 4.5.0 Remove now passing xfails. Signed-off-by: Erik Lundell Change-Id: I2e96ff27a2791a7ccb2ff300b67949c45b286c09 --- backends/arm/requirements-arm-ethos-u.txt | 2 +- backends/arm/scripts/parse_test_names.py | 1 + .../test/misc/test_conv_relu_residual_add.py | 7 ----- backends/arm/test/ops/test_linear.py | 20 +------------ backends/arm/test/ops/test_matmul.py | 28 ++++++------------- backends/arm/test/ops/test_rsqrt.py | 4 --- backends/arm/test/ops/test_sigmoid.py | 4 --- backends/arm/test/ops/test_tanh.py | 4 --- backends/arm/test/ops/test_var.py | 22 --------------- 9 files changed, 11 insertions(+), 81 deletions(-) diff --git a/backends/arm/requirements-arm-ethos-u.txt b/backends/arm/requirements-arm-ethos-u.txt index 9076aa08852..8dbabe11943 100644 --- a/backends/arm/requirements-arm-ethos-u.txt +++ b/backends/arm/requirements-arm-ethos-u.txt @@ -3,4 +3,4 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. -ethos-u-vela == 4.4.1 \ No newline at end of file +ethos-u-vela == 4.5.0 \ No newline at end of file diff --git a/backends/arm/scripts/parse_test_names.py b/backends/arm/scripts/parse_test_names.py index 9a7c6564e9c..b5fced85086 100644 --- a/backends/arm/scripts/parse_test_names.py +++ b/backends/arm/scripts/parse_test_names.py @@ -14,6 +14,7 @@ "hardsigmoid.default", "hardswish.default", "linear.default", + "matmul.default", "maximum.default", "mean.default", "multihead_attention.default", diff --git a/backends/arm/test/misc/test_conv_relu_residual_add.py b/backends/arm/test/misc/test_conv_relu_residual_add.py index 72886fb4b29..d88a9c74b7c 100644 --- a/backends/arm/test/misc/test_conv_relu_residual_add.py +++ b/backends/arm/test/misc/test_conv_relu_residual_add.py @@ -76,13 +76,6 @@ def test_tosa_INT(per_channel_quantization): pipeline.run() -# TODO: Xfail until the Ethos-U Vela compiler ships commit -# 642f7517d3a6bd053032e1942822f6e38ccd546f. That patch fixes the bug that -# causes this test to fail. -@pytest.mark.xfail( - reason=("Blocked by Vela commit 642f7517d3a6bd053032e1942822f6e38ccd546f"), - strict=True, -) @pytest.mark.slow @common.XfailIfNoCorstone300 @common.parametrize("per_channel_quantization", quant_test_data) diff --git a/backends/arm/test/ops/test_linear.py b/backends/arm/test/ops/test_linear.py index 7f79f7c586b..753e1ea66ac 100644 --- a/backends/arm/test/ops/test_linear.py +++ b/backends/arm/test/ops/test_linear.py @@ -299,25 +299,7 @@ def test_linear_16a8w_tosa_INT(test_data: torch.Tensor): pipeline.run() -x_fails = {} -x_skips = {} - -for test_name in [ - "model_linear_rank4_zeros", - "model_linear_rank4_negative_ones", - "model_linear_rank4_negative_large_rand", -]: - for set_per_chan in ["True", "False"]: - key = test_name + ",per_channel_quant={}".format(set_per_chan) - reason = ( - "MLETORCH-1452: AssertionError: Output 0 does not match reference output." - ) - x_fails[key] = reason - # TODO: Check why xfail doesn't work for this buck target. In the interim rely on skip - x_skips[key] = reason - - -@common.parametrize("test_data", test_data_all_16a8w, xfails=x_fails, skips=x_skips) +@common.parametrize("test_data", test_data_all_16a8w) @common.XfailIfNoCorstone300 def test_linear_16a8w_u55_INT16(test_data: torch.Tensor): """Test linear operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)""" diff --git a/backends/arm/test/ops/test_matmul.py b/backends/arm/test/ops/test_matmul.py index 489078a6dfa..55821599a79 100644 --- a/backends/arm/test/ops/test_matmul.py +++ b/backends/arm/test/ops/test_matmul.py @@ -74,7 +74,7 @@ def test_matmul_tosa_FP(test_data: input_t1): @common.parametrize("test_data", MatMulSingleInput.test_data_generators) -def test_matmul_single_input_tosa_FP(test_data: input_t1): +def test_matmul_tosa_FP_single_input(test_data: input_t1): pipeline = TosaPipelineFP[input_t1]( MatMulSingleInput(), test_data(), aten_op_mm, exir_op_mm ) @@ -82,7 +82,7 @@ def test_matmul_single_input_tosa_FP(test_data: input_t1): @common.parametrize("test_data", MatMulCombo.test_data_generators) -def test_matmul_combo_tosa_FP(test_data: input_t1): +def test_matmul_tosa_FP_combo(test_data: input_t1): pipeline = TosaPipelineFP[input_t1]( MatMulCombo(), test_data(), aten_op_mm, exir_op_mm ) @@ -98,7 +98,7 @@ def test_matmul_tosa_INT(test_data: input_t1): @common.parametrize("test_data", MatMulSingleInput.test_data_generators) -def test_matmul_single_input_tosa_INT(test_data: input_t1): +def test_matmul_tosa_INT_single_input(test_data: input_t1): pipeline = TosaPipelineFP[input_t1]( MatMulSingleInput(), test_data(), @@ -110,7 +110,7 @@ def test_matmul_single_input_tosa_INT(test_data: input_t1): @common.parametrize("test_data", MatMulCombo.test_data_generators) -def test_matmul_combo_tosa_INT(test_data: input_t1): +def test_matmul_tosa_INT_combo(test_data: input_t1): pipeline = TosaPipelineINT[input_t1]( MatMulCombo(), test_data(), @@ -137,12 +137,9 @@ def test_matmul_u55_INT(test_data: input_t1): @common.parametrize( "test_data", MatMulSingleInput.test_data_generators, - xfails={ - "rand_4d": "MLBEDSW-11228: Matmul output diff between 1 input vs 2 identical inputs" - }, ) @common.XfailIfNoCorstone300 -def test_matmul_single_input_u55_INT(test_data: input_t1): +def test_matmul_u55_INT_single_input(test_data: input_t1): pipeline = EthosU55PipelineINT[input_t1]( MatMulSingleInput(), test_data(), @@ -156,12 +153,9 @@ def test_matmul_single_input_u55_INT(test_data: input_t1): @common.parametrize( "test_data", MatMulCombo.test_data_generators, - xfails={ - "rand_rand_rand_4d": "MLBEDSW-11228: Matmul output diff between 1 input vs 2 identical inputs" - }, ) @common.XfailIfNoCorstone300 -def test_matmul_combo_u55_INT(test_data: input_t1): +def test_matmul_u55_INT_combo(test_data: input_t1): pipeline = EthosU55PipelineINT[input_t1]( MatMulCombo(), test_data(), @@ -188,12 +182,9 @@ def test_matmul_u85_INT(test_data: input_t1): @common.parametrize( "test_data", MatMulSingleInput.test_data_generators, - xfails={ - "rand_4d": "MLBEDSW-11228: Matmul output diff between 1 input vs 2 identical inputs" - }, ) @common.XfailIfNoCorstone320 -def test_matmul_single_input_u85_INT(test_data: input_t1): +def test_matmul_u85_INT_single_input(test_data: input_t1): pipeline = EthosU85PipelineINT[input_t1]( MatMulSingleInput(), test_data(), @@ -207,12 +198,9 @@ def test_matmul_single_input_u85_INT(test_data: input_t1): @common.parametrize( "test_data", MatMulCombo.test_data_generators, - xfails={ - "rand_rand_rand_4d": "MLBEDSW-11228: Matmul output diff between 1 input vs 2 identical inputs" - }, ) @common.XfailIfNoCorstone320 -def test_matmul_combo_u85_INT(test_data: input_t1): +def test_matmul_u85_INT_combo(test_data: input_t1): pipeline = EthosU85PipelineINT[input_t1]( MatMulCombo(), test_data(), diff --git a/backends/arm/test/ops/test_rsqrt.py b/backends/arm/test/ops/test_rsqrt.py index 8c3ee914758..800acc16c8f 100644 --- a/backends/arm/test/ops/test_rsqrt.py +++ b/backends/arm/test/ops/test_rsqrt.py @@ -8,7 +8,6 @@ from typing import Tuple -import pytest import torch from executorch.backends.arm.test import common @@ -124,9 +123,6 @@ def test_rsqrt_tosa_INT_a16w8(test_tensor: torch.Tensor): @common.parametrize("test_tensor", Rsqrt.test_parameters) @common.XfailIfNoCorstone300 -@pytest.mark.xfail( - reason="MLETORCH-707: AssertionError: Output 0 does not match reference output." -) def test_rsqrt_16a8w_u55_INT16(test_tensor: torch.Tensor): """Test rsqrt operation with int16 I/O quantization for U55""" # Use wider tolerances for int16 I/O quantization on U55 diff --git a/backends/arm/test/ops/test_sigmoid.py b/backends/arm/test/ops/test_sigmoid.py index bac6e376cee..af66659879a 100644 --- a/backends/arm/test/ops/test_sigmoid.py +++ b/backends/arm/test/ops/test_sigmoid.py @@ -8,7 +8,6 @@ from typing import Tuple -import pytest import torch from executorch.backends.arm.quantizer.arm_quantizer import ( get_symmetric_a16w8_quantization_config, @@ -312,9 +311,6 @@ def test_sigmoid_16a8w_tosa_INT(test_data: torch.Tensor): @common.parametrize("test_data", test_data_suite) @common.XfailIfNoCorstone300 -@pytest.mark.xfail( - reason="MLETORCH-707: AssertionError: Output 0 does not match reference output." -) def test_sigmoid_16a8w_u55_INT16(test_data: torch.Tensor): """Test sigmoid operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)""" per_channel_quantization = False diff --git a/backends/arm/test/ops/test_tanh.py b/backends/arm/test/ops/test_tanh.py index d03fe03452b..62ec50cf4b4 100644 --- a/backends/arm/test/ops/test_tanh.py +++ b/backends/arm/test/ops/test_tanh.py @@ -6,7 +6,6 @@ from typing import Tuple -import pytest import torch from executorch.backends.arm.test import common @@ -132,9 +131,6 @@ def test_tanh_16a8w_tosa_INT(test_data: torch.Tensor): @common.parametrize("test_data", test_data_suite) @common.XfailIfNoCorstone300 -@pytest.mark.xfail( - reason="MLETORCH-707: AssertionError: Output 0 does not match reference output." -) def test_tanh_16a8w_u55_INT16(test_data: torch.Tensor): """Test tanh operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)""" per_channel_quantization = False diff --git a/backends/arm/test/ops/test_var.py b/backends/arm/test/ops/test_var.py index 73bf2165b23..bc95a6d0e1a 100644 --- a/backends/arm/test/ops/test_var.py +++ b/backends/arm/test/ops/test_var.py @@ -87,21 +87,6 @@ class VarDim(torch.nn.Module): ), } - test_parameters_u55_xfails = { - "var_3d_dim_neg_2_keep_dim_unbiased": lambda: ( - torch.rand(1, 50, 10), - -2, - True, - False, - ), - "var_3d_dim_neg_1_keep_dim_biased": lambda: ( - torch.rand(1, 50, 10, 20), - -1, - True, - True, - ), - } - def __init__(self, dim: int = -1, keepdim: bool = True, unbiased: bool = False): super().__init__() self.dim = dim @@ -352,16 +337,9 @@ def test_var_dim_tosa_INT_correction(test_data: Tuple): pipeline.run() -# TODO: Xfail "var_3d_dims_keep_dim_0_correction" until the Ethos-U Vela compiler ships commit -# 642f7517d3a6bd053032e1942822f6e38ccd546f. That patch fixes the bug that causes the test to fail. @common.parametrize( "test_data", VarCorrection.test_parameters, - xfails={ - "var_3d_dims_keep_dim_0_correction": ( - "Blocked by Vela commit 642f7517d3a6bd053032e1942822f6e38ccd546f" - ), - }, ) @common.XfailIfNoCorstone300 def test_var_dim_u55_INT_correction(test_data: Tuple):