Commit 8b2d288
authored
Arm backend: Add CMSIS Pack all-ops test and fix pack build infrastructure (#21709)
Reworks the CMSIS Pack build infrastructure for the 1.4 operator surface
and adds a consumer-side all-ops test that builds and runs every
operator the pack ships.
### Review order
Start with `scripts/`. `generate_register_all_kernels.py` is rewritten
to emit registrations from the NativeFunctions yaml rather than the
previous hand-maintained mapping, and operator discovery moves into the
new `op_guards.py` shared by the registration and component generators.
`copy_sources.sh` and `test/validate_pack.py` then hard-fail on a pack
missing the build-generated headers rather than producing a quietly
incomplete archive. `templates/PyTorch.ExecuTorch.pdsc.tpl` gains the
Extension Tensor component and per-op Cortex-M components.
Then `test/all_ops/`, which is the bulk of the diff and independent of
the above. `op_recipes.py` defines one recipe per operator;
`generate_test_models.py` turns each into a self-contained `.pte`
carrying its inputs, expected outputs and tolerances as constant
methods; `gen_cproject.py` generates a consumer project selecting every
operator component; `main.cpp` runs each model on target and prints a
per-op cycle table, a memory high-water report and a `SUMMARY
<pass>/<total>` line. `run.sh` drives the flow. Host-side unit tests
accompany each generator.
Coverage is two-tier, documented in `SKIPPED_OPS.md`: every operator is
build/link covered with no exemptions, and those not value-checked on
device each carry a machine-enforced reason (nondeterministic RNG,
uninitialized `empty`, data-dependent output shape), so a silent
coverage gap fails the test suite.
The last commit is a one-line, independent fix: the generated PDSC
`<url>` omitted the tag's leading `v`, so `releases/download/1.4.0/`
404s where `releases/download/v1.4.0/` serves the asset.
### Validation
Built from the 1.4.0 release sources with these scripts, the resulting
pack validates structurally, and a consumer project selecting all 198
operator components compiles and links clean (368 compile units, `1
succeeded, 0 failed`) for Corstone-315 with arm-none-eabi-gcc 14.3.1 and
CMSIS-Toolbox 2.14.1. Booting that image on `FVP_Corstone_SSE-315`
gives:
```
Test_result: SUMMARY 167/167 PASS
MemReport: method=84292 temp=0 meta=88 metatmp=0
```
The test targets two Cortex-M85 MPS4 subsystems: Corstone-315 (SSE-315)
for the CPU path and Corstone-320 (SSE-320) with an Ethos-U85 for a
delegated variant.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils
@Sebastian-Larsson @robell @rascani
---------
Signed-off-by: Matthias Hertel <matthias.hertel@arm.com>1 parent 076774b commit 8b2d288
33 files changed
Lines changed: 4941 additions & 1166 deletions
File tree
- .github/workflows
- backends/arm/cmsis_pack
- contributions/add/Documentation
- scripts
- templates
- test
- all_ops
- smoke
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
120 | | - | |
121 | | - | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
| |||
150 | 162 | | |
151 | 163 | | |
152 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
153 | 174 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
160 | 183 | | |
| 184 | + | |
| 185 | + | |
161 | 186 | | |
162 | 187 | | |
163 | 188 | | |
| |||
0 commit comments