Commit 2871fcf
authored
Plumbing for Arm Example Runnner to use Zephyr Toolchain (#12078)
### Summary
Once `setup.sh` and `PATH` have been set to point to Arm Zephyr
toolchain, the `run.sh` script and its child processes must use the
specified toolchain. This change adds the plumbing needed to support
this. This change **does not** include the Zephyr binary in the
`arm_executor_runner`, but merely uses allows the runner to be built
with a different toolchain.
### Test plan
Environment setup:
```
./examples/arm/setup.sh --i-agree-to-the-contained-eula --target-toolchain zephyr
source /home/zephyruser/executorch/examples/arm/ethos-u-scratch/setup_path.sh
```
The following can be run to produce the same results as in the [Arm
Ethos-U
tutorial](https://docs.pytorch.org/executorch/main/tutorial-arm-ethos-u.html),
now utilizing the Arm Zephyr toolchain instead of the bare metal:
```
examples/arm/run.sh --toolchain=arm-zephyr-eabi-gcc --model_name=add --no_quantize --target=ethos-u55-128
```
Which still produces the following output:
```
I [executorch:arm_executor_runner.cpp:747 main()] Model executed successfully.
I [executorch:arm_executor_runner.cpp:751 main()] 1 outputs:
Output[0][0]: (int) 2
Output[0][1]: (int) 2
Output[0][2]: (int) 2
Output[0][3]: (int) 2
Output[0][4]: (int) 2
I [executorch:arm_executor_runner.cpp:874 main()] Program complete, exiting.
I [executorch:arm_executor_runner.cpp:878 main()] ♦
Info: /OSCI/SystemC: Simulation stopped by user.
[warning ][main@0][3440 ns] Simulation stopped by user
[backends/arm/scripts/run_fvp.sh] Simulation complete, 0
Checking for problems in log:
No problems found!
+ set +x
```1 parent d533a87 commit 2871fcf
File tree
4 files changed
+64
-17
lines changed- backends/arm/scripts
- examples/arm
4 files changed
+64
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
71 | 84 | | |
72 | 85 | | |
73 | 86 | | |
| |||
116 | 129 | | |
117 | 130 | | |
118 | 131 | | |
119 | | - | |
| 132 | + | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
| |||
130 | 143 | | |
131 | 144 | | |
132 | 145 | | |
133 | | - | |
134 | 146 | | |
135 | 147 | | |
136 | 148 | | |
| |||
152 | 164 | | |
153 | 165 | | |
154 | 166 | | |
155 | | - | |
| 167 | + | |
156 | 168 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
48 | 60 | | |
49 | 61 | | |
50 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
98 | 109 | | |
99 | 110 | | |
100 | 111 | | |
| |||
134 | 145 | | |
135 | 146 | | |
136 | 147 | | |
137 | | - | |
138 | | - | |
| 148 | + | |
| 149 | + | |
139 | 150 | | |
140 | 151 | | |
141 | 152 | | |
| |||
180 | 191 | | |
181 | 192 | | |
182 | 193 | | |
183 | | - | |
184 | | - | |
| 194 | + | |
| 195 | + | |
185 | 196 | | |
186 | 197 | | |
187 | 198 | | |
| |||
265 | 276 | | |
266 | 277 | | |
267 | 278 | | |
268 | | - | |
| 279 | + | |
269 | 280 | | |
270 | 281 | | |
271 | 282 | | |
| |||
0 commit comments