Skip to content

Commit e1d1a96

Browse files
authored
Refer "./install_requirements.sh --clean" in documents (#7303)
Summary: Currently, most documents will explicitly ask users to run "rm -rf" But we have a dedicated command that does the cleanup.
1 parent df0b06c commit e1d1a96

File tree

11 files changed

+17
-14
lines changed

11 files changed

+17
-14
lines changed

backends/vulkan/docs/android_demo.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ First, build and install ExecuTorch libraries, then build the LLaMA runner
8181
binary using the Android NDK toolchain.
8282

8383
```shell
84-
(rm -rf cmake-android-out && \
84+
./install_requirements.sh --clean
85+
(mkdir cmake-android-out && \
8586
cmake . -DCMAKE_INSTALL_PREFIX=cmake-android-out \
8687
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
8788
-DANDROID_ABI=$ANDROID_ABI \

backends/xnnpack/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ After exporting the XNNPACK Delegated model, we can now try running it with exam
9898
cd executorch
9999

100100
# Get a clean cmake-out directory
101-
rm -rf cmake-out
101+
./install_requirements.sh --clean
102102
mkdir cmake-out
103103

104104
# Configure cmake

docs/source/build-run-xtensa.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ In order to run the CMake build, you need the path to the following:
162162

163163
```bash
164164
cd executorch
165-
rm -rf cmake-out
165+
./install_requirements.sh --clean
166+
mkdir cmake-out
166167
# prebuild and install executorch library
167168
cmake -DCMAKE_TOOLCHAIN_FILE=<path_to_executorch>/backends/cadence/cadence.cmake \
168169
-DCMAKE_INSTALL_PREFIX=cmake-out \

docs/source/llm/getting-started.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,8 @@ At this point, the working directory should contain the following files:
396396

397397
If all of these are present, you can now build and run:
398398
```bash
399-
(rm -rf cmake-out && mkdir cmake-out && cd cmake-out && cmake ..)
399+
./install_requirements.sh --clean
400+
(mkdir cmake-out && cd cmake-out && cmake ..)
400401
cmake --build cmake-out -j10
401402
./cmake-out/nanogpt_runner
402403
```

docs/source/tutorial-xnnpack-delegate-lowering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ After exporting the XNNPACK Delegated model, we can now try running it with exam
147147
cd executorch
148148

149149
# Get a clean cmake-out directory
150-
rm -rf cmake-out
150+
./install_requirements.sh --clean
151151
mkdir cmake-out
152152

153153
# Configure cmake

examples/demo-apps/android/ExecuTorchDemo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export ANDROID_ABI=arm64-v8a
115115
export QNN_SDK_ROOT=<path-to-qnn-sdk>
116116

117117
./install_requirements.sh --clean
118-
mkdir cmake-android-out && cd cmake-android-out
118+
mkdir cmake-android-out
119119
cmake . -DCMAKE_INSTALL_PREFIX=cmake-android-out \
120120
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" \
121121
-DANDROID_ABI="${ANDROID_ABI}" \

examples/models/llama/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,8 @@ This example tries to reuse the Python code, with minimal modifications to make
440440
```
441441
git clean -xfd
442442
pip uninstall executorch
443+
./install_requirements.sh --clean
443444
./install_requirements.sh --pybind xnnpack
444-
445-
rm -rf cmake-out
446445
```
447446
- If you encounter `pthread` related issues during link time, add `pthread` in `target_link_libraries` in `CMakeLists.txt`
448447
- On Mac, if there is linking error in Step 4 with error message like

examples/models/phi-3-mini-lora/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ python export_model.py
1919
2. Run the inference model using an example runtime. For more detailed steps on this, check out [Build & Run](https://pytorch.org/executorch/stable/getting-started-setup.html#build-run).
2020
```
2121
# Clean and configure the CMake build system. Compiled programs will appear in the executorch/cmake-out directory we create here.
22-
(rm -rf cmake-out && mkdir cmake-out && cd cmake-out && cmake ..)
22+
./install_requirements.sh --clean
23+
(mkdir cmake-out && cd cmake-out && cmake ..)
2324
2425
# Build the executor_runner target
2526
cmake --build cmake-out --target executor_runner -j9

examples/portable/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ Use `-h` (or `--help`) to see all the supported models.
4545

4646
```bash
4747
# Build the tool from the top-level `executorch` directory.
48-
(rm -rf cmake-out \
49-
&& mkdir cmake-out \
48+
./install_requirements.sh --clean
49+
(mkdir cmake-out \
5050
&& cd cmake-out \
5151
&& cmake -DEXECUTORCH_PAL_DEFAULT=posix ..) \
5252
&& cmake --build cmake-out -j32 --target executor_runner

examples/xnnpack/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Once we have the model binary (pte) file, then let's run it with ExecuTorch runt
3131
cd executorch
3232

3333
# Get a clean cmake-out directory
34-
rm -rf cmake-out
34+
./install_requiements.sh --clean
3535
mkdir cmake-out
3636

3737
# Configure cmake
@@ -86,7 +86,7 @@ After exporting the XNNPACK Delegated model, we can now try running it with exam
8686
cd executorch
8787

8888
# Get a clean cmake-out directory
89-
rm -rf cmake-out
89+
./install_requirements.sh --clean
9090
mkdir cmake-out
9191

9292
# Configure cmake

extension/training/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ After exporting the model for training, we can now try learning using CMake. We
230230
cd executorch
231231

232232
# Get a clean cmake-out directory
233-
rm -rf cmake-out
233+
./install_requirements.sh --clean
234234
mkdir cmake-out
235235

236236
# Configure cmake

0 commit comments

Comments
 (0)