Skip to content

Commit 9612e63

Browse files
committed
✨ Simplify install script and remove pybind flags
1 parent 460655a commit 9612e63

File tree

8 files changed

+17
-37
lines changed

8 files changed

+17
-37
lines changed

.github/workflows/trunk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ jobs:
305305
# Install requirements
306306
${CONDA_RUN} sh install_requirements.sh
307307
${CONDA_RUN} sh backends/apple/coreml/scripts/install_requirements.sh
308-
${CONDA_RUN} python install_executorch.py --pybind coreml
308+
${CONDA_RUN} python install_executorch.py
309309
${CONDA_RUN} sh examples/models/llama/install_requirements.sh
310310
311311
# Test ANE llama

backends/apple/mps/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ I 00:00:00.122615 executorch:mps_executor_runner.mm:501] Model verified successf
9797
### [Optional] Run the generated model directly using pybind
9898
1. Make sure `pybind` MPS support was installed:
9999
```bash
100-
./install_executorch.sh --pybind mps
100+
CMAKE_ARGS="-DEXECUTORCH_BUILD_MPS=ON" ./install_executorch.sh
101101
```
102102
2. Run the `mps_example` script to trace the model and run it directly from python:
103103
```bash

docs/source/backends-mps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ I 00:00:00.122615 executorch:mps_executor_runner.mm:501] Model verified successf
9797
### [Optional] Run the generated model directly using pybind
9898
1. Make sure `pybind` MPS support was installed:
9999
```bash
100-
./install_executorch.sh --pybind mps
100+
CMAKE_ARGS="-DEXECUTORCH_BUILD_MPS=ON" ./install_executorch.sh
101101
```
102102
2. Run the `mps_example` script to trace the model and run it directly from python:
103103
```bash

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

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,25 +64,15 @@ Or alternatively, [install conda on your machine](https://conda.io/projects/cond
6464
./install_executorch.sh
6565
```
6666

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.
68-
```bash
69-
./install_executorch.sh --pybind <coreml | mps | xnnpack>
70-
71-
# Example: pybindings with CoreML *only*
72-
./install_executorch.sh --pybind coreml
73-
74-
# Example: pybinds with CoreML *and* XNNPACK
75-
./install_executorch.sh --pybind coreml xnnpack
76-
```
67+
Not all backends are built into the pip wheel by default. You can link these missing/experimental backends by turning on the corresponding cmake flag. For example, to include the MPS backend:
7768

78-
By default, `./install_executorch.sh` command installs pybindings for XNNPACK. To disable any pybindings altogether:
79-
```bash
80-
./install_executorch.sh --pybind off
81-
```
69+
```bash
70+
CMAKE_ARGS="-DEXECUTORCH_BUILD_MPS=ON" ./install_executorch.sh
71+
```
8272

8373
For development mode, run the command with `--editable`, which allows us to modify Python source code and see changes reflected immediately.
8474
```bash
85-
./install_executorch.sh --editable [--pybind xnnpack]
75+
./install_executorch.sh --editable
8676

8777
# Or you can directly do the following if dependencies are already installed
8878
# either via a previous invocation of `./install_executorch.sh` or by explicitly installing requirements via `./install_requirements.sh` first.

examples/demo-apps/react-native/rnllama/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ A React Native mobile application for running LLaMA language models using ExecuT
2626

2727
3. Pull submodules: `git submodule sync && git submodule update --init`
2828

29-
4. Install dependencies: `./install_executorch.sh --pybind xnnpack && ./examples/models/llama/install_requirements.sh`
29+
4. Install dependencies: `./install_executorch.sh && ./examples/models/llama/install_requirements.sh`
3030

3131
5. Follow the instructions in the [README](https://github.com/pytorch/executorch/blob/main/examples/models/llama/README.md#option-a-download-and-export-llama32-1b3b-model) to export a model as `.pte`
3232

examples/models/llama/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Llama 3 8B performance was measured on the Samsung Galaxy S22, S24, and OnePlus
148148
## Step 1: Setup
149149
> :warning: **double check your python environment**: make sure `conda activate <VENV>` is run before all the bash and python scripts.
150150
151-
1. Follow the [tutorial](https://pytorch.org/executorch/main/getting-started-setup) to set up ExecuTorch. For installation run `./install_executorch.sh --pybind xnnpack`
151+
1. Follow the [tutorial](https://pytorch.org/executorch/main/getting-started-setup) to set up ExecuTorch. For installation run `./install_executorch.sh`
152152
2. Run `examples/models/llama/install_requirements.sh` to install a few dependencies.
153153

154154

@@ -528,7 +528,7 @@ This example tries to reuse the Python code, with minimal modifications to make
528528
git clean -xfd
529529
pip uninstall executorch
530530
./install_executorch.sh --clean
531-
./install_executorch.sh --pybind xnnpack
531+
./install_executorch.sh
532532
```
533533
- If you encounter `pthread` related issues during link time, add `pthread` in `target_link_libraries` in `CMakeLists.txt`
534534
- On Mac, if there is linking error in Step 4 with error message like

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This example demonstrates how to run a [Phi-3-mini](https://huggingface.co/micro
33

44
# Instructions
55
## Step 1: Setup
6-
1. Follow the [tutorial](https://pytorch.org/executorch/main/getting-started-setup) to set up ExecuTorch. For installation run `./install_executorch.sh --pybind xnnpack`
6+
1. Follow the [tutorial](https://pytorch.org/executorch/main/getting-started-setup) to set up ExecuTorch. For installation run `./install_executorch.sh`
77
2. Currently, we support transformers v4.44.2. Install transformers with the following command:
88
```
99
pip uninstall -y transformers ; pip install transformers==4.44.2

extension/pybindings/README.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,18 @@
22
This Python module, named `portable_lib`, provides a set of functions and classes for loading and executing bundled programs. To install it, run the fullowing command:
33

44
```bash
5-
CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON" pip install . --no-build-isolation
6-
```
7-
8-
Or when installing the rest of dependencies:
5+
./install_executorch.sh
96

10-
```bash
11-
install_executorch.sh --pybind
7+
# ...or use pip directly
8+
pip install . --no-build-isolation
129
```
1310

1411
# Link Backends
1512

16-
You can link the runtime against some backends to make sure a delegated or partitioned model can still run by Python module successfully:
17-
18-
```bash
19-
CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_COREML=ON -DEXECUTORCH_BUILD_MPS=ON" \
20-
pip install . --no-build-isolation
21-
```
22-
23-
Similarly, when installing the rest of dependencies:
13+
Not all backends are built into the pip wheel by default. You can link these missing/experimental backends by turning on the corresponding cmake flag. For example, to include the MPS backend:
2414

2515
```bash
26-
install_executorch.sh --pybind xnnpack coreml mps
16+
CMAKE_ARGS="-DEXECUTORCH_BUILD_MPS=ON" ./install_executorch.sh
2717
```
2818

2919
## Functions

0 commit comments

Comments
 (0)