Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backends/arm/cmsis_pack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ cmake \
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
-DEXECUTORCH_BUILD_FLATC=ON \
-Bcmake-out-arm .
cmake --build cmake-out-arm --config Release -j$(nproc)
cmake --build cmake-out-arm --config Release -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 ))

# 2. Build the pack. --output-dir is where the .pack archive lands
# (created if absent); each invocation rewrites this directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ cmake -S examples/arm/executor_runner/standalone \
-DETHOSU_TARGET_NPU_CONFIG=ethos-u55-128 \
-DMEMORY_MODE=Shared_Sram \
-DSYSTEM_CONFIG=Ethos_U55_High_End_Embedded
cmake --build ethos_u_minimal_example -j$(nproc) -- arm_executor_runner
cmake --build ethos_u_minimal_example -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- arm_executor_runner
```

```{tip}
Expand Down
4 changes: 2 additions & 2 deletions docs/source/backends/arm-cortex-m/arm-cortex-m-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ cmake --preset arm-baremetal \
-DCMAKE_BUILD_TYPE=Release \
-DEXECUTORCH_BUILD_DEVTOOLS=ON \
-Bcmake-out-arm
cmake --build cmake-out-arm --target install -j$(nproc)
cmake --build cmake-out-arm --target install -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 ))

# Build the executor runner, linking the .pte into the binary
cmake -DCMAKE_TOOLCHAIN_FILE=$(pwd)/examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake \
Expand All @@ -153,7 +153,7 @@ cmake -DCMAKE_TOOLCHAIN_FILE=$(pwd)/examples/arm/ethos-u-setup/arm-none-eabi-gcc
-DTARGET_CPU=cortex-m55 \
-Bbuild \
examples/arm/executor_runner
cmake --build build -j$(nproc) -- arm_executor_runner
cmake --build build -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- arm_executor_runner
```

Run on a simulated Cortex-M target:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ cmake -S examples/arm/executor_runner/standalone \
-DETHOSU_TARGET_NPU_CONFIG=ethos-u55-128 \
-DMEMORY_MODE=Shared_Sram \
-DSYSTEM_CONFIG=Ethos_U55_High_End_Embedded
cmake --build ethos_u_minimal_example -j$(nproc) -- arm_executor_runner
cmake --build ethos_u_minimal_example -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- arm_executor_runner
```

```{tip}
Expand Down
4 changes: 2 additions & 2 deletions examples/arm/cortex_m_mv2_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "%%bash\n\n# Build executorch libraries cross-compiled for arm baremetal to executorch/cmake-out-arm\ncmake --preset arm-baremetal \\\n-DCMAKE_BUILD_TYPE=Release \\\n-DEXECUTORCH_BUILD_DEVTOOLS=ON \\\n-B../../cmake-out-arm ../..\ncmake --build ../../cmake-out-arm --target install -j$(nproc) \n"
"source": "%%bash\n\n# Build executorch libraries cross-compiled for arm baremetal to executorch/cmake-out-arm\ncmake --preset arm-baremetal \\\n-DCMAKE_BUILD_TYPE=Release \\\n-DEXECUTORCH_BUILD_DEVTOOLS=ON \\\n-B../../cmake-out-arm ../..\ncmake --build ../../cmake-out-arm --target install -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) \n"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "%%bash \n# Build example executor runner application to examples/arm/cortex_m_mv2_example\n# Note that this is the same runner as used in the Ethos-U example, creating some overlap in the config even though the Ethos-U is not used.\ncmake -DCMAKE_TOOLCHAIN_FILE=$(pwd)/ethos-u-setup/arm-none-eabi-gcc.cmake \\\n -DCMAKE_BUILD_TYPE=Release \\\n -DET_PTE_FILE_PATH=cortex_m_mv2_example.bpte \\\n -DTARGET_CPU=cortex-m55 \\\n -DETHOSU_TARGET_NPU_CONFIG=ethos-u55-128 \\\n -DMEMORY_MODE=Shared_Sram \\\n -DET_BUNDLE_IO=ON \\\n -DSYSTEM_CONFIG=Ethos_U55_High_End_Embedded \\\n -Bcortex_m_mv2_example \\\n -S executor_runner/standalone\ncmake --build cortex_m_mv2_example -j$(nproc) -- arm_executor_runner"
"source": "%%bash \n# Build example executor runner application to examples/arm/cortex_m_mv2_example\n# Note that this is the same runner as used in the Ethos-U example, creating some overlap in the config even though the Ethos-U is not used.\ncmake -DCMAKE_TOOLCHAIN_FILE=$(pwd)/ethos-u-setup/arm-none-eabi-gcc.cmake \\\n -DCMAKE_BUILD_TYPE=Release \\\n -DET_PTE_FILE_PATH=cortex_m_mv2_example.bpte \\\n -DTARGET_CPU=cortex-m55 \\\n -DETHOSU_TARGET_NPU_CONFIG=ethos-u55-128 \\\n -DMEMORY_MODE=Shared_Sram \\\n -DET_BUNDLE_IO=ON \\\n -DSYSTEM_CONFIG=Ethos_U55_High_End_Embedded \\\n -Bcortex_m_mv2_example \\\n -S executor_runner/standalone\ncmake --build cortex_m_mv2_example -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- arm_executor_runner"
},
{
"cell_type": "markdown",
Expand Down
2 changes: 1 addition & 1 deletion examples/arm/ethos_u_cmsis_nn_fallback_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
" -DSYSTEM_CONFIG=Ethos_U55_High_End_Embedded \\\n",
" -Bethos_u_cmsis_nn_fallback_example \\\n",
" -S executor_runner/standalone\n",
"cmake --build ethos_u_cmsis_nn_fallback_example -j$(nproc) -- arm_executor_runner"
"cmake --build ethos_u_cmsis_nn_fallback_example -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- arm_executor_runner"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/arm/ethos_u_minimal_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
" -DSYSTEM_CONFIG=Ethos_U55_High_End_Embedded \\\n",
" -Bethos_u_minimal_example \\\n",
" -S executor_runner/standalone\n",
"cmake --build ethos_u_minimal_example -j$(nproc) -- arm_executor_runner"
"cmake --build ethos_u_minimal_example -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- arm_executor_runner"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$ cmake --preset arm-baremetal \
-DCMAKE_BUILD_TYPE=Release \
-B../../cmake-out-arm ../..
cmake --build ../../cmake-out-arm --target install -j$(nproc)
cmake --build ../../cmake-out-arm --target install -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 ))
```

