Skip to content

Commit 2a896e1

Browse files
Merge pull request #2434 from NostalgiaJohn/update-to-Introduction-to-TinyML-on-Arm-using-PyTorch-and-ExecuTorch
Updates to Introduction to TinyML on Arm using PyTorch and ExecuTorch
2 parents cb77ef5 + 06f98d6 commit 2a896e1

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

content/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/3-env-setup-fvp.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ When the script completes, it prints a command to finalize the installation by a
3131
source $HOME/executorch/examples/arm/ethos-u-scratch/setup_path.sh
3232
```
3333

34+
Then configure git informations, you can stay anonymous or fill in your email and name:
35+
36+
```bash
37+
git config --global user.email "[email protected]"
38+
git config --global user.name "Your Name"
39+
```
40+
3441
Test that the setup was successful by running the `run.sh` script for Ethos-U85, which is the target device for Corstone-320:
3542

3643
```bash
@@ -39,4 +46,4 @@ Test that the setup was successful by running the `run.sh` script for Ethos-U85,
3946

4047
You will see a number of examples run on the FVP.
4148

42-
This confirms the installation, so you can now proceed to the Learning Path [Build a Simple PyTorch Model](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/4-build-model/).
49+
This confirms the installation, so you can now proceed to the Learning Path [Build a Simple PyTorch Model](/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/4-build-model/).

content/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/4-build-model.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,28 @@ cd $ET_HOME
6868
python -m examples.arm.aot_arm_compiler --model_name=examples/arm/simple_nn.py --delegate --quantize --target=ethos-u85-256 --system_config=Ethos_U85_SYS_DRAM_Mid --memory_mode=Sram_Only
6969
```
7070

71-
From the Arm Examples directory, you can build an embedded Arm runner with the `.pte` included. This allows you to optimize the performance of your model, and ensures compatibility with the CPU kernels on the FVP. Finally, generate the executable `arm_executor_runner`.
71+
From the Arm Examples directory, you can build an embedded Arm runner with the `.pte` included. This allows you to optimize the performance of your model, and ensures compatibility with the CPU kernels on the FVP. Finally, build the ExecuTorch libraries and generate the executable `arm_executor_runner`.
7272

7373
```bash
74-
cd $HOME/executorch/examples/arm/executor_runner
74+
cmake -S "${ET_HOME}" \
75+
-B "${executorch_DIR}" \
76+
--preset arm-baremetal \
77+
-DCMAKE_BUILD_TYPE=Release
78+
79+
cmake --build "$executorch_DIR" --target install --parallel
7580

81+
cd $HOME/executorch/examples/arm/executor_runner
7682

77-
cmake -DCMAKE_BUILD_TYPE=Release \
78-
-DCMAKE_TOOLCHAIN_FILE=$ET_HOME/examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake \
79-
-DTARGET_CPU=cortex-m85 \
80-
-DET_DIR_PATH:PATH=$ET_HOME/ \
81-
-DET_BUILD_DIR_PATH:PATH=$ET_HOME/cmake-out \
82-
-DET_PTE_FILE_PATH:PATH=$ET_HOME/simple_nn_arm_delegate_ethos-u85-256.pte \
83-
-DETHOS_SDK_PATH:PATH=$ET_HOME/examples/arm/ethos-u-scratch/ethos-u \
84-
-DETHOSU_TARGET_NPU_CONFIG=ethos-u85-256 \
85-
-DPYTHON_EXECUTABLE=$HOME/executorch-venv/bin/python3 \
86-
-DSYSTEM_CONFIG=Ethos_U85_SYS_DRAM_Mid \
87-
-B $ET_HOME/examples/arm/executor_runner/cmake-out
83+
cmake -S "${ET_HOME}/examples/arm/executor_runner" \
84+
-B "${ET_HOME}/examples/arm/executor_runner/cmake-out" \
85+
-DCMAKE_BUILD_TYPE=Release \
86+
-DCMAKE_TOOLCHAIN_FILE=$ET_HOME/examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake \
87+
-DTARGET_CPU=cortex-m85 \
88+
-DET_PTE_FILE_PATH:PATH=$ET_HOME/simple_nn_arm_delegate_ethos-u85-256.pte \
89+
-DETHOS_SDK_PATH:PATH=$ET_HOME/examples/arm/ethos-u-scratch/ethos-u \
90+
-DETHOSU_TARGET_NPU_CONFIG=ethos-u85-256 \
91+
-DPYTHON_EXECUTABLE=$HOME/executorch-venv/bin/python3 \
92+
-DSYSTEM_CONFIG=Ethos_U85_SYS_DRAM_Mid \
8893

8994
cmake --build $ET_HOME/examples/arm/executor_runner/cmake-out --parallel -- arm_executor_runner
9095

0 commit comments

Comments
 (0)