Skip to content

Commit eb7a728

Browse files
authored
Update using-executorch-building-from-source.md
1 parent 34f3799 commit eb7a728

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

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

Lines changed: 16 additions & 18 deletions
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
@@ -54,13 +54,20 @@ portability details.
5454
git clone --branch viable/strict https://github.com/pytorch/executorch.git
5555
cd executorch
5656

57+
# Update and pull submodules
58+
git submodule sync
59+
git submodule update --init
60+
```
61+
62+
## Install ExecuTorch pip package from Source
63+
```bash
5764
# Install ExecuTorch pip package and its dependencies, as well as
5865
# development tools like CMake.
5966
# If developing on a Mac, make sure to install the Xcode Command Line Tools first.
6067
./install_executorch.sh
6168
```
6269

63-
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.
6471
```bash
6572
./install_executorch.sh --pybind <coreml | mps | xnnpack>
6673

@@ -76,7 +83,7 @@ portability details.
7683
./install_executorch.sh --pybind off
7784
```
7885

79-
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.
8087
```bash
8188
./install_executorch.sh --editable [--pybind xnnpack]
8289

@@ -101,7 +108,7 @@ portability details.
101108
> git submodule update --init
102109
> ```
103110
104-
## Targets Built by the CMake Build System
111+
## Build ExecuTorch C++ runtime from source
105112
106113
ExecuTorch's CMake build system covers the pieces of the runtime that are
107114
likely to be useful to embedded systems users.
@@ -121,17 +128,8 @@ likely to be useful to embedded systems users.
121128
`libportable_kernels.a`, so the program may use any of the operators it
122129
implements.
123130
124-
## One-time setup to prepare for CMake Build
125-
126-
Follow the steps below to have the tools ready before using CMake to build on your machine.
127-
128-
1. If your system's version of python3 is older than 3.11:
129-
- Run `pip install tomli`
130-
3. Install CMake version 3.19 or later:
131-
- Run `conda install cmake` or `pip install cmake`.
132-
133131
134-
## Configure the CMake Build
132+
### Configure the CMake build
135133
136134
Follow these steps after cloning or pulling the upstream repo, since the build
137135
dependencies may have changed.
@@ -148,7 +146,7 @@ cd executorch
148146
149147
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.
150148
151-
### CMake Build Options
149+
### CMake build options
152150
153151
The release build offers optimizations intended to improve performance and reduce binary size. It disables program verification and executorch logging, and adds optimizations flags.
154152
```bash
@@ -163,7 +161,7 @@ To further optimize the release build for size, use both:
163161
164162
See [CMakeLists.txt](https://github.com/pytorch/executorch/blob/main/CMakeLists.txt)
165163
166-
## Build the runtime components
164+
### Build the runtime components
167165
168166
Build all targets with
169167
@@ -180,7 +178,7 @@ cd executorch
180178
cmake --build cmake-out -j9
181179
```
182180
183-
## Use an example app `executor_runner` to execute a .pte file
181+
## Use an example binary `executor_runner` to execute a .pte file
184182

185183
First, generate an `add.pte` or other ExecuTorch program file using the
186184
instructions as described in
@@ -192,7 +190,7 @@ Then, pass it to the command line tool:
192190
./cmake-out/executor_runner --model_path path/to/model.pte
193191
```
194192

195-
If it worked, you should see the message "Model executed successfully" followed
193+
You should see the message "Model executed successfully" followed
196194
by the output values.
197195

198196
```

0 commit comments

Comments
 (0)