@@ -76,27 +76,104 @@ The Arm backend can be built using the following command:
7676./install_executorch.sh
7777```
7878
79- One of the following commands should also be run once to gather the necessary dependencies for your chosen target(s):
79+ ** NOTE: ** While developing, it can be convenient to use ` ./install_executorch.sh --editable ` , which creates an editable installation of ExecuTorch.
8080
81- For the Ethos-U target:
81+ ### Target-specific setup and build
82+
83+ Pick one of the target flows below. Each flow has a one-time setup step and a build command.
84+
85+ ### Baremetal (Ethos-U) workflow
86+
87+ Builds ExecuTorch runtime libraries for Cortex-M with Ethos-U acceleration.
88+
89+ Setup:
8290
8391```
8492./examples/arm/setup.sh --i-agree-to-the-contained-eula
8593```
8694
87- For the VGF target:
95+ Build:
96+
97+ ```
98+ ./backends/arm/scripts/build_executorch.sh
99+ ```
100+
101+ ### VGF (Vulkan ML extensions) workflow
102+
103+ Setup:
88104
89105```
90106./examples/arm/setup.sh --disable-ethos-u-deps --enable-mlsdk-deps
91107```
92108
93- For both Ethos-U & VGF targets:
109+ The current flow lowers to TOSA and converts to VGF for use in external projects,
110+ so the ` executor_runner ` is not typically used here.
111+
112+ ### Direct Drive (experimental, Ethos-U85 on Linux) workflow
113+
114+ Direct Drive enables execution on Ethos-U85 via the Linux driver stack.
115+
116+ Driver stack (Linux) and API:
117+
118+ ```
119+ https://gitlab.arm.com/artificial-intelligence/ethos-u/ethos-u-linux-driver-stack
120+ ```
121+
122+ An FVP with Linux is available for Direct Drive, but it must be built and run
123+ manually. See:
94124
95125```
96- ./examples/ arm/setup.sh --i-agree-to-the-contained-eula --enable-mlsdk-deps
126+ https://corstone1000.docs. arm.com/en/corstone1000-2025.12/
97127```
98128
99- ** NOTE:** While developing, it can be convenient to use` ./install_executorch.sh --editable ` , which creates an editable installation of ExecuTorch.
129+ Setup:
130+
131+ ```
132+ ./examples/arm/setup.sh --i-agree-to-the-contained-eula --target-toolchain linux-musl
133+ source ./examples/arm/arm-scratch/setup_path.sh
134+ ```
135+
136+ Build:
137+
138+ ```
139+ ./backends/arm/scripts/build_executorch.sh \
140+ --toolchain=aarch64-linux-musl-gcc \
141+ --build_type=Debug
142+ ```
143+
144+ Note: setup selects the linux-musl toolchain; build uses the aarch64-linux-musl GCC toolchain name.
145+
146+ If your Yocto image enables the dropbear SSH server, you can copy the
147+ ` executor_runner ` binary into the running FVP via scp:
148+
149+ ```
150+ scp -P 2222 arm_test/cmake-out/executor_runner root@127.0.0.1:/tmp/
151+ ```
152+
153+ #### Direct Drive model (PTE) workflow
154+
155+ Create a PTE file:
156+
157+ ```
158+ python3 -m examples.arm.aot_arm_compiler \
159+ --model_name examples/arm/example_modules/add.py \
160+ --delegate \
161+ --quantize \
162+ --target ethos-u85-256 \
163+ --direct_drive
164+ ```
165+
166+ Copy the ` executor_runner ` binary and the generated PTE file to the running FVP:
167+
168+ ```
169+ scp -P 2222 arm_test/cmake-out/executor_runner add_arm_delegate_ethos-u85-256.pte root@127.0.0.1:/tmp/
170+ ```
171+
172+ Run the model on the FVP:
173+
174+ ```
175+ ssh -p 2222 root@127.0.0.1 -t "/tmp/executor_runner -model_path /tmp/add_arm_delegate_ethos-u85-256.pte -num_executions 1"
176+ ```
100177
101178## Testing
102179
0 commit comments