@@ -69,27 +69,71 @@ all() { # Run all tests
6969 echo " ${TEST_SUITE_NAME} : PASS"
7070}
7171
72- test_pytest () { # Test ops and other things
72+ test_pytest_ops () { # Test ops and other things
7373 echo " ${TEST_SUITE_NAME} : Run pytest"
7474
75- ./examples/models/llama3_2_vision/install_requirements.sh
75+ # Prepare for pytest
76+ backends/arm/scripts/build_executorch.sh
7677
7778 # Run arm baremetal pytest tests without FVP
78- pytest --verbose --color=yes --numprocesses=auto backends/arm/test/
79+ pytest --verbose --color=yes --numprocesses=auto backends/arm/test/ --ignore=backends/arm/test/models
7980 echo " ${TEST_SUITE_NAME} : PASS"
8081}
8182
82- test_pytest_ethosu_fvp () { # Same as test_pytest but also sometime verify using Corstone FVP
83+ test_pytest_models () { # Test ops and other things
84+ echo " ${TEST_SUITE_NAME} : Run pytest"
85+
86+ examples/models/llama3_2_vision/install_requirements.sh
87+
88+ # Prepare for pytest
89+ backends/arm/scripts/build_executorch.sh
90+
91+ # Run arm baremetal pytest tests without FVP
92+ pytest --verbose --color=yes --numprocesses=auto backends/arm/test/models
93+ echo " ${TEST_SUITE_NAME} : PASS"
94+ }
95+
96+ test_pytest () { # Test ops and other things
97+ echo " ${TEST_SUITE_NAME} : Run pytest"
98+ test_pytest_ops
99+ test_pytest_models
100+ echo " ${TEST_SUITE_NAME} : PASS"
101+ }
102+
103+ test_pytest_ops_ethosu_fvp () { # Same as test_pytest but also sometime verify using Corstone FVP
83104 echo " ${TEST_SUITE_NAME} : Run pytest with fvp"
84105
85- ./examples/models/llama3_2_vision/install_requirements.sh
106+ # Prepare Corstone-3x0 FVP for pytest
107+ backends/arm/scripts/build_executorch.sh
108+ backends/arm/scripts/build_portable_kernels.sh
109+ # Build semihosting version of the runner used by pytest testing when using --arm_run_corstoneFVP
110+ backends/arm/test/setup_testing.sh
111+
112+ # Run arm baremetal pytest tests with FVP
113+ pytest --verbose --color=yes --numprocesses=auto backends/arm/test/ --ignore=backends/arm/test/models --arm_run_corstoneFVP
114+ echo " ${TEST_SUITE_NAME} : PASS"
115+ }
116+
117+ test_pytest_models_ethosu_fvp () { # Same as test_pytest but also sometime verify using Corstone FVP
118+ echo " ${TEST_SUITE_NAME} : Run pytest with fvp"
119+
120+ examples/models/llama3_2_vision/install_requirements.sh
86121
87122 # Prepare Corstone-3x0 FVP for pytest
88- examples/arm/run.sh --model_name=add --build_only
123+ backends/arm/scripts/build_executorch.sh
124+ backends/arm/scripts/build_portable_kernels.sh
125+ # Build semihosting version of the runner used by pytest testing when using --arm_run_corstoneFVP
89126 backends/arm/test/setup_testing.sh
90127
91128 # Run arm baremetal pytest tests with FVP
92- pytest --verbose --color=yes --numprocesses=auto backends/arm/test/ --arm_run_corstoneFVP
129+ pytest --verbose --color=yes --numprocesses=auto backends/arm/test/models --arm_run_corstoneFVP
130+ echo " ${TEST_SUITE_NAME} : PASS"
131+ }
132+
133+ test_pytest_ethosu_fvp () { # Same as test_pytest but also sometime verify using Corstone FVP
134+ echo " ${TEST_SUITE_NAME} : Run pytest with fvp"
135+ test_pytest_ops_ethosu_fvp
136+ test_pytest_models_ethosu_fvp
93137 echo " ${TEST_SUITE_NAME} : PASS"
94138}
95139
@@ -113,8 +157,8 @@ test_run_ethosu_fvp() { # End to End model tests using run.sh
113157 echo " ${TEST_SUITE_NAME} : PASS"
114158 }
115159
116- test_models_ethosu_fvp () { # End to End model tests using model_test.py
117- echo " ${TEST_SUITE_NAME} : Test ethos-u delegate models with test_model.py"
160+ test_models_tosa () { # End to End model tests using model_test.py
161+ echo " ${TEST_SUITE_NAME} : Test TOSA delegated models with test_model.py"
118162
119163 # Build common libs once
120164 python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --build_libs
@@ -125,26 +169,57 @@ test_models_ethosu_fvp() { # End to End model tests using model_test.py
125169 python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=mv3
126170 python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=lstm
127171 python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=edsr
172+ # python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=emformer_transcribe # Takes long time to run
173+ # python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=emformer_join # Takes long time to run
174+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=w2l
175+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=ic3
176+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=ic4
177+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=resnet18
178+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=resnet50
179+
180+ echo " ${TEST_SUITE_NAME} : PASS"
181+ }
182+
183+ test_models_ethos-u55 () { # End to End model tests using model_test.py
184+ echo " ${TEST_SUITE_NAME} : Test Ethos-U55 delegated models with test_model.py"
185+
186+ # Build common libs once
187+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --build_libs
128188
129189 # Ethos-U55
130190 echo " ${TEST_SUITE_NAME} : Test ethos-u target Ethos-U55"
131191 python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u55-128 --model=mv2 --extra_flags=" -DET_ATOL=2.00 -DET_RTOL=2.00"
132192 python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u55-64 --model=mv3 --extra_flags=" -DET_ATOL=5.00 -DET_RTOL=5.00"
133193 python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u55-256 --model=lstm --extra_flags=" -DET_ATOL=0.03 -DET_RTOL=0.03"
134194
195+ echo " ${TEST_SUITE_NAME} : PASS"
196+ }
197+
198+ test_models_ethos-u85 () { # End to End model tests using model_test.py
199+ echo " ${TEST_SUITE_NAME} : Test Ethos-U85 delegated models with test_model.py"
200+
201+ # Build common libs once
202+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --build_libs
203+
135204 # Ethos-U85
136205 echo " ${TEST_SUITE_NAME} : Test ethos-u target Ethos-U85"
137- python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u85-256 --model=mv2 --extra_flags=" -DET_ATOL=2.00 -DET_RTOL=2.00"
138- python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u85-1024 --model=mv3 --extra_flags=" -DET_ATOL=5.00 -DET_RTOL=5.00"
139- python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u85-128 --model=lstm --extra_flags=" -DET_ATOL=0.03 -DET_RTOL=0.03"
206+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u85-256 --model=mv2 --extra_flags=" -DET_ATOL=2.00 -DET_RTOL=2.00"
207+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u85-512 --model=mv3 --extra_flags=" -DET_ATOL=5.00 -DET_RTOL=5.00"
208+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u85-128 --model=lstm --extra_flags=" -DET_ATOL=0.03 -DET_RTOL=0.03"
209+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u85-128 --model=w2l --extra_flags=" -DET_ATOL=0.01 -DET_RTOL=0.01"
210+ python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=ethos-u85-256 --model=ic4 --extra_flags=" -DET_ATOL=0.8 -DET_RTOL=0.8" --timeout=2400
211+
140212 echo " ${TEST_SUITE_NAME} : PASS"
141213 }
142214
215+
143216test_full_ethosu_fvp () { # All End to End model tests
144217 echo " ${TEST_SUITE_NAME} : Test ethos-u delegate models and examples on fvp"
145218
146- test_models_ethosu_fvp
147219 test_run_ethosu_fvp
220+ test_models_tosa
221+ test_models_ethos-u55
222+ test_models_ethos-u85
148223 echo " ${TEST_SUITE_NAME} : PASS"
149224 }
150225
0 commit comments