Skip to content

Commit f3c92ae

Browse files
Arm backend: Update ethos-u-vela to 4.5.0 (pytorch#16075)
Remove new passing xfails due to new Vela version is fixing some old problems. cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai Signed-off-by: Erik Lundell <erik.lundell@arm.com> Co-authored-by: Digant Desai <digantdesai@meta.com>
1 parent 40a18e7 commit f3c92ae

8 files changed

Lines changed: 5 additions & 76 deletions

File tree

‎backends/arm/requirements-arm-ethos-u.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# This source code is licensed under the BSD-style license found in the
44
# LICENSE file in the root directory of this source tree.
55

6-
ethos-u-vela == 4.4.1
6+
ethos-u-vela == 4.5.0
77
pte-adapter-model-explorer == 0.0.2

‎backends/arm/test/misc/test_conv_relu_residual_add.py‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,6 @@ def test_conv_relu_residual_add_tosa_INT(per_channel_quantization):
7676
pipeline.run()
7777

7878

79-
# TODO: Xfail until the Ethos-U Vela compiler ships commit
80-
# 642f7517d3a6bd053032e1942822f6e38ccd546f. That patch fixes the bug that
81-
# causes this test to fail.
82-
@pytest.mark.xfail(
83-
reason=("Blocked by Vela commit 642f7517d3a6bd053032e1942822f6e38ccd546f"),
84-
strict=True,
85-
)
8679
@pytest.mark.slow
8780
@common.XfailIfNoCorstone300
8881
@common.parametrize("per_channel_quantization", quant_test_data)

‎backends/arm/test/ops/test_linear.py‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -299,25 +299,7 @@ def test_linear_16a8w_tosa_INT(test_data: torch.Tensor):
299299
pipeline.run()
300300

301301

302-
x_fails = {}
303-
x_skips = {}
304-
305-
for test_name in [
306-
"model_linear_rank4_zeros",
307-
"model_linear_rank4_negative_ones",
308-
"model_linear_rank4_negative_large_rand",
309-
]:
310-
for set_per_chan in ["True", "False"]:
311-
key = test_name + ",per_channel_quant={}".format(set_per_chan)
312-
reason = (
313-
"MLETORCH-1452: AssertionError: Output 0 does not match reference output."
314-
)
315-
x_fails[key] = reason
316-
# TODO: Check why xfail doesn't work for this buck target. In the interim rely on skip
317-
x_skips[key] = reason
318-
319-
320-
@common.parametrize("test_data", test_data_all_16a8w, xfails=x_fails, skips=x_skips)
302+
@common.parametrize("test_data", test_data_all_16a8w)
321303
@common.XfailIfNoCorstone300
322304
def test_linear_16a8w_u55_INT(test_data: torch.Tensor):
323305
"""Test linear operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)"""

‎backends/arm/test/ops/test_matmul.py‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ def test_matmul_u55_INT(test_data: input_t1):
137137
@common.parametrize(
138138
"test_data",
139139
MatMulSingleInput.test_data_generators,
140-
xfails={
141-
"rand_4d": "MLBEDSW-11228: Matmul output diff between 1 input vs 2 identical inputs"
142-
},
143140
)
144141
@common.XfailIfNoCorstone300
145142
def test_matmul_u55_INT_single_input(test_data: input_t1):
@@ -156,9 +153,6 @@ def test_matmul_u55_INT_single_input(test_data: input_t1):
156153
@common.parametrize(
157154
"test_data",
158155
MatMulCombo.test_data_generators,
159-
xfails={
160-
"rand_rand_rand_4d": "MLBEDSW-11228: Matmul output diff between 1 input vs 2 identical inputs"
161-
},
162156
)
163157
@common.XfailIfNoCorstone300
164158
def test_matmul_u55_INT_combo(test_data: input_t1):
@@ -188,9 +182,6 @@ def test_matmul_u85_INT(test_data: input_t1):
188182
@common.parametrize(
189183
"test_data",
190184
MatMulSingleInput.test_data_generators,
191-
xfails={
192-
"rand_4d": "MLBEDSW-11228: Matmul output diff between 1 input vs 2 identical inputs"
193-
},
194185
)
195186
@common.XfailIfNoCorstone320
196187
def test_matmul_u85_INT_single_input(test_data: input_t1):
@@ -207,9 +198,6 @@ def test_matmul_u85_INT_single_input(test_data: input_t1):
207198
@common.parametrize(
208199
"test_data",
209200
MatMulCombo.test_data_generators,
210-
xfails={
211-
"rand_rand_rand_4d": "MLBEDSW-11228: Matmul output diff between 1 input vs 2 identical inputs"
212-
},
213201
)
214202
@common.XfailIfNoCorstone320
215203
def test_matmul_u85_INT_combo(test_data: input_t1):

‎backends/arm/test/ops/test_rsqrt.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from typing import Tuple
1010

11-
import pytest
1211
import torch
1312

1413
from executorch.backends.arm.test import common
@@ -124,10 +123,7 @@ def test_rsqrt_tosa_INT_a16w8(test_tensor: torch.Tensor):
124123

125124
@common.parametrize("test_tensor", Rsqrt.test_parameters)
126125
@common.XfailIfNoCorstone300
127-
@pytest.mark.xfail(
128-
reason="MLETORCH-707: AssertionError: Output 0 does not match reference output."
129-
)
130-
def test_rsqrt_16a8w_u55_INT(test_tensor: torch.Tensor):
126+
def test_rsqrt_16a8w_u55_INT16(test_tensor: torch.Tensor):
131127
"""Test rsqrt operation with int16 I/O quantization for U55"""
132128
# Use wider tolerances for int16 I/O quantization on U55
133129
pipeline = EthosU55PipelineINT[input_t1](

‎backends/arm/test/ops/test_sigmoid.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from typing import Tuple
1010

11-
import pytest
1211
import torch
1312
from executorch.backends.arm.quantizer.arm_quantizer import (
1413
get_symmetric_a16w8_quantization_config,
@@ -312,10 +311,7 @@ def test_sigmoid_16a8w_tosa_INT(test_data: torch.Tensor):
312311

313312
@common.parametrize("test_data", test_data_suite)
314313
@common.XfailIfNoCorstone300
315-
@pytest.mark.xfail(
316-
reason="MLETORCH-707: AssertionError: Output 0 does not match reference output."
317-
)
318-
def test_sigmoid_16a8w_u55_INT(test_data: torch.Tensor):
314+
def test_sigmoid_16a8w_u55_INT16(test_data: torch.Tensor):
319315
"""Test sigmoid operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)"""
320316
per_channel_quantization = False
321317

‎backends/arm/test/ops/test_tanh.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from typing import Tuple
88

9-
import pytest
109
import torch
1110

1211
from executorch.backends.arm.test import common
@@ -132,10 +131,7 @@ def test_tanh_16a8w_tosa_INT(test_data: torch.Tensor):
132131

133132
@common.parametrize("test_data", test_data_suite)
134133
@common.XfailIfNoCorstone300
135-
@pytest.mark.xfail(
136-
reason="MLETORCH-707: AssertionError: Output 0 does not match reference output."
137-
)
138-
def test_tanh_16a8w_u55_INT(test_data: torch.Tensor):
134+
def test_tanh_16a8w_u55_INT16(test_data: torch.Tensor):
139135
"""Test tanh operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)"""
140136
per_channel_quantization = False
141137

‎backends/arm/test/ops/test_var.py‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,6 @@ class VarDim(torch.nn.Module):
8787
),
8888
}
8989

90-
test_parameters_u55_xfails = {
91-
"var_3d_dim_neg_2_keep_dim_unbiased": lambda: (
92-
torch.rand(1, 50, 10),
93-
-2,
94-
True,
95-
False,
96-
),
97-
"var_3d_dim_neg_1_keep_dim_biased": lambda: (
98-
torch.rand(1, 50, 10, 20),
99-
-1,
100-
True,
101-
True,
102-
),
103-
}
104-
10590
def __init__(self, dim: int = -1, keepdim: bool = True, unbiased: bool = False):
10691
super().__init__()
10792
self.dim = dim
@@ -352,16 +337,9 @@ def test_var_dim_tosa_INT_correction(test_data: Tuple):
352337
pipeline.run()
353338

354339

355-
# TODO: Xfail "var_3d_dims_keep_dim_0_correction" until the Ethos-U Vela compiler ships commit
356-
# 642f7517d3a6bd053032e1942822f6e38ccd546f. That patch fixes the bug that causes the test to fail.
357340
@common.parametrize(
358341
"test_data",
359342
VarCorrection.test_parameters,
360-
xfails={
361-
"var_3d_dims_keep_dim_0_correction": (
362-
"Blocked by Vela commit 642f7517d3a6bd053032e1942822f6e38ccd546f"
363-
),
364-
},
365343
)
366344
@common.XfailIfNoCorstone300
367345
def test_var_dim_u55_INT_correction(test_data: Tuple):

0 commit comments

Comments
 (0)