Skip to content

Commit f3002f6

Browse files
authored
Arm run.sh fix with working unit tests (#6056)
* Arm run.sh fixes (#6043) Fixes for vela compiler version, codegen flags and non-semihosted error behaviour * enable passing tests and remove broken split test. Signed-off-by: Rob Elliott <[email protected]> --------- Signed-off-by: Rob Elliott <[email protected]>
1 parent af1e067 commit f3002f6

File tree

8 files changed

+9
-13
lines changed

8 files changed

+9
-13
lines changed

backends/arm/test/ops/test_cat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ def test_cat_tosa_BI(self, operands: tuple[torch.Tensor, ...], dim: int):
127127

128128
# TODO: Remove @unittest.expectedFailure when this issue is fixed in Regor
129129
@parameterized.expand(Cat.test_parameters)
130-
@unittest.expectedFailure
131130
def test_cat_u55_BI(self, operands: tuple[torch.Tensor, ...], dim: int):
132131
test_data = (operands, dim)
133132
self._test_cat_u55_BI_pipeline(self.Cat(), test_data)

backends/arm/test/ops/test_expand.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,5 @@ def test_expand_tosa_BI(self, test_input, multiples):
104104

105105
# Expected failure since tosa.TILE is unsupported by Vela.
106106
@parameterized.expand(Expand.test_parameters)
107-
@unittest.expectedFailure
108107
def test_expand_u55_BI(self, test_input, multiples):
109108
self._test_expand_tosa_u55_pipeline(self.Expand(), (test_input, multiples))

backends/arm/test/ops/test_repeat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,5 @@ def test_repeat_tosa_BI(self, test_input, multiples):
105105

106106
# Expected failure since tosa.TILE is unsupported by Vela.
107107
@parameterized.expand(Repeat.test_parameters)
108-
@unittest.expectedFailure
109108
def test_repeat_u55_BI(self, test_input, multiples):
110109
self._test_repeat_tosa_u55_pipeline(self.Repeat(), (test_input, multiples))

backends/arm/test/ops/test_slice.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,5 @@ def test_slice_nhwc_tosa_BI(self, test_tensor: torch.Tensor):
111111
# Fails during Vela compilation when trying to use a Tuple as a Named tuple,
112112
# Could be Vela Issue, wait until Regor.
113113
@parameterized.expand(Slice.test_tensors)
114-
@unittest.expectedFailure
115114
def test_slice_u55_BI(self, test_tensor: torch.Tensor):
116115
self._test_slice_u55_BI_pipeline(self.Slice(), (test_tensor,))

backends/arm/test/ops/test_split.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,3 @@ def test_split_n_out_tosa_MI(self, test_data: test_data_t):
130130
@parameterized.expand(Split.test_data)
131131
def test_split_tosa_BI(self, test_data: test_data_t):
132132
self._test_split_tosa_BI_pipeline(self.Split(), test_data)
133-
134-
# Fails during Vela compilation when trying to use a Tuple as a Named tuple,
135-
# Could be Vela Issue, wait until Regor.
136-
@parameterized.expand(Split.test_data)
137-
@unittest.expectedFailure
138-
def test_split_u55_BI(self, test_data: test_data_t):
139-
self._test_split_u55_BI_pipeline(self.Split(), test_data)

examples/arm/aot_arm_compiler.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,12 @@ def forward(self, x):
214214
edge = edge.to_backend(
215215
ArmPartitioner(
216216
ArmCompileSpecBuilder()
217-
.ethosu_compile_spec("ethos-u55-128")
217+
.ethosu_compile_spec(
218+
"ethos-u55-128",
219+
system_config="Ethos_U55_High_End_Embedded",
220+
memory_mode="Shared_Sram",
221+
extra_flags="--debug-force-regor --output-format=raw",
222+
)
218223
.set_permute_memory_format(
219224
args.model_name in MODEL_NAME_TO_MODEL.keys()
220225
)

examples/arm/executor_runner/arm_executor_runner.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,12 @@ Result<BufferCleanup> prepare_input_tensors(
105105
size_t num_inputs = method_meta.num_inputs();
106106
size_t num_allocated = 0;
107107

108+
#ifdef SEMIHOSTING
108109
ET_CHECK_OR_RETURN_ERROR(
109110
input_buffers.size() > 0 && num_inputs == input_buffers.size(),
110111
InvalidArgument,
111112
"Wrong number of inputs allocated compared to method");
113+
#endif
112114

113115
void** inputs =
114116
static_cast<void**>(allocator.allocate(num_inputs * sizeof(void*)));

examples/arm/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function setup_vela() {
216216
if [[ ! -e ethos-u-vela ]]; then
217217
git clone https://review.mlplatform.org/ml/ethos-u/ethos-u-vela
218218
repo_dir="${root_dir}/ethos-u-vela"
219-
base_rev=d362f5443f67b1e6213a9d8f124edff758efac96
219+
base_rev=57ce18c89ccc6f6309333dccb24ed30dc68b571f
220220
patch_repo
221221
fi
222222
cd "${root_dir}/ethos-u-vela"

0 commit comments

Comments
 (0)