Skip to content

Commit 7413d2d

Browse files
committed
Update ExecuTorch learning path: fix Dockerfile name, add build flags table, update docker paths, and add troubleshooting notes
1 parent 1c9f71c commit 7413d2d

3 files changed

Lines changed: 35 additions & 11 deletions

File tree

content/learning-paths/embedded-and-microcontrollers/observing-ethos-u-on-nxp/4-environment-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Use a Docker container to build ExecuTorch:
2828

2929
```bash
3030
cd ubuntu-24-container
31-
touch dockerfile
31+
touch Dockerfile
3232
```
3333

34-
4. Add the following commands to your `dockerfile`:
34+
4. Add the following commands to your `Dockerfile`:
3535

3636
```dockerfile
3737
FROM ubuntu:24.04

content/learning-paths/embedded-and-microcontrollers/observing-ethos-u-on-nxp/7-build-executorch-pte.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,31 @@ Now you will build the `.pte` file, that will be used on the NXP board.
109109
1. Build the [MobileNet V2](https://pytorch.org/hub/pytorch_vision_mobilenet_v2/) ExecuTorch `.pte` runtime file using [aot_arm_compiler](https://github.com/pytorch/executorch/blob/2bd96df8de07bc86f2966a559e3d6c80fc324896/examples/arm/aot_arm_compiler.py):
110110

111111
```bash
112-
python3 -m examples.arm.aot_arm_compiler \
113-
--model_name="mv2" \
114-
--quantize \
115-
--delegate \
116-
--debug
112+
python3 -m examples.arm.aot_arm_compiler \
113+
--model_name="mv2" \
114+
--quantize \
115+
--delegate \
116+
--debug \
117+
--target ethos-u55-256
118+
117119
```
118120

119-
3. Check that the `mv2_arm.pte` file was generated:
121+
{{% notice Note %}}
122+
| Flag | Meaning |
123+
| ------------------------ | --------------------------------------------------- |
124+
| `--model_name="mv2"` | Example model: MobileNetV2 (small, efficient) |
125+
| `--quantize` | Enables int8 quantization (required for Ethos-NPUs) |
126+
| `--delegate` | Enables offloading layers to the Ethos backend |
127+
| `--debug` | Verbose build output |
128+
| `--target ethos-u55-256` | Targets the Ethos-U55 |
129+
130+
The `--quantize` flag uses one input example, so the resulting model will likely have poor classification performance.
131+
{{% /notice %}}
132+
133+
3. Check that the `mv2_arm_delegate_ethos-u55-256.pte` file was generated:
120134

121135
```bash
122-
ls mv2/mv2_arm.pte
136+
ls mv2_arm_delegate_ethos-u55-256.pte
123137
```
124138

125139
## Troubleshooting

content/learning-paths/embedded-and-microcontrollers/observing-ethos-u-on-nxp/9-build-executorch-runner-for-cm33.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,22 @@ abc123def456 executorch "/bin/bash" 2 hours ago Exited
8585
Copy the libraries:
8686

8787
```bash
88-
docker cp abc123def456:/root/executorch/cmake-out/lib/. ./executorch/lib/
89-
docker cp abc123def456:/root/executorch/. ./executorch/include/executorch/
88+
docker cp abc123def456:/home/ubuntu/executorch/cmake-out/lib/. ./executorch/lib/
89+
docker cp abc123def456:/home/ubuntu/executorch/. ./executorch/include/executorch/
9090
```
9191

9292
Replace `abc123def456` with your actual container ID.
9393

94+
{{% notice Note %}}
95+
In some Docker containers, the `cmake-out` folder might not exist. If you don't see the libraries, run the following command to build them:
96+
97+
```bash
98+
./examples/arm/run.sh --build-only
99+
```
100+
101+
The libraries will be generated in `arm_test/cmake-out`.
102+
{{% /notice %}}
103+
94104
Verify the libraries:
95105

96106
```bash { output_lines = "2-5" }

0 commit comments

Comments
 (0)