You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/visualizing-ethos-u-performance/3-env-setup-fvp.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,27 @@
1
1
---
2
2
# User change
3
-
title: "Set up the Corstone-320 FVP on macOS"
3
+
title: "Set up the Corstone-320 FVP on Linux"
4
4
5
-
weight: 5# 1 is first, 2 is second, etc.
5
+
weight: 4# 1 is first, 2 is second, etc.
6
6
7
7
# Do not modify these elements
8
8
layout: "learningpathall"
9
9
---
10
10
11
-
## macOS Prerequisits
12
-
13
-
Setting up FVPs on MacOS requires some extra steps, outlined in GitHub repo [VPs-on-Mac](https://github.com/Arm-Examples/FVPs-on-Mac/). macOS users must do this first, before setting up the Corestone-320 FVP.
14
-
15
-
## Set up the Corestone-320 FVP
11
+
In this section, you will run scripts to set up the Corstone-320 reference package.
16
12
17
13
The Corstone-320 Fixed Virtual Platform (FVP) is a pre-silicon software development environment for Arm-based microcontrollers. It provides a virtual representation of hardware, allowing developers to test and optimize software before actual hardware is available. Designed for AI and machine learning workloads, it includes support for Arm's Ethos-U NPU and Cortex-M processors, making it ideal for embedded AI applications. The FVP accelerates development by enabling early software validation and performance tuning in a flexible, simulation-based environment.
18
14
19
15
The Corstone reference system is provided free of charge, although you will have to accept the license in the next step. For more information on Corstone-320, check out the [official documentation](https://developer.arm.com/documentation/109761/0000?lang=en).
20
16
21
17
## Corstone-320 FVP Setup for ExecuTorch
22
18
19
+
{{% notice macOS %}}
20
+
21
+
Setting up FVPs on MacOS requires some extra steps, outlined in GitHub repo [VPs-on-Mac](https://github.com/Arm-Examples/FVPs-on-Mac/). macOS users must do this first, before setting up the Corestone-320 FVP.
22
+
23
+
{{% /notice %}}
24
+
23
25
Navigate to the Arm examples directory in the ExecuTorch repository. Run the following command.
With your development environment set up, you can deploy a simple PyTorch model.
30
+
31
+
This example deploys the [MobileNet V2](https://pytorch.org/hub/pytorch_vision_mobilenet_v2/) computer vision model. The model is a convolutional neural network (CNN) that extracts visual features from an image. It is used for image classification and object detection.
32
+
33
+
The actual Python code for the MobileNet V2 model is in your local `executorch` repo: [executorch/examples/models/mobilenet_v2/model.py](https://github.com/pytorch/executorch/blob/main/examples/models/mobilenet_v2/model.py). You can deploy it using [run.sh](https://github.com/pytorch/executorch/blob/main/examples/arm/run.sh), just like you did in the previous step, with some extra parameters:
34
+
35
+
{{% notice macOS %}}
36
+
37
+
**Start Docker:** on macOS, FVPs run inside a Docker container.
|--aot_arm_compiler_flags|Passes a string of compiler options to the ExecuTorch Ahead-of-Time (AOT) compiler|
53
+
|--delegate|Enables backend delegation|
54
+
|--quantize|Converts the floating-point model to int8 quantized format using post-training quantization<br>**Essential for running on NPUs**|
55
+
|--intermediates mv2_u85/|Directory where intermediate files (e.g., TOSA, YAMLs, debug graphs) will be saved<br>Useful output files for **manual debugging**|
56
+
|--debug|Verbose debugging logging|
57
+
|--evaluate|Validates model output, provides timing estimates|
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/visualizing-ethos-u-performance/5-configure-fvp-gui.md
+10-27Lines changed: 10 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,14 @@
1
1
---
2
2
# User change
3
-
title: "Deploy a PyTorch model"
3
+
title: "Configure the FVP GUI (optional)"
4
4
5
5
weight: 6# 1 is first, 2 is second, etc.
6
6
7
7
# Do not modify these elements
8
8
layout: "learningpathall"
9
9
---
10
10
11
-
## Deploy a small neural network using Python
12
-
13
-
With your development environment set up, you can deploy a simple PyTorch model.
14
-
15
-
This example deploys the [MobileNet V2](https://pytorch.org/hub/pytorch_vision_mobilenet_v2/) computer vision model. The model is a convolutional neural network (CNN) that extracts visual features from an image. It is used for image classification and object detection.
16
-
17
-
The actual Python code for the MobileNet V2 model is in your local `executorch` repo: [executorch/examples/models/mobilenet_v2/model.py](https://github.com/pytorch/executorch/blob/main/examples/models/mobilenet_v2/model.py). You can deploy it using [run.sh](https://github.com/pytorch/executorch/blob/main/examples/arm/run.sh), just like you did in the previous step, with some extra parameters:
@@ -38,20 +22,17 @@ To help you, here are some common WiFi interface names on Linux:
38
22
|wlx<MAC>|Some systems name interfaces after MAC addresses|
39
23
|wifi0, ath0|Very rare, specific to certain drivers (e.g., Atheros)|
40
24
41
-
42
25
{{% notice macOS %}}
43
26
44
27
Note down your `en0` IP address (or whichever network adapter is active):
45
28
46
29
```bash
47
30
ipconfig getifaddr en0 # Returns your Mac's WiFi IP address
48
-
xhost + <YOUR_MAC_IP_ADDRESS>
49
-
xhost + 127.0.0.1 # The Docker container seems to proxy through localhost, so add localhost just in case
50
31
```
51
32
52
33
{{% /notice %}}
53
34
54
-
###Enable the FVP's GUI
35
+
## Enable the FVP's GUI
55
36
56
37
Edit the following parameters in [run_fvp.sh](https://github.com/pytorch/executorch/blob/d5fe5faadb8a46375d925b18827493cd65ec84ce/backends/arm/scripts/run_fvp.sh#L97-L102), to enable the Mobilenet V2 output on the FVP's GUI:
57
38
@@ -78,17 +59,19 @@ Edit the following parameters in [run_fvp.sh](https://github.com/pytorch/executo
78
59
--display-ip <YOUR_IP_ADDRESS> \
79
60
```
80
61
81
-
###Deploy the model
62
+
## Deploy the model
82
63
83
64
{{% notice macOS %}}
84
65
85
-
- Start Docker: on macOS, FVPs run inside a Docker container.
66
+
-**Start Docker:** on macOS, FVPs run inside a Docker container.
86
67
87
68
**Do not use Colima Docker!**
88
69
89
-
Make sure to use an [official version of Docker](https://www.docker.com/products/docker-desktop/) and not a free version like the [Colima](https://github.com/abiosoft/colima?tab=readme-ov-file) Docker container runtime. `run.sh` assumes Docker Desktop style networking (`host.docker.internal`) which breaks with Colima.
70
+
- Make sure to use an [official version of Docker](https://www.docker.com/products/docker-desktop/) and not a free version like the [Colima](https://github.com/abiosoft/colima?tab=readme-ov-file) Docker container runtime
71
+
-`run.sh` assumes Docker Desktop style networking (`host.docker.internal`) which breaks with Colima
72
+
- Colima then breaks the FVP GUI
90
73
91
-
- Start XQuartz: on macOS, the FVP GUI runs using XQuartz.
74
+
-**Start XQuartz:** on macOS, the FVP GUI runs using XQuartz.
92
75
93
76
Start the xquartz.app and then configure XQuartz so that the FVP will accept connections from your Mac and localhost:
94
77
```bash
@@ -108,4 +91,4 @@ Now run the Mobilenet V2 computer vision model, using [executorch/examples/arm/r
108
91
109
92
Observe that the FVP loads the model file, compiles the PyTorch model to ExecuTorch `.pte` format and then shows an instruction count in the top right of the GUI:
110
93
111
-

94
+

0 commit comments