Skip to content

Commit 2972388

Browse files
authored
Update docs and pins (#9781)
1 parent a5994ac commit 2972388

File tree

18 files changed

+120
-138
lines changed

18 files changed

+120
-138
lines changed

.github/workflows/apple.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
id: set_version
3838
shell: bash
3939
run: |
40-
VERSION="0.5.0.$(TZ='PST8PDT' date +%Y%m%d)"
40+
VERSION="0.7.0.$(TZ='PST8PDT' date +%Y%m%d)"
4141
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
4242
4343
build-demo-ios:

docs/README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,32 @@ To build the documentation locally:
3939

4040
1. Clone the ExecuTorch repo to your machine.
4141

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

44-
```{note}
45-
The below command generates a completely new environment and resets
46-
any existing dependencies. If you have an environment already, skip
47-
the `conda create` command.
46+
1. If you don't have it already, start either a Python virtual envitonment:
47+
48+
```bash
49+
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
4850
```
4951

52+
Or a Conda environment:
53+
5054
```bash
51-
conda create -yn executorch python=3.10.0
52-
conda activate executorch
55+
conda create -yn executorch python=3.10.0 && conda activate executorch
5356
```
5457

5558
1. Install dependencies:
5659

5760
```bash
5861
pip3 install -r ./.ci/docker/requirements-ci.txt
5962
```
60-
1. Update submodules
6163

62-
```bash
63-
git submodule sync && git submodule update --init
64-
```
6564
1. Run:
6665

6766
```bash
68-
bash install_executorch.sh
67+
./install_executorch.sh
6968
```
7069

7170
1. Go to the `docs/` directory.

docs/source/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ For a full example of running a model on Android, see the [DeepLabV3AndroidDemo]
137137
#### Installation
138138
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.
139139

140-
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.
140+
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.
141141

142142
#### Runtime APIs
143143
Models can be loaded and run from Objective-C using the C++ APIs.
@@ -151,7 +151,7 @@ ExecuTorch provides C++ APIs, which can be used to target embedded or mobile dev
151151
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.
152152

153153
```
154-
git clone -b release/0.5 https://github.com/pytorch/executorch.git
154+
git clone -b viable/strict https://github.com/pytorch/executorch.git
155155
```
156156
```python
157157
# CMakeLists.txt

docs/source/llm/getting-started.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,17 @@ Instructions on installing miniconda can be [found here](https://docs.anaconda.c
4343
mkdir et-nanogpt
4444
cd et-nanogpt
4545
46-
# Clone the ExecuTorch repository and submodules.
46+
# Clone the ExecuTorch repository.
4747
mkdir third-party
48-
git clone -b release/0.4 https://github.com/pytorch/executorch.git third-party/executorch
49-
cd third-party/executorch
50-
git submodule update --init
48+
git clone -b viable/strict https://github.com/pytorch/executorch.git third-party/executorch && cd third-party/executorch
5149
52-
# Create a conda environment and install requirements.
53-
conda create -yn executorch python=3.10.0
54-
conda activate executorch
50+
# Create either a Python virtual environment:
51+
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
52+
53+
# Or a Conda environment:
54+
conda create -yn executorch python=3.10.0 && conda activate executorch
55+
56+
# Install requirements
5557
./install_executorch.sh
5658
5759
cd ../..
@@ -76,11 +78,8 @@ pyenv install -s 3.10
7678
pyenv virtualenv 3.10 executorch
7779
pyenv activate executorch
7880
79-
# Clone the ExecuTorch repository and submodules.
80-
mkdir third-party
81-
git clone -b release/0.4 https://github.com/pytorch/executorch.git third-party/executorch
82-
cd third-party/executorch
83-
git submodule update --init
81+
# Clone the ExecuTorch repository.
82+
git clone -b viable/strict https://github.com/pytorch/executorch.git third-party/executorch && cd third-party/executorch
8483
8584
# Install requirements.
8685
PYTHON_EXECUTABLE=python ./install_executorch.sh

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

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,23 @@ portability details.
3636

3737
## Environment Setup
3838

39-
### Create a Virtual Environment
39+
### Clone ExecuTorch
4040

41-
[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.
4241
```bash
43-
# Create and activate a conda environment named "executorch"
44-
conda create -yn executorch python=3.10.0
45-
conda activate executorch
42+
# Clone the ExecuTorch repo from GitHub
43+
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
4644
```
4745

48-
### Clone ExecuTorch
46+
### Create a Virtual Environment
4947

48+
Create and activate a Python virtual environment:
5049
```bash
51-
# Clone the ExecuTorch repo from GitHub
52-
# 'main' branch is the primary development branch where you see the latest changes.
53-
# 'viable/strict' contains all of the commits on main that pass all of the necessary CI checks.
54-
git clone --branch viable/strict https://github.com/pytorch/executorch.git
55-
cd executorch
56-
57-
# Update and pull submodules
58-
git submodule sync
59-
git submodule update --init
50+
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
51+
```
52+
53+
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".
54+
```bash
55+
conda create -yn executorch python=3.10.0 && conda activate executorch
6056
```
6157

6258
## Install ExecuTorch pip package from Source

docs/source/using-executorch-ios.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The prebuilt ExecuTorch runtime, backend, and kernels are available as a [Swift
2525

2626
#### Xcode
2727

28-
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.
28+
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.
2929

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

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

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

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

109-
4. Install the required dependencies, including those needed for the backends like [Core ML](backends-coreml.md) or [MPS](backends-mps.md). Choose one:
109+
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:
110110

111111
```bash
112112
# ExecuTorch with xnnpack and CoreML backend
113-
./install_executorch.sh --pybind xnnpack
113+
./backends/apple/coreml/scripts/install_requirements.sh
114+
./install_executorch.sh --pybind coreml xnnpack
114115

115-
# Optional: ExecuTorch with xnnpack, CoreML, and MPS backend
116+
# ExecuTorch with xnnpack and MPS backend
116117
./backends/apple/mps/install_requirements.sh
117-
./install_executorch.sh --pybind xnnpack mps
118+
./install_executorch.sh --pybind mps xnnpack
118119
```
119120

120121
5. Install [CMake](https://cmake.org):

examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,29 @@ Phone verified: MediaTek Dimensity 9300 (D9300) chip.
2121
## Setup ExecuTorch
2222
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).
2323

24-
Create a Conda environment
24+
Checkout ExecuTorch repo and sync submodules
25+
2526
```
26-
conda create -yn et_mtk python=3.10.0
27-
conda activate et_mtk
27+
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
2828
```
2929

30-
Checkout ExecuTorch repo and sync submodules
30+
Create either a Python virtual environment:
31+
32+
```
33+
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
3134
```
32-
git clone https://github.com/pytorch/executorch.git
33-
cd executorch
34-
git submodule sync
35-
git submodule update --init
35+
36+
Or a Conda environment:
37+
38+
```
39+
conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack
3640
```
41+
3742
Install dependencies
3843
```
3944
./install_executorch.sh
4045
```
46+
4147
## Setup Environment Variables
4248
### Download Buck2 and make executable
4349
* Download Buck2 from the official [Release Page](https://github.com/facebook/buck2/releases/tag/2024-02-01)

examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,24 @@ Phone verified: OnePlus 12, Samsung 24+, Samsung 23
1919
## Setup ExecuTorch
2020
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).
2121

22-
Create a Conda environment
22+
Checkout ExecuTorch repo and sync submodules
23+
2324
```
24-
conda create -n et_qnn python=3.10.0
25-
conda activate et_qnn
25+
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
2626
```
2727

28-
Checkout ExecuTorch repo and sync submodules
28+
Create either a Python virtual environment:
29+
2930
```
30-
git clone https://github.com/pytorch/executorch.git
31-
cd executorch
32-
git submodule sync
33-
git submodule update --init
31+
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
3432
```
33+
34+
Or a Conda environment:
35+
36+
```
37+
conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack
38+
```
39+
3540
Install dependencies
3641
```
3742
./install_executorch.sh
@@ -74,7 +79,7 @@ cmake --build cmake-out -j16 --target install --config Release
7479
### Setup Llama Runner
7580
Next we need to build and compile the Llama runner. This is similar to the requirements for running Llama with XNNPACK.
7681
```
77-
sh examples/models/llama/install_requirements.sh
82+
./examples/models/llama/install_requirements.sh
7883
7984
cmake -DPYTHON_EXECUTABLE=python \
8085
-DCMAKE_INSTALL_PREFIX=cmake-out \

examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,34 @@ Phone verified: OnePlus 12, OnePlus 9 Pro. Samsung S23 (Llama only), Samsung S24
2121
## Setup ExecuTorch
2222
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).
2323

24-
Create a Conda environment
24+
Checkout ExecuTorch repo and sync submodules
25+
2526
```
26-
conda create -yn executorch python=3.10.0
27-
conda activate executorch
27+
git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch
2828
```
2929

30-
Checkout ExecuTorch repo and sync submodules
30+
Create either a Python virtual environment:
31+
3132
```
32-
git clone https://github.com/pytorch/executorch.git
33-
cd executorch
34-
git submodule sync
35-
git submodule update --init
33+
python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip
3634
```
37-
Install dependencies
35+
36+
Or a Conda environment:
37+
3838
```
39-
./install_executorch.sh
39+
conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack
4040
```
4141

42-
Optional: Use the --pybind flag to install with pybindings.
42+
Install dependencies
4343
```
44-
./install_executorch.sh --pybind xnnpack
44+
./install_executorch.sh
4545
```
4646

47-
4847
## Prepare Models
4948
In this demo app, we support text-only inference with up-to-date Llama models and image reasoning inference with LLaVA 1.5.
5049
* You can request and download model weights for Llama through Meta official [website](https://llama.meta.com/).
5150
* For chat use-cases, download the instruct models instead of pretrained.
52-
* Run `examples/models/llama/install_requirements.sh` to install dependencies.
51+
* Run `./examples/models/llama/install_requirements.sh` to install dependencies.
5352
* 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.
5453

5554
### For Llama 3.2 1B and 3B SpinQuant models

examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@
806806
isa = XCRemoteSwiftPackageReference;
807807
repositoryURL = "https://github.com/pytorch/executorch";
808808
requirement = {
809-
branch = "swiftpm-0.5.0.20250317";
809+
branch = "swiftpm-0.6.0";
810810
kind = branch;
811811
};
812812
};

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ Follow the [Setting Up ExecuTorch](https://pytorch.org/executorch/stable/getting
4444
tutorial to configure the basic environment:
4545

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

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

examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@
852852
isa = XCRemoteSwiftPackageReference;
853853
repositoryURL = "https://github.com/pytorch/executorch";
854854
requirement = {
855-
branch = "swiftpm-0.5.0.20250228";
855+
branch = "swiftpm-0.6.0";
856856
kind = branch;
857857
};
858858
};

0 commit comments

Comments
 (0)