Skip to content

Commit ffbe90b

Browse files
pytorchbotdbort
andauthored
Add a note about cleaning the build system after a sync (#5485)
Add a note about cleaning the build system after a sync (#5395) Summary: Pull Request resolved: #5395 Reviewed By: Olivia-liu Differential Revision: D62767673 Pulled By: dbort fbshipit-source-id: f3858e4b1bdc5d90cdb769fed60f61bf1458f8e5 (cherry picked from commit 30ab618) Co-authored-by: Dave Bort <[email protected]>
1 parent 73fbb74 commit ffbe90b

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

docs/source/getting-started-setup.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,23 @@ Alternatively, if you would like to experiment with ExecuTorch quickly and easil
110110
```
111111
After setting up your environment, you are ready to convert your PyTorch programs
112112
to ExecuTorch.
113+
114+
> **_NOTE:_** Cleaning the build system
115+
>
116+
> When fetching a new version of the upstream repo (via `git fetch` or `git
117+
> pull`) it is a good idea to clean the old build artifacts. The build system
118+
> does not currently adapt well to changes in build dependencies.
119+
>
120+
> You should also update and pull the submodules again, in case their versions
121+
> have changed.
122+
>
123+
> ```bash
124+
> # From the root of the executorch repo:
125+
> rm -rf cmake-out pip-out
126+
> git submodule sync
127+
> git submodule update --init
128+
> ```
129+
113130
## Create an ExecuTorch program
114131
115132
After setting up your environment, you are ready to convert your PyTorch programs
@@ -169,13 +186,30 @@ For now, let's use [`executor_runner`](https://github.com/pytorch/executorch/blo
169186
### Build Tooling Setup
170187
The ExecuTorch repo uses CMake to build its C++ code. Here, we'll configure it to build the `executor_runner` tool to run it on our desktop OS.
171188
```bash
172-
# Clean and configure the CMake build system. Compiled programs will appear in the executorch/cmake-out directory we create here.
189+
# Clean and configure the CMake build system. Compiled programs will
190+
# appear in the executorch/cmake-out directory we create here.
173191
(rm -rf cmake-out && mkdir cmake-out && cd cmake-out && cmake ..)
174192
175193
# Build the executor_runner target
176194
cmake --build cmake-out --target executor_runner -j9
177195
```
178196
197+
> **_NOTE:_** Cleaning the build system
198+
>
199+
> When fetching a new version of the upstream repo (via `git fetch` or `git
200+
> pull`) it is a good idea to clean the old build artifacts. The build system
201+
> does not currently adapt well to changes in build dependencies.
202+
>
203+
> You should also update and pull the submodules again, in case their versions
204+
> have changed.
205+
>
206+
> ```bash
207+
> # From the root of the executorch repo:
208+
> rm -rf cmake-out pip-out
209+
> git submodule sync
210+
> git submodule update --init
211+
> ```
212+
179213
### Run Your Program
180214
181215
Now that we've exported a program and built the runtime, let's execute it!

0 commit comments

Comments
 (0)