Skip to content

Commit dbcf6ac

Browse files
authored
Arm backend: Consolidate CI testing (pytorch#19696)
Testing is done via test_arm_backed.sh instead of different scripts. OOBT tests in CI is part of the test matrix instead of separate job descriptions doing the same thing. GitHub job names all start with test-arm-backend making it easier know what jobs belongs to and to filter in the HUD. ### Test plan Github testing --------- Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com>
1 parent d80a82c commit dbcf6ac

6 files changed

Lines changed: 61 additions & 44 deletions

File tree

.github/workflows/pull.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,8 @@ jobs:
714714
# Build QNN backend with Buck
715715
buck2 build //backends/qualcomm/...
716716
717-
unittest-arm-backend-with-no-deps:
718-
name: unittest-arm-backend-with-no-deps
717+
test-arm-backend-no-driver:
718+
name: test-arm-backend-no-driver
719719
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
720720
permissions:
721721
id-token: write

.github/workflows/trunk.yml

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ jobs:
234234
- test_arm_backend: test_run_ethos_u85
235235
- test_arm_backend: test_smaller_stories_llama
236236
- test_arm_backend: test_memory_allocation
237+
- test_arm_backend: test_ootb_tests_ethos_u
238+
- test_arm_backend: test_ootb_tests_tosa
239+
- test_arm_backend: test_deit_e2e_ethos_u
237240
fail-fast: false
238241
with:
239242
runner: linux.2xlarge.memory
@@ -275,6 +278,7 @@ jobs:
275278
matrix:
276279
include:
277280
- test_arm_backend: test_pytest_ops_vkml
281+
- test_arm_backend: test_ootb_tests_vgf
278282
fail-fast: false
279283
with:
280284
runner: linux.2xlarge.memory
@@ -304,45 +308,6 @@ jobs:
304308
305309
backends/arm/test/test_arm_backend.sh "${ARM_TEST}"
306310
307-
test-arm-ootb-linux:
308-
name: test-arm-ootb-linux
309-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
310-
permissions:
311-
id-token: write
312-
contents: read
313-
strategy:
314-
matrix:
315-
include:
316-
- test_arm_ootb: run_ootb_tests_ethos_u
317-
- test_arm_ootb: run_ootb_tests_tosa
318-
- test_arm_ootb: run_deit_e2e_ethos_u
319-
fail-fast: false
320-
with:
321-
runner: linux.2xlarge
322-
docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk
323-
submodules: 'recursive'
324-
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
325-
timeout: 90
326-
script: |
327-
# The generic Linux job chooses to use base env, not the one setup by the image
328-
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
329-
conda activate "${CONDA_ENV}"
330-
331-
# Follow the steps required before running the notebooks
332-
# Try to mirror these as closely as possible
333-
source .ci/scripts/utils.sh
334-
install_executorch "--use-pt-pinned-commit"
335-
336-
.ci/scripts/setup-arm-baremetal-tools.sh
337-
source examples/arm/arm-scratch/setup_path.sh
338-
339-
# Install requirements for converting notebooks
340-
pip install notebook
341-
342-
# Run OOTB tests
343-
OOTB_TEST=${{ matrix.test_arm_ootb }}
344-
backends/arm/test/test_arm_ootb.sh $OOTB_TEST
345-
346311
test-coreml-delegate:
347312
needs: changed-files
348313
if: |

backends/arm/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ Below is an overview of some of the testing options this script provides:
252252
| `test_arm_backend.sh test_pytest_models_vkml` | Runs model unit tests for VGF specific use-cases. |
253253
| `test_arm_backend.sh test_run_vkml` | Runs end-to-end unit tests for VGF specific use-cases. |
254254
| `test_arm_backend.sh test_model_smollm2_135M` | Runs some models with Corstone FVP. |
255+
| `test_arm_backend.sh test_ootb_tests_ethos_u` | Runs out-of-the-box tests for Ethos-U. |
256+
| `test_arm_backend.sh test_ootb_tests_tosa` | Runs out-of-the-box tests for TOSA. |
257+
| `test_arm_backend.sh test_ootb_tests_vgf` | Runs out-of-the-box tests for VGF. |
258+
| `test_arm_backend.sh test_deit_e2e_ethos_u` | Runs DEiT end-to-end tests on Ethos-U. |
255259
| `test_arm_backend.sh test_smaller_stories_llama` | Runs E2E model tests on Corstone FVP. |
256260
| `test_arm_backend.sh test_memory_allocation` | Runs memory allocation tests for Ethos-U specific targets |
257261

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright 2026 Arm Limited and/or its affiliates.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
6+
notebook
7+
nbconvert

backends/arm/test/test_arm_backend.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,33 @@ test_run_vkml() {
269269
echo "${TEST_SUITE_NAME}: PASS"
270270
}
271271

272+
# --------------------------------------
273+
# -------- Out-of-the-box tests --------
274+
# --------------------------------------
275+
test_ootb_tests_ethos_u() {
276+
echo "${TEST_SUITE_NAME}: Run out-of-the-box tests for Arm Ethos-U"
277+
backends/arm/test/test_arm_ootb.sh run_ootb_tests_ethos_u
278+
echo "${TEST_SUITE_NAME}: PASS"
279+
}
280+
281+
test_ootb_tests_tosa() {
282+
echo "${TEST_SUITE_NAME}: Run out-of-the-box tests for TOSA"
283+
backends/arm/test/test_arm_ootb.sh run_ootb_tests_tosa
284+
echo "${TEST_SUITE_NAME}: PASS"
285+
}
286+
287+
test_ootb_tests_vgf() {
288+
echo "${TEST_SUITE_NAME}: Run out-of-the-box tests for VGF"
289+
backends/arm/test/test_arm_ootb.sh run_ootb_tests_vgf
290+
echo "${TEST_SUITE_NAME}: PASS"
291+
}
292+
293+
test_deit_e2e_ethos_u() {
294+
echo "${TEST_SUITE_NAME}: Run DEiT end-to-end test for Arm Ethos-U"
295+
backends/arm/test/test_arm_ootb.sh run_deit_e2e_ethos_u
296+
echo "${TEST_SUITE_NAME}: PASS"
297+
}
298+
272299
# ------------------------------------
273300
# -------- Miscellaneous tests -------
274301
# ------------------------------------

backends/arm/test/test_arm_ootb.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
set -eo pipefail
99

10+
script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
11+
et_root_dir=$(cd "${script_dir}/../../.." && pwd)
12+
ootb_requirements="${et_root_dir}/backends/arm/requirements-arm-ootb-test.txt"
13+
14+
cd "${et_root_dir}"
15+
1016
help() {
1117
echo "Usage:"
1218
echo " $0 [TESTNAME]"
@@ -28,8 +34,17 @@ else
2834
fi
2935

3036

37+
install_ootb_test_requirements() {
38+
python3 - <<'PY' || pip install -r "${ootb_requirements}"
39+
import notebook # noqa: F401
40+
import nbconvert # noqa: F401
41+
PY
42+
}
43+
44+
3145
run_ootb_tests_ethos_u() {
3246
echo "$FUNCNAME: Running out-of-the-box tests for Arm Ethos-U"
47+
install_ootb_test_requirements
3348
jupyter nbconvert \
3449
--to notebook \
3550
--execute examples/arm/ethos_u_minimal_example.ipynb
@@ -38,6 +53,7 @@ run_ootb_tests_ethos_u() {
3853

3954
run_ootb_tests_tosa() {
4055
echo "$FUNCNAME: Running out-of-the-box tests for TOSA"
56+
install_ootb_test_requirements
4157
jupyter nbconvert \
4258
--to notebook \
4359
--execute backends/arm/scripts/TOSA_minimal_example.ipynb
@@ -46,6 +62,7 @@ run_ootb_tests_tosa() {
4662

4763
run_ootb_tests_vgf() {
4864
echo "$FUNCNAME: Running out-of-the-box tests for VGF"
65+
install_ootb_test_requirements
4966
jupyter nbconvert \
5067
--to notebook \
5168
--execute examples/arm/vgf_minimal_example.ipynb
@@ -55,9 +72,6 @@ run_ootb_tests_vgf() {
5572
run_deit_e2e_ethos_u() {
5673
echo "$FUNCNAME: Fine-tune, export, build, and run the DEiT e2e test"
5774

58-
local script_dir
59-
script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
60-
et_root_dir=$(cd "${script_dir}/../../.." && pwd)
6175
local example_dir="${et_root_dir}/examples/arm/image_classification_example_ethos_u"
6276
local work_root="${et_root_dir}/arm_test/deit_tiny_ootb_smoke"
6377
local model_dir="${work_root}/deit_tiny_finetuned"

0 commit comments

Comments
 (0)