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
Arm backend: Generate kernel registration lib from .pte (#13220)
- Moves the arm_portable_op_lib target into the executor_runner
CMakeLists.txt
- Use the OPS_FROM_MODEL arg to generate the arm_portable_op_lib if
possible
- Adds possibility of setting EXECUTORCH_ENABLE_DTYPE_SELECTIVE_BUILD
when building the executor_runner.
- Makes cortex_m targets findeable using find_package to avoid
rebuilding.
+ run cmake-format
Signed-off-by: Adrian Lundell <[email protected]>
echo "[$(basename $0)] Generated static libraries for ExecuTorch:"
95
-
find "${et_build_dir}/examples/arm" -name "*.a" -exec ls -al {} \;
7
+
echo"DEPRECATED: build_portable_kernels.sh is deprecated and will be removed. The kernel registration library is now built directly with the arm_executor_runner."
Copy file name to clipboardExpand all lines: docs/source/tutorial-arm-ethos-u.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -300,17 +300,13 @@ To run a `.pte` file with the Arm backend delegate call instructions, you will n
300
300
301
301
-`libexecutorch_delegate_ethos_u.a`
302
302
303
-
These libraries are generated by the `backends/arm/scripts/build_executorch.sh` and `backends/arm/scripts/build_portable_kernels.sh` scripts called from the `run.sh` script.
304
-
305
-
The `--portable_kernels` flag can be used to set the build flag `EXECUTORCH_SELECT_OPS_LIST` when running `backends/arm/scripts/build_portable_kernels.sh` that will decide the number of portable operators included in the build and are available at runtime. It must match with `.pte` file's requirements, otherwise you will get `Missing Operator` error at runtime.
306
-
307
-
For example, there in the command line above, to run SoftmaxModule, you only included the softmax CPU operator. Similarly, to run AddModule in a non-delegated manner you will need add op and so on. As you might have already realized, for the delegated operators, which will be executed by the Arm backend delegate, you do not need to include those operators in this list. This is only for *non-delegated* operators.
303
+
These libraries are generated by the `backends/arm/scripts/build_executorch.sh` script called from the `run.sh` script.
308
304
309
305
### Building the executor_runner Bare-Metal Application
310
306
311
307
The SDK dir is the same one prepared [earlier](#setup-the-arm-ethos-u-software-development). And, you will be passing the `.pte` file (any one of them) generated above.
312
308
313
-
Note, you have to generate a new `executor-runner` binary if you want to change the model or the `.pte` file. This constraint is from the constrained bare-metal runtime environment you have for Corstone-300/Corstone-320 platforms.
309
+
Note, you have to generate a new `executor-runner` binary if you want to change the model or the `.pte` file. This constraint is from the constrained bare-metal runtime environment you have for Corstone-300/Corstone-320 platforms. The build also generates a kernel registration library for the relevant operators which could not be delegated to the EthosU, see the [Kernel Library Selective Build documentation](https://docs.pytorch.org/executorch/stable/kernel-library-selective-build.html).
314
310
315
311
This step is executed by the build_executor_runner.sh script, which is invoked from the run.sh in the backends/arm/scripts folder.
Copy file name to clipboardExpand all lines: examples/arm/ethos_u_minimal_example.ipynb
+4-8Lines changed: 4 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -180,10 +180,9 @@
180
180
"source": [
181
181
"## Build executor runtime\n",
182
182
"\n",
183
-
"After the AOT compilation flow is done, the runtime can be cross compiled and linked to the produced .pte-file using the Arm cross-compilation toolchain. This is done in three steps:\n",
184
-
"1. Build the executorch library and EthosUDelegate.\n",
185
-
"2. Build any external kernels required. In this example this is not needed as the graph is fully delegated, but its included for completeness.\n",
186
-
"3. Build and link the `arm_executor_runner`."
183
+
"After the AOT compilation flow is done, the runtime can be cross compiled and linked to the produced .pte-file using the Arm cross-compilation toolchain. This is done in two steps:\n",
184
+
"1. Build and install the executorch library and EthosUDelegate.\n",
185
+
"2. Build and link the `arm_executor_runner` and generate kernel bindings for any non delegated ops."
0 commit comments