From 1986e12b0a9a062c0d716f4d4c993b31ed5995e5 Mon Sep 17 00:00:00 2001 From: Jacob Szwejbka Date: Wed, 28 Oct 2026 13:42:38 -0700 Subject: [PATCH] [RELEASE ONLY CHANGES] Make 1.6 release docs compatible with TensorRT docs --- docs/README.md | 2 +- docs/source/getting-started.md | 22 +++++++++---------- docs/source/raspberry_pi_llama_tutorial.md | 2 +- docs/source/using-executorch-android.md | 6 ++--- .../using-executorch-building-from-source.md | 6 ++--- docs/source/using-executorch-cpp.md | 9 ++++---- docs/source/using-executorch-ios.md | 8 +++---- extension/benchmark/apple/Benchmark/README.md | 2 +- 8 files changed, 28 insertions(+), 29 deletions(-) diff --git a/docs/README.md b/docs/README.md index 78301101162..7edb171b98b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -40,7 +40,7 @@ To build the documentation locally: 1. Clone the ExecuTorch repo to your machine. ```bash - git clone -b viable/strict https://github.com/pytorch/executorch.git && cd executorch + git clone -b release/1.6 https://github.com/pytorch/executorch.git && cd executorch ``` 1. If you don't have it already, start either a Python virtual environment: diff --git a/docs/source/getting-started.md b/docs/source/getting-started.md index 3ffde9e9f9a..795f586e09c 100644 --- a/docs/source/getting-started.md +++ b/docs/source/getting-started.md @@ -17,20 +17,21 @@ The following are required to install the ExecuTorch host libraries, needed to e ## Installation To use ExecuTorch, you will need to install both the Python package and the appropriate platform-specific runtime libraries. Pip is the recommended way to install the ExecuTorch python package. Consider installing it within a virtual environment, such as one provided by [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html#creating-environments) or [venv](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments). -Install PyTorch in the same command. The ExecuTorch package does not declare it -as a dependency, because the build you need depends on your hardware, so pip -cannot choose one for you. Installing ExecuTorch on its own gives an environment -where exporting a model stops with `No module named 'torch'`. +Install PyTorch 2.15 with ExecuTorch 1.6. Choose the PyTorch build for the +hardware you will use to export models by selecting the package index below. Both packages come from the same package index. Find your machine in the table below and put the name from it in place of ``: ``` -pip install executorch torch \ +pip install executorch==1.6.0 torch==2.15.0 \ --index-url https://download.pytorch.org/whl/ \ --extra-index-url https://pypi.org/simple ``` +For a nightly build, replace `executorch==1.6.0 torch==2.15.0` with +`executorch torch` and follow the nightly index instructions below. + | Machine you export on | Variant | | --- | --- | | CPU only | `cpu` | @@ -54,8 +55,7 @@ To get a change that has landed on the `main` branch but is not in a release yet, use a nightly build. These are rebuilt every day. Put `nightly/` in front of the variant name, for example `nightly/cu132`, and add `--pre` to the command, otherwise pip skips development versions. Nightly builds cover the same -variants. CUDA 13.4 is the newest, and until the next release it is in nightly -builds only. +variants. The second index is needed because a bare `--index-url` replaces PyPI instead of adding to it, and some dependencies are published only on PyPI. @@ -215,7 +215,7 @@ execution paths on Apple platforms. The runtime libraries are distributed as To get started with Xcode, go to File > Add Package Dependencies and paste the ExecuTorch repository URL into the search bar. For Dependency Rule, select **Branch** and enter the `swiftpm-X.Y.Z` branch that matches the ExecuTorch -release used to export the model, for example `swiftpm-1.4.1`. The dependency +release used to export the model, for example `swiftpm-1.6.0`. The dependency can also be added to `Package.swift`; see [Using ExecuTorch on iOS](using-executorch-ios.md) for details. @@ -231,11 +231,11 @@ For more information on iOS integration, including an API reference, logging set ExecuTorch provides C++ APIs, which can be used to target embedded or mobile devices. The C++ APIs provide a greater level of control compared to other language bindings, allowing for advanced memory management, data loading, and platform integration. #### Installation -On Linux and macOS, current main/nightly wheels ship the runtime as prebuilt +On Linux and macOS, ExecuTorch 1.6 wheels ship the runtime as prebuilt libraries with headers and a CMake package, so there is nothing to build: ``` -pip install --upgrade --pre executorch --extra-index-url https://download.pytorch.org/whl/nightly/cpu +pip install executorch==1.6.0 torch==2.15.0 --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple ``` ```cmake @@ -251,7 +251,7 @@ For a platform the package does not cover, or to change build options, build fro 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) and [Building from Source](using-executorch-building-from-source.md) for a detailed description of build integration, targets, and cross compilation. ``` -git clone -b viable/strict https://github.com/pytorch/executorch.git +git clone -b release/1.6 https://github.com/pytorch/executorch.git ``` ```cmake # Set CMAKE_CXX_STANDARD to 17 or above. diff --git a/docs/source/raspberry_pi_llama_tutorial.md b/docs/source/raspberry_pi_llama_tutorial.md index a32249a38df..2c7c2c6b9d5 100644 --- a/docs/source/raspberry_pi_llama_tutorial.md +++ b/docs/source/raspberry_pi_llama_tutorial.md @@ -57,7 +57,7 @@ First, clone the ExecuTorch repository with the Raspberry Pi support: ```bash # Create project directory -mkdir ~/executorch-rpi && cd ~/executorch-rpi && git clone -b release/1.0 https://github.com/pytorch/executorch.git && +mkdir ~/executorch-rpi && cd ~/executorch-rpi && git clone -b release/1.6 https://github.com/pytorch/executorch.git && cd executorch ``` diff --git a/docs/source/using-executorch-android.md b/docs/source/using-executorch-android.md index 47b29c9a8de..8b09433e118 100644 --- a/docs/source/using-executorch-android.md +++ b/docs/source/using-executorch-android.md @@ -76,11 +76,11 @@ and `FLAVOR` is `xnnpack`, `qnn`, or `vulkan`. Match the version and backend to the model export. The QNN flavor also needs the separate [Qualcomm runtime dependency](#qualcomm-qnn-dependency). -For example, download the XNNPACK 1.4.1 artifact and verify its checksum: +For example, download the XNNPACK 1.6.0 artifact and verify its checksum: ```sh -curl -fLO https://ossci-android.s3.amazonaws.com/executorch/release/1.4.1-xnnpack/executorch.aar -curl -fLO https://ossci-android.s3.amazonaws.com/executorch/release/1.4.1-xnnpack/executorch.aar.sha256sums +curl -fLO https://ossci-android.s3.amazonaws.com/executorch/release/1.6.0-xnnpack/executorch.aar +curl -fLO https://ossci-android.s3.amazonaws.com/executorch/release/1.6.0-xnnpack/executorch.aar.sha256sums shasum -a 256 -c executorch.aar.sha256sums ``` diff --git a/docs/source/using-executorch-building-from-source.md b/docs/source/using-executorch-building-from-source.md index 94dc158198e..9a1ff0316d7 100644 --- a/docs/source/using-executorch-building-from-source.md +++ b/docs/source/using-executorch-building-from-source.md @@ -1,6 +1,6 @@ # Building from Source -On Linux and macOS you may not need to build at all. Current main/nightly wheels +On Linux and macOS you may not need to build at all. ExecuTorch 1.6 wheels ship the runtime as prebuilt libraries with headers and a CMake package, so a C++ program can link it directly. See [Using the prebuilt libraries from the pip package](using-executorch-cpp.md#using-the-prebuilt-libraries-from-the-pip-package), @@ -55,7 +55,7 @@ portability details. ## Environment Setup Clone the ExecuTorch repository from GitHub and create a conda environment. Venv can be used in place of conda. ```bash - git clone -b viable/strict --recurse-submodules https://github.com/pytorch/executorch.git + git clone -b release/1.6 --recurse-submodules https://github.com/pytorch/executorch.git cd executorch conda create -yn executorch python=3.11 conda activate executorch @@ -87,7 +87,7 @@ portability details. * `--optional-dependency `: Install an optional Python dependency set. Repeat the flag to select more than one. Supported names are `ethos_u`, `vgf`, and `openvino`. - * `--use-pt-pinned-commit`: Install the pinned PyTorch commit or release version. When not specified, the latest PyTorch nightly build is installed. + * `--use-pt-pinned-commit`: Use the PyTorch version already installed for the pinned source commit. When not specified, PyTorch 2.15.0 is installed. For example, install the current checkout with the dependencies needed for Ethos-U ahead-of-time (AOT) export: diff --git a/docs/source/using-executorch-cpp.md b/docs/source/using-executorch-cpp.md index 8b0c8df29b4..2f66ed3fa46 100644 --- a/docs/source/using-executorch-cpp.md +++ b/docs/source/using-executorch-cpp.md @@ -40,14 +40,14 @@ Running a model using the low-level runtime APIs allows for a high-degree of con ## Building with CMake -There are two ways to get the C++ runtime. Current main/nightly wheels include +There are two ways to get the C++ runtime. ExecuTorch 1.6 wheels include prebuilt libraries and need no source checkout. Building from source gives you every option the project has and is required for a platform the wheel does not cover. ### Using the prebuilt libraries from the pip package -On Linux, macOS and Windows, current main/nightly wheels ship the runtime as prebuilt +On Linux, macOS and Windows, ExecuTorch 1.6 wheels ship the runtime as prebuilt shared libraries together with the headers and a CMake package. Stable releases from before this packaging was introduced do not contain the namespaced CMake targets used below; use the documentation for your installed release. @@ -59,11 +59,10 @@ Copy these three files into an empty folder and follow along. No prior CMake kno **1. Install, and make a model file.** ``` -pip install --upgrade --pre executorch torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu +pip install executorch==1.6.0 torch==2.15.0 --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple ``` -`torch` is installed explicitly because nightly ExecuTorch wheels do not declare -it as a dependency. Python and PyTorch are needed to create the model file in +Python and PyTorch are needed to create the model file in step 1, but not to run the compiled C++ program. A C++ program loads a `.pte` file, which is a model that has already been exported. C++ cannot diff --git a/docs/source/using-executorch-ios.md b/docs/source/using-executorch-ios.md index 19be460d6f9..8d145ae740a 100644 --- a/docs/source/using-executorch-ios.md +++ b/docs/source/using-executorch-ios.md @@ -34,10 +34,10 @@ The prebuilt ExecuTorch runtime, backend, and kernels are available as a [Swift 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. For Dependency Rule, select **Branch** and enter -`swiftpm-` for a stable release (for example, `swiftpm-1.4.1`), or +`swiftpm-` for a stable release (for example, `swiftpm-1.6.0`), or `swiftpm-.` for a [nightly build](https://ossci-ios.s3.amazonaws.com/list.html) on a specific date -(for example, `swiftpm-1.5.0.20260909`). Match this version to the one used to +(for example, `swiftpm-1.6.0.20261027`). Match this version to the one used to export the model. ![](_static/img/swiftpm_xcode1.png) @@ -60,7 +60,7 @@ Add a package and target dependencies on ExecuTorch to your package file like th // swift-tools-version:5.9 import PackageDescription -let executorchVersion = "1.4.1" // Match the release used to export the model. +let executorchVersion = "1.6.0" // Match the release used to export the model. let package = Package( name: "YourPackageName", @@ -125,7 +125,7 @@ xcode-select --install 2. Clone ExecuTorch: ```bash -git clone -b viable/strict https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch +git clone -b release/1.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch ``` 3. Set up [Python](https://www.python.org/downloads/macos/) 3.10+ and activate a virtual environment: diff --git a/extension/benchmark/apple/Benchmark/README.md b/extension/benchmark/apple/Benchmark/README.md index 25e78a39462..7ac819498ad 100644 --- a/extension/benchmark/apple/Benchmark/README.md +++ b/extension/benchmark/apple/Benchmark/README.md @@ -24,7 +24,7 @@ It provides a flexible framework for dynamically generating and running performa To get started, clone the ExecuTorch repository and cd into the source code directory: ```bash -git clone -b viable/strict https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch +git clone -b release/1.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch ``` This command performs a shallow clone to speed up the process.