Skip to content

Commit 05c3b59

Browse files
zingoDannyYuyang-quic
authored andcommitted
Arm backend: Add info about setup_path.sh and arm-none-eabi-gcc
Describe that you need to run setup_path.sh when starting a new shell and that you might want to make sure the right arm-none-eabi-gcc is used. Signed-off-by: Zingo Andersen <[email protected]> Change-Id: Ibb9c9561005e8f6b78d7ff675e55d1b720e5a5a5
1 parent 8cb3dae commit 05c3b59

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

docs/source/backends-arm-ethos-u.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,25 @@ At the end of the setup, if everything goes well, your top level devlopement dir
114114
└── setup_path.sh
115115
```
116116

117+
### Notes:
118+
119+
The `setup.sh` script has generated a `setup_path.sh` script that you need to source everytime you restart you shell.
120+
121+
e.g. run
122+
`source executorch/examples/arm/ethos-u-scratch/setup_path.sh`
123+
124+
As `setup.sh` will download and setup the needed Arm toolchain make sure it is used by calling
125+
126+
`which arm-none-eabi-gcc`
127+
128+
It should show `arm-none-eabi-gcc` in the `executorch` project and not anything in `/usr/bin` something like:
129+
130+
`<EXECUTORCH_ROOT>/examples/arm/ethos-u-scratch/arm-gnu-toolchain-13.3.rel1-aarch64-arm-none-eabi/bin/arm-none-eabi-gcc`
131+
or
132+
`<EXECUTORCH_ROOT>/examples/arm/ethos-u-scratch/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc`
133+
134+
If not you might need to uninstall `arm-none-eabi-gcc` or make sure its picked after the one in the project in your $PATH env varable.
135+
117136
## Convert the PyTorch Model to the `.pte` File
118137

119138
`.pte` is a binary file produced by ExecuTorch Ahead-of-Time (AoT) pipeline by taking in a PyTorch Model (a torch.nn.Module), exporting it, running a variety of passes, and finally serializing it to a `.pte` file format. This binary file is typically consumed by the ExecuTorch Runtime. This [document](https://github.com/pytorch/executorch/blob/main/docs/source/getting-started-architecture.md) goes in much more depth about the ExecuTorch software stack for both AoT as well as Runtime.

examples/arm/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,19 @@ build artifacts. If supplied, the same argument must be supplied to both the scr
2121
To run these scripts. On a Linux system, in a terminal, with a working internet connection,
2222
```
2323
# Step [1] - setup necessary tools
24-
$ ./setup.sh --i-agree-to-the-contained-eula [optional-scratch-dir]
24+
$ cd <EXECUTORCH-ROOT-FOLDER>
25+
$ executorch/examples/arm/setup.sh --i-agree-to-the-contained-eula [optional-scratch-dir]
2526
26-
# Step [2] - build + run ExecuTorch and executor_runner baremetal application
27+
# Step [2] - Setup Patch to tools, The `setup.sh` script has generated a script that you need to source everytime you restart you shell.
28+
$ source executorch/examples/arm/ethos-u-scratch/setup_path.sh
29+
30+
# Step [3] - build + run ExecuTorch and executor_runner baremetal application
2731
# suited for Corstone FVP's to run a simple PyTorch model.
28-
$ ./run.sh [--scratch-dir=same-optional-scratch-dir-as-before]
32+
$ executorch/examples/arm/run.sh --model_name=mv2 --target=ethos-u85-128 [--scratch-dir=same-optional-scratch-dir-as-before]
2933
```
34+
3035
### Online Tutorial
3136

3237
We also have a [tutorial](https://pytorch.org/executorch/stable/executorch-arm-delegate-tutorial.html) explaining the steps performed in these
33-
scripts, expected results, and more. It is a step-by-step guide
38+
scripts, expected results, possible problems and more. It is a step-by-step guide
3439
you can follow to better understand this delegate.

0 commit comments

Comments
 (0)