@@ -69,27 +69,71 @@ all() { # Run all tests
69
69
echo " ${TEST_SUITE_NAME} : PASS"
70
70
}
71
71
72
- test_pytest () { # Test ops and other things
72
+ test_pytest_ops () { # Test ops and other things
73
73
echo " ${TEST_SUITE_NAME} : Run pytest"
74
74
75
- ./examples/models/llama3_2_vision/install_requirements.sh
75
+ # Prepare for pytest
76
+ backends/arm/scripts/build_executorch.sh
76
77
77
78
# 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
79
80
echo " ${TEST_SUITE_NAME} : PASS"
80
81
}
81
82
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
83
104
echo " ${TEST_SUITE_NAME} : Run pytest with fvp"
84
105
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
86
121
87
122
# 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
89
126
backends/arm/test/setup_testing.sh
90
127
91
128
# 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
93
137
echo " ${TEST_SUITE_NAME} : PASS"
94
138
}
95
139
@@ -113,8 +157,8 @@ test_run_ethosu_fvp() { # End to End model tests using run.sh
113
157
echo " ${TEST_SUITE_NAME} : PASS"
114
158
}
115
159
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"
118
162
119
163
# Build common libs once
120
164
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
125
169
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=mv3
126
170
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=lstm
127
171
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
128
188
129
189
# Ethos-U55
130
190
echo " ${TEST_SUITE_NAME} : Test ethos-u target Ethos-U55"
131
191
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"
132
192
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"
133
193
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"
134
194
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
+
135
204
# Ethos-U85
136
205
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
+
140
212
echo " ${TEST_SUITE_NAME} : PASS"
141
213
}
142
214
215
+
143
216
test_full_ethosu_fvp () { # All End to End model tests
144
217
echo " ${TEST_SUITE_NAME} : Test ethos-u delegate models and examples on fvp"
145
218
146
- test_models_ethosu_fvp
147
219
test_run_ethosu_fvp
220
+ test_models_tosa
221
+ test_models_ethos-u55
222
+ test_models_ethos-u85
148
223
echo " ${TEST_SUITE_NAME} : PASS"
149
224
}
150
225
0 commit comments