Repository navigation
175 lines (153 loc) · 6.91 KB
/
Copy path_arm-trunk.yml
File metadata and controls
175 lines (153 loc) · 6.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Arm trunk suite
on:
workflow_call:
jobs:
docker-image:
name: Resolve CI docker image
uses: ./.github/workflows/_docker-image.yml
test-arm-backend-zephyr:
needs: docker-image
name: test-arm-backend-zephyr
uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main
permissions:
id-token: write
contents: read
strategy:
matrix:
include:
- { readme: zephyr/samples/hello-executorch/README.md, target: ethos-u55 }
- { readme: zephyr/samples/hello-executorch/README.md, target: cortex-m55 }
- { readme: zephyr/samples/hello-executorch/README.md, target: ethos-u85 }
- { readme: zephyr/samples/mv2-ethosu/README.md, target: ethos-u55 }
- { readme: zephyr/samples/mv2-ethosu/README.md, target: ethos-u85 }
fail-fast: false
with:
runner: mt-l-x86iavx512-8-64
docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-zephyr-sdk-${{ needs.docker-image.outputs.ci-docker-hash }}
submodules: 'recursive'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 120
script: |
#!/bin/bash
set -euo pipefail
# Zephyr requires a Python 3.12 venv; keep this independent of the
# base image's default ExecuTorch Python environment.
python3.12 -m venv zephyr_test_venv
source zephyr_test_venv/bin/activate
# The Zephyr SDK host tools carry their own runtime. The CI Docker image
# sets a global LD_LIBRARY_PATH for other jobs, which can make SDK tools
# pick host libs.
unset LD_LIBRARY_PATH
# Test zephyr backend
.ci/scripts/test_zephyr.sh \
--targets "${TARGET_LIST:-${{ matrix.target }}}" \
--zephyr-samples-readme-path "${{ matrix.readme }}"
test-arm-backend-ethos-u:
needs: docker-image
name: test-arm-backend-ethos-u
uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main
permissions:
id-token: write
contents: read
strategy:
matrix:
include:
- test_arm_backend: test_pytest_ops_ethos_u55
- test_arm_backend: test_pytest_models_ethos_u55
- test_arm_backend: test_run_ethos_u55
- test_arm_backend: test_minimal_classic_ml_ethos_u55
- test_arm_backend: test_pytest_ops_ethos_u85
- test_arm_backend: test_pytest_models_ethos_u85
- test_arm_backend: test_run_ethos_u85
- test_arm_backend: test_run_ethos_u85_clang
arm_setup_args: --target-toolchain clang
- test_arm_backend: test_smaller_stories_llama_tosa
- test_arm_backend: test_model_smollm2_135M_ethos_u85
- test_arm_backend: test_runtime_ethos_u
- test_arm_backend: test_ootb_tests_ethos_u
- test_arm_backend: test_ootb_tests_tosa
- test_arm_backend: test_deit_e2e_ethos_u
- test_arm_backend: test_person_detection_e2e_cortex_m
fail-fast: false
with:
runner: mt-l-x86iavx512-8-64
docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-arm-sdk-${{ needs.docker-image.outputs.ci-docker-hash }}
submodules: 'recursive'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 120
script: |
# The generic Linux job chooses to use base env, not the one setup by the image
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
conda activate "${CONDA_ENV}"
source .ci/scripts/utils.sh
install_executorch "--use-pt-pinned-commit"
ARM_SETUP_ARGS=(${{ matrix.arm_setup_args }})
.ci/scripts/setup-arm-baremetal-tools.sh "${ARM_SETUP_ARGS[@]}"
# Increase number of files user can monitor to bypass buck failures.
# Hopefully this is high enough for this setup.
# Node-level, so an unprivileged pod cannot change it.
sudo sysctl fs.inotify.max_user_watches=1048576 2>/dev/null || true
ARM_TEST=${{ matrix.test_arm_backend }}
# Output test report on pytest runs so that github can surface failing tests.
if [[ -n "${RUNNER_TEST_RESULTS_DIR:-}" ]]; then
export PYTEST_ADDOPTS="--junit-xml=${RUNNER_TEST_RESULTS_DIR}/${ARM_TEST}.xml ${PYTEST_ADDOPTS:-}"
fi
# Test test_arm_backend.sh with test
backends/arm/test/test_arm_backend.sh "${ARM_TEST}"
test-arm-backend-vkml:
needs: docker-image
name: test-arm-backend-vkml
uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main
permissions:
id-token: write
contents: read
strategy:
matrix:
include:
- test_arm_backend: test_pytest_ops_vkml
- test_arm_backend: test_pytest_models_vkml
- test_arm_backend: test_run_vkml
- test_arm_backend: test_ootb_tests_vgf
- test_arm_backend: test_runtime_vgf
- test_arm_backend: test_smaller_stories_llama_vkml
fail-fast: false
with:
runner: mt-l-x86iavx512-8-64
docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-24.04-arm-sdk-${{ needs.docker-image.outputs.ci-docker-hash }}
submodules: 'recursive'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 120
script: |
# The generic Linux job chooses to use base env, not the one setup by the image
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
conda activate "${CONDA_ENV}"
source .ci/scripts/utils.sh
install_executorch "--use-pt-pinned-commit"
.ci/scripts/setup-arm-baremetal-tools.sh --disable-ethos-u-deps --enable-mlsdk-deps --install-mlsdk-deps-with-pip
# Increase number of files user can monitor to bypass buck failures.
# Hopefully this is high enough for this setup.
# Node-level, so an unprivileged pod cannot change it.
sudo sysctl fs.inotify.max_user_watches=1048576 2>/dev/null || true
ARM_TEST=${{ matrix.test_arm_backend }}
# Output test report on pytest runs so that github can surface failing tests.
if [[ -n "${RUNNER_TEST_RESULTS_DIR:-}" ]]; then
export PYTEST_ADDOPTS="--junit-xml=${RUNNER_TEST_RESULTS_DIR}/${ARM_TEST}.xml ${PYTEST_ADDOPTS:-}"
fi
backends/arm/test/test_arm_backend.sh "${ARM_TEST}"
test-cortex-m-e2e:
name: test-cortex-m-e2e
permissions:
id-token: write
contents: read
uses: ./.github/workflows/_test_cortex_m_e2e.yml
with:
models: '["mv2", "mv3"]'
targets: '["cortex-m55", "cortex-m7", "cortex-m0plus"]'
test-cortex-m-ops:
name: test-cortex-m-ops
permissions:
id-token: write
contents: read
uses: ./.github/workflows/_test_cortex_m_ops.yml
with:
targets: '["cortex-m7", "cortex-m0plus"]'