Skip to content

Commit ec90735

Browse files
committed
Update review comments
1 parent 25dfa11 commit ec90735

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2024-2025 Arm Limited and/or its affiliates.
2+
# Copyright 2024 Arm Limited and/or its affiliates.
33
#
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
@@ -9,5 +9,3 @@
99
git config --global user.email "[email protected]"
1010
git config --global user.name "Github Executorch"
1111
bash examples/arm/setup.sh --i-agree-to-the-contained-eula
12-
13-
./examples/models/llama3_2_vision/install_requirements.sh

backends/arm/operators/op_slice.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def define_node(
3333
) -> None:
3434

3535
# See slice_copy_support.py
36-
assert len(inputs) == 4 or (len(inputs) == 5 and inputs[4].number == 1)
36+
if not (len(inputs) == 4 or (len(inputs) == 5 and inputs[4].number == 1)):
37+
raise ValueError("Unsupported combination of inputs")
3738

3839
# aten.slice_copy supports slicing in 1d at a time.
3940
# The arguments are the actual input, dimension of slicing, start index, end index and optinal step or stride.

backends/arm/test/models/test_llama.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
get_llama_model,
2121
)
2222

23-
from executorch.exir import EdgeCompileConfig
2423

2524
# Add project dir to sys path to workaround importlib.import_module() conditions in model_factory.py
2625
this_files_dir = os.path.dirname(os.path.abspath(__file__))
@@ -38,11 +37,6 @@ class TestLlama(unittest.TestCase):
3837
Example: --llama_inputs stories110M/stories110M.pt stories110M/params.json
3938
"""
4039

41-
_edge_compile_config: EdgeCompileConfig = EdgeCompileConfig(
42-
_check_ir_validity=False,
43-
_skip_dim_order=True, # TODO(T182928844): Delegate dim order op to backend.
44-
)
45-
4640
def prepare_model(self):
4741

4842
checkpoint = None
@@ -117,12 +111,10 @@ def test_llama_tosa_MI(self):
117111
constant_methods=llama_meta,
118112
)
119113
.export()
120-
.to_edge_transform_and_lower(
121-
edge_compile_config=self._edge_compile_config
122-
)
114+
.to_edge_transform_and_lower()
123115
.check_count({"torch.ops.higher_order.executorch_call_delegate": 14})
124116
.to_executorch()
125117
.run_method_and_compare_outputs(
126-
inputs=llama_inputs, atol=1.8, rtol=0.01
118+
inputs=llama_inputs, atol=1.8, rtol=0.01 # TODO: decrease tolerance
127119
)
128120
)

backends/arm/test/test_arm_baremetal.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fi
3737
TEST_SUITE_NAME="$(basename "$0") ${TEST_SUITE}"
3838

3939
all() { # Run all tests
40-
# This will list all lines in this file that is starting with test_ remove () { and add this script name in
40+
# This will list all lines in this file that is starting with test_ remove () { and add this script name in
4141
# front of it and execute it in a sub shell
4242
# e.g. from this file:
4343
#
@@ -62,6 +62,9 @@ all() { # Run all tests
6262

6363
test_pytest() { # Test ops and other things
6464
echo "${TEST_SUITE_NAME}: Run pytest"
65+
66+
./examples/models/llama3_2_vision/install_requirements.sh
67+
6568
cd "${et_root_dir}"
6669
source examples/arm/ethos-u-scratch/setup_path.sh
6770
backends/arm/scripts/build_quantized_ops_aot_lib.sh
@@ -74,6 +77,7 @@ test_pytest() { # Test ops and other things
7477
test_pytest_ethosu_fvp() { # Same as test_pytest but also sometime verify using Corstone FVP
7578
echo "${TEST_SUITE_NAME}: Run pytest with fvp"
7679

80+
./examples/models/llama3_2_vision/install_requirements.sh
7781
source examples/arm/ethos-u-scratch/setup_path.sh
7882

7983
# Prepare Corstone-3x0 FVP for pytest
@@ -107,7 +111,7 @@ test_run_ethosu_fvp() { # End to End model tests using run.sh
107111
echo "${TEST_SUITE_NAME}: PASS"
108112
}
109113

110-
test_models_ethosu_fvp() { # End to End model tests using model_test.py
114+
test_models_ethosu_fvp() { # End to End model tests using model_test.py
111115
echo "${TEST_SUITE_NAME}: Test ethos-u delegate models with test_model.py"
112116

113117
source examples/arm/ethos-u-scratch/setup_path.sh

0 commit comments

Comments
 (0)