Skip to content

Update docs and pins #9781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
29b4851
[Release 0.6] update CI pins (#9746)
metascroy Mar 29, 2025
196f739
[Release 0.6] Update doc getting started (#9748)
metascroy Mar 31, 2025
9fc986c
Bump swiftpm packages version
shoumikhin Mar 31, 2025
5ca71d1
Update demo app project
shoumikhin Mar 31, 2025
88dbbf4
Update llama app project
shoumikhin Mar 31, 2025
03f6f3b
Update react native project
shoumikhin Mar 31, 2025
4c1affb
Update getting-started.md
shoumikhin Mar 31, 2025
98e4bc4
Update using-executorch-ios.md
shoumikhin Mar 31, 2025
72c8fcc
Update mps_README.md
shoumikhin Mar 31, 2025
c39b9de
Update xnnpack_README.md
shoumikhin Mar 31, 2025
bae2abd
Update using-executorch-ios.md
shoumikhin Mar 31, 2025
e1ef752
Update mps_README.md
shoumikhin Mar 31, 2025
1daf5d8
Update xnnpack_README.md
shoumikhin Mar 31, 2025
3f96840
Update mps_README.md
shoumikhin Mar 31, 2025
ac8fe51
Update mediatek_README.md
shoumikhin Mar 31, 2025
ac3d009
Update qualcomm_README.md
shoumikhin Mar 31, 2025
245b3a3
Update xnnpack_README.md
shoumikhin Mar 31, 2025
c01b7c4
Update qualcomm_README.md
shoumikhin Mar 31, 2025
e55d5cd
Update README.md
shoumikhin Mar 31, 2025
884f969
Update README.md
shoumikhin Mar 31, 2025
5cea969
Update README.md
shoumikhin Mar 31, 2025
3c32143
Update README.md
shoumikhin Mar 31, 2025
5da559b
Update getting-started.md
shoumikhin Mar 31, 2025
d77ad15
Update README.md
shoumikhin Mar 31, 2025
8c53049
Update test_ios.sh
shoumikhin Mar 31, 2025
466e0c8
Update using-executorch-building-from-source.md
shoumikhin Mar 31, 2025
ab26202
Update using-executorch-ios.md
shoumikhin Mar 31, 2025
169cace
Update README.md
shoumikhin Mar 31, 2025
cb08292
Update getting-started.md
shoumikhin Mar 31, 2025
1cde639
Update getting-started.md
shoumikhin Mar 31, 2025
8bee878
Update using-executorch-building-from-source.md
shoumikhin Mar 31, 2025
46afc0a
Update using-executorch-ios.md
shoumikhin Mar 31, 2025
d53676f
Update mediatek_README.md
shoumikhin Mar 31, 2025
1f0a19f
Update qualcomm_README.md
shoumikhin Mar 31, 2025
4910f2e
Update xnnpack_README.md
shoumikhin Mar 31, 2025
561b30f
Update README.md
shoumikhin Mar 31, 2025
a1b4548
Update mps_README.md
shoumikhin Mar 31, 2025
5e96837
Update xnnpack_README.md
shoumikhin Mar 31, 2025
600ec47
Update README.md
shoumikhin Mar 31, 2025
38306a8
Reset to main branch version
shoumikhin Mar 31, 2025
04fd35f
Replace 'git clone -b release/0.6' with 'git clone'
shoumikhin Mar 31, 2025
d29ace6
Update using-executorch-ios.md
shoumikhin Mar 31, 2025
2448735
Update xnnpack_README.md
shoumikhin Mar 31, 2025
08c8600
Update mps_README.md
shoumikhin Mar 31, 2025
591cc20
Update apple.yml
shoumikhin Mar 31, 2025
e631009
git clone viable/strict
shoumikhin Mar 31, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
id: set_version
shell: bash
run: |
VERSION="0.5.0.$(TZ='PST8PDT' date +%Y%m%d)"
VERSION="0.7.0.$(TZ='PST8PDT' date +%Y%m%d)"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

build-demo-ios:
Expand Down
23 changes: 11 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,32 @@ To build the documentation locally:

1. Clone the ExecuTorch repo to your machine.

1. If you don't have it already, start a conda environment:
```bash
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
```

```{note}
The below command generates a completely new environment and resets
any existing dependencies. If you have an environment already, skip
the `conda create` command.
1. If you don't have it already, start either a Python virtual envitonment:

```bash
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
```

Or a Conda environment:

```bash
conda create -yn executorch python=3.10.0
conda activate executorch
conda create -yn executorch python=3.10.0 && conda activate executorch
```

1. Install dependencies:

```bash
pip3 install -r ./.ci/docker/requirements-ci.txt
```
1. Update submodules

```bash
git submodule sync && git submodule update --init
```
1. Run:

```bash
bash install_executorch.sh
./install_executorch.sh
```

1. Go to the `docs/` directory.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ For a full example of running a model on Android, see the [DeepLabV3AndroidDemo]
#### Installation
ExecuTorch supports both iOS and MacOS via C++, as well as hardware backends for CoreML, MPS, and CPU. The iOS runtime library is provided as a collection of .xcframework targets and are made available as a Swift PM package.

To get started with Xcode, go to File > Add Package Dependencies. Paste the URL of the ExecuTorch repo into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version in format “swiftpm-”, (e.g. “swiftpm-0.5.0”). The ExecuTorch dependency can also be added to the package file manually. See [Using ExecuTorch on iOS](using-executorch-ios.md) for more information.
To get started with Xcode, go to File > Add Package Dependencies. Paste the URL of the ExecuTorch repo into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version in format “swiftpm-”, (e.g. “swiftpm-0.6.0”). The ExecuTorch dependency can also be added to the package file manually. See [Using ExecuTorch on iOS](using-executorch-ios.md) for more information.

#### Runtime APIs
Models can be loaded and run from Objective-C using the C++ APIs.
Expand All @@ -151,7 +151,7 @@ ExecuTorch provides C++ APIs, which can be used to target embedded or mobile dev
CMake is the preferred build system for the ExecuTorch C++ runtime. To use with CMake, clone the ExecuTorch repository as a subdirectory of your project, and use CMake's `add_subdirectory("executorch")` to include the dependency. The `executorch` target, as well as kernel and backend targets will be made available to link against. The runtime can also be built standalone to support diverse toolchains. See [Using ExecuTorch with C++](using-executorch-cpp.md) for a detailed description of build integration, targets, and cross compilation.

```
git clone -b release/0.5 https://github.com/pytorch/executorch.git
git clone -b viable/strict https://github.com/pytorch/executorch.git
```
```python
# CMakeLists.txt
Expand Down
23 changes: 11 additions & 12 deletions docs/source/llm/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ Instructions on installing miniconda can be [found here](https://docs.anaconda.c
mkdir et-nanogpt
cd et-nanogpt

# Clone the ExecuTorch repository and submodules.
# Clone the ExecuTorch repository.
mkdir third-party
git clone -b release/0.4 https://github.com/pytorch/executorch.git third-party/executorch
cd third-party/executorch
git submodule update --init
git clone -b viable/strict https://github.com/pytorch/executorch.git third-party/executorch && cd third-party/executorch

# Create a conda environment and install requirements.
conda create -yn executorch python=3.10.0
conda activate executorch
# Create either a Python virtual environment:
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip

# Or a Conda environment:
conda create -yn executorch python=3.10.0 && conda activate executorch

# Install requirements
./install_executorch.sh

cd ../..
Expand All @@ -76,11 +78,8 @@ pyenv install -s 3.10
pyenv virtualenv 3.10 executorch
pyenv activate executorch

# Clone the ExecuTorch repository and submodules.
mkdir third-party
git clone -b release/0.4 https://github.com/pytorch/executorch.git third-party/executorch
cd third-party/executorch
git submodule update --init
# Clone the ExecuTorch repository.
git clone -b viable/strict https://github.com/pytorch/executorch.git third-party/executorch && cd third-party/executorch

# Install requirements.
PYTHON_EXECUTABLE=python ./install_executorch.sh
Expand Down
26 changes: 11 additions & 15 deletions docs/source/using-executorch-building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,23 @@ portability details.

## Environment Setup

### Create a Virtual Environment
### Clone ExecuTorch

[Install conda on your machine](https://conda.io/projects/conda/en/latest/user-guide/install/index.html). Then, create a virtual environment to manage our dependencies.
```bash
# Create and activate a conda environment named "executorch"
conda create -yn executorch python=3.10.0
conda activate executorch
# Clone the ExecuTorch repo from GitHub
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
```

### Clone ExecuTorch
### Create a Virtual Environment

Create and activate a Python virtual environment:
```bash
# Clone the ExecuTorch repo from GitHub
# 'main' branch is the primary development branch where you see the latest changes.
# 'viable/strict' contains all of the commits on main that pass all of the necessary CI checks.
git clone --branch viable/strict https://github.com/pytorch/executorch.git
cd executorch

# Update and pull submodules
git submodule sync
git submodule update --init
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
```

Or alternatively, [install conda on your machine](https://conda.io/projects/conda/en/latest/user-guide/install/index.html). Then, create a Conda environment named "executorch".
```bash
conda create -yn executorch python=3.10.0 && conda activate executorch
```

## Install ExecuTorch pip package from Source
Expand Down
15 changes: 8 additions & 7 deletions docs/source/using-executorch-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The prebuilt ExecuTorch runtime, backend, and kernels are available as a [Swift

#### Xcode

In Xcode, go to `File > Add Package Dependencies`. Paste the URL of the [ExecuTorch repo](https://github.com/pytorch/executorch) into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version in format "swiftpm-<version>", (e.g. "swiftpm-0.5.0"), or a branch name in format "swiftpm-<version>.<year_month_date>" (e.g. "swiftpm-0.5.0-20250228") for a nightly build on a specific date.
In Xcode, go to `File > Add Package Dependencies`. Paste the URL of the [ExecuTorch repo](https://github.com/pytorch/executorch) into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version in format "swiftpm-<version>", (e.g. "swiftpm-0.6.0"), or a branch name in format "swiftpm-<version>.<year_month_date>" (e.g. "swiftpm-0.7.0-20250401") for a nightly build on a specific date.

![](_static/img/swiftpm_xcode1.png)

Expand Down Expand Up @@ -58,7 +58,7 @@ let package = Package(
],
dependencies: [
// Use "swiftpm-<version>.<year_month_day>" branch name for a nightly build.
.package(url: "https://github.com/pytorch/executorch.git", branch: "swiftpm-0.5.0")
.package(url: "https://github.com/pytorch/executorch.git", branch: "swiftpm-0.6.0")
],
targets: [
.target(
Expand Down Expand Up @@ -97,7 +97,7 @@ xcode-select --install
2. Clone ExecuTorch:

```bash
git clone https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
```

3. Set up [Python](https://www.python.org/downloads/macos/) 3.10+ and activate a virtual environment:
Expand All @@ -106,15 +106,16 @@ git clone https://github.com/pytorch/executorch.git --depth 1 --recurse-submodul
python3 -m venv .venv && source .venv/bin/activate && ./install_requirements.sh
```

4. Install the required dependencies, including those needed for the backends like [Core ML](backends-coreml.md) or [MPS](backends-mps.md). Choose one:
4. Install the required dependencies, including those needed for the backends like [Core ML](backends-coreml.md) or [MPS](backends-mps.md). Choose one, or both:

```bash
# ExecuTorch with xnnpack and CoreML backend
./install_executorch.sh --pybind xnnpack
./backends/apple/coreml/scripts/install_requirements.sh
./install_executorch.sh --pybind coreml xnnpack

# Optional: ExecuTorch with xnnpack, CoreML, and MPS backend
# ExecuTorch with xnnpack and MPS backend
./backends/apple/mps/install_requirements.sh
./install_executorch.sh --pybind xnnpack mps
./install_executorch.sh --pybind mps xnnpack
```

5. Install [CMake](https://cmake.org):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,29 @@ Phone verified: MediaTek Dimensity 9300 (D9300) chip.
## Setup ExecuTorch
In this section, we will need to set up the ExecuTorch repo first with Conda environment management. Make sure you have Conda available in your system (or follow the instructions to install it [here](https://anaconda.org/anaconda/conda)). The commands below are running on Linux (CentOS).

Create a Conda environment
Checkout ExecuTorch repo and sync submodules

```
conda create -yn et_mtk python=3.10.0
conda activate et_mtk
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
```

Checkout ExecuTorch repo and sync submodules
Create either a Python virtual environment:

```
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
```
git clone https://github.com/pytorch/executorch.git
cd executorch
git submodule sync
git submodule update --init

Or a Conda environment:

```
conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack
```

Install dependencies
```
./install_executorch.sh
```

## Setup Environment Variables
### Download Buck2 and make executable
* Download Buck2 from the official [Release Page](https://github.com/facebook/buck2/releases/tag/2024-02-01)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,24 @@ Phone verified: OnePlus 12, Samsung 24+, Samsung 23
## Setup ExecuTorch
In this section, we will need to set up the ExecuTorch repo first with Conda environment management. Make sure you have Conda available in your system (or follow the instructions to install it [here](https://anaconda.org/anaconda/conda)). The commands below are running on Linux (CentOS).

Create a Conda environment
Checkout ExecuTorch repo and sync submodules

```
conda create -n et_qnn python=3.10.0
conda activate et_qnn
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
```

Checkout ExecuTorch repo and sync submodules
Create either a Python virtual environment:

```
git clone https://github.com/pytorch/executorch.git
cd executorch
git submodule sync
git submodule update --init
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
```

Or a Conda environment:

```
conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack
```

Install dependencies
```
./install_executorch.sh
Expand Down Expand Up @@ -74,7 +79,7 @@ cmake --build cmake-out -j16 --target install --config Release
### Setup Llama Runner
Next we need to build and compile the Llama runner. This is similar to the requirements for running Llama with XNNPACK.
```
sh examples/models/llama/install_requirements.sh
./examples/models/llama/install_requirements.sh

cmake -DPYTHON_EXECUTABLE=python \
-DCMAKE_INSTALL_PREFIX=cmake-out \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,34 @@ Phone verified: OnePlus 12, OnePlus 9 Pro. Samsung S23 (Llama only), Samsung S24
## Setup ExecuTorch
In this section, we will need to set up the ExecuTorch repo first with Conda environment management. Make sure you have Conda available in your system (or follow the instructions to install it [here](https://anaconda.org/anaconda/conda)). The commands below are running on Linux (CentOS).

Create a Conda environment
Checkout ExecuTorch repo and sync submodules

```
conda create -yn executorch python=3.10.0
conda activate executorch
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
```

Checkout ExecuTorch repo and sync submodules
Create either a Python virtual environment:

```
git clone https://github.com/pytorch/executorch.git
cd executorch
git submodule sync
git submodule update --init
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
```
Install dependencies

Or a Conda environment:

```
./install_executorch.sh
conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack
```

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


## Prepare Models
In this demo app, we support text-only inference with up-to-date Llama models and image reasoning inference with LLaVA 1.5.
* You can request and download model weights for Llama through Meta official [website](https://llama.meta.com/).
* For chat use-cases, download the instruct models instead of pretrained.
* Run `examples/models/llama/install_requirements.sh` to install dependencies.
* Run `./examples/models/llama/install_requirements.sh` to install dependencies.
* Rename tokenizer for Llama3.x with command: `mv tokenizer.model tokenizer.bin`. We are updating the demo app to support tokenizer in original format directly.

### For Llama 3.2 1B and 3B SpinQuant models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/pytorch/executorch";
requirement = {
branch = "swiftpm-0.5.0.20250317";
branch = "swiftpm-0.6.0";
kind = branch;
};
};
Expand Down
3 changes: 1 addition & 2 deletions examples/demo-apps/apple_ios/ExecuTorchDemo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Follow the [Setting Up ExecuTorch](https://pytorch.org/executorch/stable/getting
tutorial to configure the basic environment:

```bash
git clone https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules
cd executorch
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch

python3 -m venv .venv && source .venv/bin/activate

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/pytorch/executorch";
requirement = {
branch = "swiftpm-0.5.0.20250228";
branch = "swiftpm-0.6.0";
kind = branch;
};
};
Expand Down
Loading
Loading