You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arm backend: Wire examples/arm/run.sh for cortex-m55+int8 e2e testing (#19073)
### Summary
Adds cortex-m55+int8 target support to the public Arm runner scripts so
the bundled-IO FVP test flow is reachable from examples/arm/run.sh
instead of being inlined in .ci/scripts/test_cortex_m_e2e.sh.
backends/arm/scripts/run_fvp.sh now accepts --bundle=<bpte> and, when
the target matches cortex-m, launches the Corstone-300 FVP with
semihosting enabled and the cortex-m test runner as the loaded ELF, then
greps the FVP log for the Test_result: PASS/FAIL line emitted by the
bundled-IO runner. examples/arm/run.sh detects cortex-m targets,
force-disables --delegate (the cortex-m backend is an operator library,
not a delegate), invokes backends/cortex_m/test/build_test_runner.sh for
the shared semihosting runner, and delegates the FVP launch to
run_fvp.sh.
.ci/scripts/test_cortex_m_e2e.sh becomes a thin wrapper over run.sh so
CI and user-facing docs exercise the same code path. The redundant
build_test_runner.sh invocation in trunk.yml is removed since run.sh now
calls it internally.
This change was authored with Claude (claude-opus-4-7[1m]).
### Test plan
```
# Step 1 — Primary e2e via run.sh (expect Test_result: PASS and exit 0):
examples/arm/run.sh --model_name=add --target=cortex-m55+int8 --quantize --bundleio
# Step 2 — Second model (mv2):
examples/arm/run.sh --model_name=mv2 --target=cortex-m55+int8 --quantize --bundleio
# Step 3 — CI-wrapper parity (test_cortex_m_e2e.sh):
bash .ci/scripts/test_cortex_m_e2e.sh add
# Step 4 — Negative path (missing --bundleio): Expect exit 1 with error
examples/arm/run.sh --model_name=add --target=cortex-m55+int8 --quantize
# Step 5 — Regression guard for the edited run_fvp.sh ethos-u55 path (expect model to run on FVP and exit 0):
examples/arm/run.sh --model_name=add --target=ethos-u55-128 --quantize
```
cc @digantdesai@freddan80@per@zingo@oscarandersson8218@mansnils@Sebastian-Larsson@robell
Copy file name to clipboardExpand all lines: backends/arm/scripts/run_fvp.sh
+50-3Lines changed: 50 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ _setup_msg="please refer to ${et_root_dir}/examples/arm/setup.sh to properly ins
19
19
20
20
elf_file=""
21
21
data_file=""
22
+
bundle_file=""
22
23
target="ethos-u55-128"
23
24
timeout="600"
24
25
etrecord_file=""
@@ -29,6 +30,7 @@ help() {
29
30
echo"Options:"
30
31
echo" --elf=<ELF_FILE> elf file to run"
31
32
echo" --data=<FILE>@<ADDRESS> Place a file in memory at this address, useful to emulate a PTE flashed into memory instead as part of the code."
33
+
echo" --bundle=<BPTE_FILE> Bundled program (.bpte) to load via semihosting. Required for cortex-m targets; the FVP launches a semihosting executor_runner that reads the bundle from the host filesystem and checks the embedded reference outputs."
32
34
echo" --target=<TARGET> Target to build and run for Default: ${target}"
33
35
echo" --timeout=<TIME_IN_SEC> Maximum target runtime, used to detect hanging, might need to be higer on large models Default: ${timeout}"
34
36
echo" --etrecord=<FILE> If ETDump is used you can supply a ETRecord file matching the PTE"
@@ -41,6 +43,7 @@ for arg in "$@"; do
41
43
-h|--help) help ;;
42
44
--elf=*) elf_file="${arg#*=}";;
43
45
--data=*) data_file="--data ${arg#*=}";;
46
+
--bundle=*) bundle_file="${arg#*=}";;
44
47
--target=*) target="${arg#*=}";;
45
48
--timeout=*) timeout="${arg#*=}";;
46
49
--etrecord=*) etrecord_file="${arg#*=}";;
@@ -52,7 +55,9 @@ done
52
55
53
56
elf_file=$(realpath ${elf_file})
54
57
55
-
if [[ ${target}==*"ethos-u55"* ]];then
58
+
# cortex-m55 is the only Cortex-M CPU on the Corstone-300 board today;
59
+
# cortex-m85 lives on Corstone-320, so it falls through to the SSE-320 FVP.
60
+
if [[ ${target}==*"ethos-u55"*||${target}== cortex-m55* ]];then
This drives `aot_arm_compiler --bundleio`, invokes `build_test_runner.sh`, and launches the Corstone-300 FVP via `backends/arm/scripts/run_fvp.sh`.
28
+
23
29
## Supported operators
24
30
Refer to `backends/cortex_m/test/ops` for currently supported accelerated ops/dtypes. Additionally, the quantizer targets pure "data-movement ops" such as data copies, slicing and concatenations to use quantized dtypes using the portable-kernels operator library.
25
31
In general however, operators not supported by Cortex-M are kept in `fp32` using non-accelerated portable-kernels. It is recommended to analyze the graph after lowering to understand how much of the graph has been accelerated.
0 commit comments