Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .ci/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ retry () {
}

clean_executorch_install_folders() {
./install_executorch.sh --clean
./install_requirements.sh --clean
}

install_executorch() {
which pip
# Install executorch, this assumes that Executorch is checked out in the
# current directory.
if [[ "${1:-}" == "use-pt-pinned-commit" ]]; then
./install_executorch.sh --pybind xnnpack --use-pt-pinned-commit
./install_requirements.sh --pybind xnnpack --use-pt-pinned-commit
else
./install_executorch.sh --pybind xnnpack
./install_requirements.sh --pybind xnnpack
fi
# Just print out the list of packages for debugging
pip list
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
paths:
- .ci/scripts/setup-ios.sh
- .github/workflows/apple.yml
- install_executorch.sh
- install_requirements.sh
- backends/apple/**
- build/build_apple_frameworks.sh
- build/build_apple_llm_demo.sh
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ jobs:
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"

# install pybind
bash install_executorch.sh --pybind xnnpack
bash install_requirements.sh --pybind xnnpack

# install Llava requirements
bash examples/models/llama/install_requirements.sh
Expand Down Expand Up @@ -436,7 +436,7 @@ jobs:
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"

# install pybind
bash install_executorch.sh --pybind xnnpack
bash install_requirements.sh --pybind xnnpack

# install phi-3-mini requirements
bash examples/models/phi-3-mini/install_requirements.sh
Expand All @@ -463,7 +463,7 @@ jobs:
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"

# install pybind
bash install_executorch.sh --pybind xnnpack
bash install_requirements.sh --pybind xnnpack

# install llama requirements
bash examples/models/llama/install_requirements.sh
Expand All @@ -490,7 +490,7 @@ jobs:
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"

# install pybind
bash install_executorch.sh --pybind xnnpack
bash install_requirements.sh --pybind xnnpack

# install llama requirements
bash examples/models/llama/install_requirements.sh
Expand All @@ -517,7 +517,7 @@ jobs:
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"

# install pybind
bash install_executorch.sh --pybind xnnpack
bash install_requirements.sh --pybind xnnpack

# install llama requirements
bash examples/models/llama/install_requirements.sh
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,18 @@
[submodule "third-party/ios-cmake"]
path = third-party/ios-cmake
url = https://github.com/leetal/ios-cmake
[submodule "backends/cadence/hifi/third-party/nnlib/nnlib-hifi4"]
path = backends/cadence/hifi/third-party/nnlib/nnlib-hifi4
url = https://github.com/foss-xtensa/nnlib-hifi4.git
[submodule "third-party/prelude"]
path = third-party/prelude
url = https://github.com/facebook/buck2-prelude.git
[submodule "third-party/pybind11"]
path = third-party/pybind11
url = https://github.com/pybind/pybind11.git
[submodule "backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3"]
path = backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3
url = https://github.com/foss-xtensa/nnlib-FusionG3.git
[submodule "third-party/ao"]
path = third-party/ao
url = https://github.com/pytorch/ao.git
2 changes: 1 addition & 1 deletion backends/apple/mps/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ I 00:00:00.122615 executorch:mps_executor_runner.mm:501] Model verified successf
### [Optional] Run the generated model directly using pybind
1. Make sure `pybind` MPS support was installed:
```bash
./install_executorch.sh --pybind mps
./install_requirements.sh --pybind mps
```
2. Run the `mps_example` script to trace the model and run it directly from python:
```bash
Expand Down
2 changes: 0 additions & 2 deletions backends/cadence/.gitignore

This file was deleted.

3 changes: 1 addition & 2 deletions backends/cadence/build_cadence_fusionG3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ unset XTENSA_CORE
export XTENSA_CORE=FCV_FG3GP
git submodule sync
git submodule update --init
./backends/cadence/install_requirements.sh
./install_executorch.sh
./install_requirements.sh

rm -rf cmake-out

Expand Down
3 changes: 1 addition & 2 deletions backends/cadence/build_cadence_hifi4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ unset XTENSA_CORE
export XTENSA_CORE=nxp_rt600_RI23_11_newlib
git submodule sync
git submodule update --init
./backends/cadence/install_requirements.sh
./install_executorch.sh
./install_requirements.sh

rm -rf cmake-out

Expand Down
Submodule nnlib-FusionG3 added at 8ddd1c
1 change: 1 addition & 0 deletions backends/cadence/hifi/third-party/nnlib/nnlib-hifi4
Submodule nnlib-hifi4 added at 102944
49 changes: 0 additions & 49 deletions backends/cadence/install_requirements.sh

This file was deleted.

2 changes: 1 addition & 1 deletion backends/vulkan/docs/android_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ First, build and install ExecuTorch libraries, then build the LLaMA runner
binary using the Android NDK toolchain.

```shell
./install_executorch.sh --clean
./install_requirements.sh --clean
(mkdir cmake-android-out && \
cmake . -DCMAKE_INSTALL_PREFIX=cmake-android-out \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
Expand Down
2 changes: 1 addition & 1 deletion backends/xnnpack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ After exporting the XNNPACK Delegated model, we can now try running it with exam
cd executorch

# Get a clean cmake-out directory
./install_executorch.sh --clean
./install_requirements.sh --clean
mkdir cmake-out

# Configure cmake
Expand Down
2 changes: 1 addition & 1 deletion build/test_ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ say "Installing Requirements"

pip install --upgrade cmake pip setuptools wheel zstd

./install_executorch.sh --pybind coreml mps xnnpack
./install_requirements.sh --pybind coreml mps xnnpack
export PATH="$(realpath third-party/flatbuffers/cmake-out):$PATH"
./build/install_flatc.sh

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ To build the documentation locally:
1. Run:

```bash
bash install_executorch.sh
bash install_requirements.sh
```

1. Go to the `docs/` directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/apple-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
4. Install the required dependencies, including those needed for the backends like [Core ML](build-run-coreml.md) or [MPS](build-run-mps.md), if you plan to build them as well:

```bash
./install_executorch.sh --pybind coreml mps xnnpack
./install_requirements.sh --pybind coreml mps xnnpack

# Optional dependencies for Core ML backend.
./backends/apple/coreml/scripts/install_requirements.sh
Expand Down
2 changes: 1 addition & 1 deletion docs/source/build-run-xtensa.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ In order to run the CMake build, you need the path to the following:

```bash
cd executorch
./install_executorch.sh --clean
./install_requirements.sh --clean
mkdir cmake-out
# prebuild and install executorch library
cmake -DCMAKE_TOOLCHAIN_FILE=<path_to_executorch>/backends/cadence/cadence.cmake \
Expand Down
20 changes: 10 additions & 10 deletions docs/source/getting-started-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,23 @@ Alternatively, if you would like to experiment with ExecuTorch quickly and easil
# Install ExecuTorch pip package and its dependencies, as well as
# development tools like CMake.
# If developing on a Mac, make sure to install the Xcode Command Line Tools first.
./install_executorch.sh
./install_requirements.sh
```

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.
Use the [`--pybind` flag](https://github.com/pytorch/executorch/blob/main/install_requirements.sh#L26-L29) to install with pybindings and dependencies for other backends.
```bash
./install_executorch.sh --pybind <coreml | mps | xnnpack>
./install_requirements.sh --pybind <coreml | mps | xnnpack>

# Example: pybindings with CoreML *only*
./install_executorch.sh --pybind coreml
./install_requirements.sh --pybind coreml

# Example: pybinds with CoreML *and* XNNPACK
./install_executorch.sh --pybind coreml xnnpack
./install_requirements.sh --pybind coreml xnnpack
```

By default, `./install_executorch.sh` command installs pybindings for XNNPACK. To disable any pybindings altogether:
By default, `./install_requirements.sh` command installs pybindings for XNNPACK. To disable any pybindings altogether:
```bash
./install_executorch.sh --pybind off
./install_requirements.sh --pybind off
```

After setting up your environment, you are ready to convert your PyTorch programs
Expand All @@ -125,7 +125,7 @@ to ExecuTorch.
>
> ```bash
> # From the root of the executorch repo:
> ./install_executorch.sh --clean
> ./install_requirements.sh --clean
> git submodule sync
> git submodule update --init
> ```
Expand Down Expand Up @@ -208,7 +208,7 @@ The ExecuTorch repo uses CMake to build its C++ code. Here, we'll configure it t
```bash
# Clean and configure the CMake build system. Compiled programs will
# appear in the executorch/cmake-out directory we create here.
./install_executorch.sh --clean
./install_requirements.sh --clean
(mkdir cmake-out && cd cmake-out && cmake ..)

# Build the executor_runner target
Expand All @@ -226,7 +226,7 @@ The ExecuTorch repo uses CMake to build its C++ code. Here, we'll configure it t
>
> ```bash
> # From the root of the executorch repo:
> ./install_executorch.sh --clean
> ./install_requirements.sh --clean
> git submodule sync
> git submodule update --init
> ```
Expand Down
6 changes: 3 additions & 3 deletions docs/source/llm/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ git submodule update --init
# Create a conda environment and install requirements.
conda create -yn executorch python=3.10.0
conda activate executorch
./install_executorch.sh
./install_requirements.sh

cd ../..
```
Expand Down Expand Up @@ -83,7 +83,7 @@ cd third-party/executorch
git submodule update --init

# Install requirements.
PYTHON_EXECUTABLE=python ./install_executorch.sh
PYTHON_EXECUTABLE=python ./install_requirements.sh

cd ../..
```
Expand Down Expand Up @@ -396,7 +396,7 @@ At this point, the working directory should contain the following files:

If all of these are present, you can now build and run:
```bash
./install_executorch.sh --clean
./install_requirements.sh --clean
(mkdir cmake-out && cd cmake-out && cmake ..)
cmake --build cmake-out -j10
./cmake-out/nanogpt_runner
Expand Down
4 changes: 2 additions & 2 deletions docs/source/runtime-build-and-cross-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cd executorch

# Clean and configure the CMake build system. It's good practice to do this
# whenever cloning or pulling the upstream repo.
./install_executorch.sh --clean
./install_requirements.sh --clean
(mkdir cmake-out && cd cmake-out && cmake ..)
```

Expand Down Expand Up @@ -122,7 +122,7 @@ Following are instruction on how to perform cross compilation for Android and iO
Assuming Android NDK is available, run:
```bash
# Run the following lines from the `executorch/` folder
./install_executorch.sh --clean
./install_requirements.sh --clean
mkdir cmake-android-out && cd cmake-android-out

# point -DCMAKE_TOOLCHAIN_FILE to the location where ndk is installed
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorial-xnnpack-delegate-lowering.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ After exporting the XNNPACK Delegated model, we can now try running it with exam
cd executorch

# Get a clean cmake-out directory
./install_executorch.sh --clean
./install_requirements.sh --clean
mkdir cmake-out

# Configure cmake
Expand Down
4 changes: 2 additions & 2 deletions examples/demo-apps/android/ExecuTorchDemo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export ANDROID_NDK=<path-to-android-ndk>
export ANDROID_ABI=arm64-v8a

# Run the following lines from the `executorch/` folder
./install_executorch.sh --clean
./install_requirements.sh --clean
mkdir cmake-android-out

# Build the core executorch library
Expand Down Expand Up @@ -114,7 +114,7 @@ export ANDROID_NDK=<path-to-android-ndk>
export ANDROID_ABI=arm64-v8a
export QNN_SDK_ROOT=<path-to-qnn-sdk>

./install_executorch.sh --clean
./install_requirements.sh --clean
mkdir cmake-android-out
cmake . -DCMAKE_INSTALL_PREFIX=cmake-android-out \
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ git submodule update --init
```
Install dependencies
```
./install_executorch.sh
./install_requirements.sh
```
## Setup Environment Variables
### Download Buck2 and make executable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ git submodule update --init
```
Install dependencies
```
./install_executorch.sh
./install_requirements.sh
```

## Setup QNN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ git submodule update --init
```
Install dependencies
```
./install_executorch.sh
./install_requirements.sh
```

Optional: Use the --pybind flag to install with pybindings.
```
./install_executorch.sh --pybind xnnpack
./install_requirements.sh --pybind xnnpack
```


Expand Down
Loading
Loading