README.md
1## ExecuTorch on ARM Cortex-M55 + Ethos-U55
2
3This dir contains scripts to help you prepare setup needed to run a PyTorch
4model on an ARM Corstone-300 platform via ExecuTorch. Corstone-300 platform
5contains the Cortex-M55 CPU and Ethos-U55 NPU.
6
7We will start from a PyTorch model in python, export it, convert it to a `.pte`
8file - A binary format adopted by ExecuTorch. Then we will take the `.pte`
9model file and embed that with a baremetal application executor_runner. We will
10then take the executor_runner file, which contains not only the `.pte` file but
11also necessary software component to run standalone on a baremetal system.
12Lastly, we will run the executor_runner binary on a Corstone-300 FVP Simulator
13platform.
14
15### Example workflow
16
17There are two main scripts, setup.sh and run.sh. Each takes one optional,
18positional argument. It is a path to a scratch dir to download and generate
19build artifacts. If supplied, the same argument must be supplied to both the scripts.
20
21To run these scripts. On a Linux system, in a terminal, with a working internet connection,
22```
23# Step [1] - setup necessary tools
24$ ./setup.sh --i-agree-to-the-contained-eula [optional-scratch-dir]
25
26# Step [2] - build + run ExecuTorch and executor_runner baremetal application
27# suited for Corstone300 to run a simple PyTorch model.
28$ ./run.sh [--scratch-dir=same-optional-scratch-dir-as-before]
29```
30### Online Tutorial
31
32We also have a [tutorial](https://pytorch.org/executorch/stable/executorch-arm-delegate-tutorial.html) explaining the steps performed in these
33scripts, expected results, and more. It is a step-by-step guide
34you can follow to better understand this delegate.
35