3. Set up the build system. You need to provide path to the DEiT-Tiny pte generated in the
Expand All @@ -21,7 +21,7 @@ $ cmake -DCMAKE_TOOLCHAIN_FILE=$(pwd)/ethos-u-setup/arm-none-eabi-gcc.cmake -DET
4. Compile the application.

```
$ cmake --build simple_app_deit_tiny -j$(nproc) -- img_class_example
$ cmake --build simple_app_deit_tiny -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- img_class_example
```

5. Deploy the application on the Corstone-320 Fixed Virtual Platform. Assuming you have the Corstone-320 installed on your path, do the following command to deploy the application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Build and install the Arm bare-metal ExecuTorch libraries from
cmake --preset arm-baremetal \
-DCMAKE_BUILD_TYPE=Release \
-B../../cmake-out-arm ../..
cmake --build ../../cmake-out-arm --target install -j$(nproc)
cmake --build ../../cmake-out-arm --target install -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 ))
```

The Arm bare-metal preset installs into the build directory. If you use a
Expand Down Expand Up @@ -67,7 +67,7 @@ can inspect and retune post-processing without re-exporting the graph.
## Compile

```bash
cmake --build mobilesam_point_runtime -j$(nproc) -- mobilesam_prompt_segmentation_example
cmake --build mobilesam_point_runtime -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- mobilesam_prompt_segmentation_example
```

## Run on Corstone-320 FVP
Expand Down
6 changes: 3 additions & 3 deletions examples/arm/pruning_minimal_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
"cmake --preset arm-baremetal \\\n",
"-DCMAKE_BUILD_TYPE=Release \\\n",
"-B../../cmake-out-arm ../..\n",
"cmake --build ../../cmake-out-arm --target install -j$(nproc) "
"cmake --build ../../cmake-out-arm --target install -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) "
]
},
{
Expand All @@ -454,7 +454,7 @@
" -DSYSTEM_CONFIG=Ethos_U85_SYS_DRAM_Mid \\\n",
" -Bethos_u_original_model \\\n",
" -S executor_runner/standalone\n",
"cmake --build ethos_u_original_model -j$(nproc) -- arm_executor_runner"
"cmake --build ethos_u_original_model -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- arm_executor_runner"
]
},
{
Expand Down Expand Up @@ -500,7 +500,7 @@
" -DSYSTEM_CONFIG=Ethos_U85_SYS_DRAM_Mid \\\n",
" -Bethos_u_pruned_model \\\n",
" -S executor_runner/standalone\n",
"cmake --build ethos_u_pruned_model -j$(nproc) -- arm_executor_runner"
"cmake --build ethos_u_pruned_model -j$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu) + 1 )) -- arm_executor_runner"
]
},
{
Expand Down
Loading