Skip to content

Commit a7dad09

Browse files
authored
Cleanup build from source page (#9045)
* Remove submodule update commands To make the getting started page simpler. These commands will be run in ./install_executorch.sh so we don't have to ask the users to run it. * Update using-executorch-building-from-source.md
1 parent bf54103 commit a7dad09

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

docs/source/using-executorch-building-from-source.md

+12-18
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ portability details.
4545
conda activate executorch
4646
```
4747

48-
### Clone and install ExecuTorch requirements
48+
### Clone ExecuTorch
4949

5050
```bash
5151
# Clone the ExecuTorch repo from GitHub
@@ -57,14 +57,17 @@ portability details.
5757
# Update and pull submodules
5858
git submodule sync
5959
git submodule update --init
60+
```
6061

62+
## Install ExecuTorch pip package from Source
63+
```bash
6164
# Install ExecuTorch pip package and its dependencies, as well as
6265
# development tools like CMake.
6366
# If developing on a Mac, make sure to install the Xcode Command Line Tools first.
6467
./install_executorch.sh
6568
```
6669

67-
Use the [`--pybind` flag](https://github.com/pytorch/executorch/blob/main/install_executorch.sh#L26-L29) to install with pybindings and dependencies for other backends.
70+
Use the [`--pybind` flag](https://github.com/pytorch/executorch/blob/main/install_executorch.sh#L26-L29) to install with pybindings and dependencies for other backends.
6871
```bash
6972
./install_executorch.sh --pybind <coreml | mps | xnnpack>
7073

@@ -80,7 +83,7 @@ portability details.
8083
./install_executorch.sh --pybind off
8184
```
8285

83-
For development, install the package in `--editable` mode, which allows to modify Python source code and see changes reflected immediately.
86+
For development mode, run the command with `--editable`, which allows us to modify Python source code and see changes reflected immediately.
8487
```bash
8588
./install_executorch.sh --editable [--pybind xnnpack]
8689

@@ -105,7 +108,7 @@ portability details.
105108
> git submodule update --init
106109
> ```
107110
108-
## Targets Built by the CMake Build System
111+
## Build ExecuTorch C++ runtime from source
109112
110113
ExecuTorch's CMake build system covers the pieces of the runtime that are
111114
likely to be useful to embedded systems users.
@@ -125,17 +128,8 @@ likely to be useful to embedded systems users.
125128
`libportable_kernels.a`, so the program may use any of the operators it
126129
implements.
127130
128-
## One-time setup to prepare for CMake Build
129-
130-
Follow the steps below to have the tools ready before using CMake to build on your machine.
131-
132-
1. If your system's version of python3 is older than 3.11:
133-
- Run `pip install tomli`
134-
3. Install CMake version 3.19 or later:
135-
- Run `conda install cmake` or `pip install cmake`.
136-
137131
138-
## Configure the CMake Build
132+
### Configure the CMake build
139133
140134
Follow these steps after cloning or pulling the upstream repo, since the build
141135
dependencies may have changed.
@@ -152,7 +146,7 @@ cd executorch
152146
153147
Once this is done, you don't need to do it again until you pull from the upstream repo again, or if you modify any CMake-related files.
154148
155-
### CMake Build Options
149+
### CMake build options
156150
157151
The release build offers optimizations intended to improve performance and reduce binary size. It disables program verification and executorch logging, and adds optimizations flags.
158152
```bash
@@ -167,7 +161,7 @@ To further optimize the release build for size, use both:
167161
168162
See [CMakeLists.txt](https://github.com/pytorch/executorch/blob/main/CMakeLists.txt)
169163
170-
## Build the runtime components
164+
### Build the runtime components
171165
172166
Build all targets with
173167
@@ -184,7 +178,7 @@ cd executorch
184178
cmake --build cmake-out -j9
185179
```
186180
187-
## Use an example app `executor_runner` to execute a .pte file
181+
## Use an example binary `executor_runner` to execute a .pte file
188182

189183
First, generate an `add.pte` or other ExecuTorch program file using the
190184
instructions as described in
@@ -196,7 +190,7 @@ Then, pass it to the command line tool:
196190
./cmake-out/executor_runner --model_path path/to/model.pte
197191
```
198192

199-
If it worked, you should see the message "Model executed successfully" followed
193+
You should see the message "Model executed successfully" followed
200194
by the output values.
201195

202196
```

0 commit comments

Comments
 (0)