From 10c791a919e8c17c2bb67126400007b009a6ec58 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:38:45 -0700 Subject: [PATCH 01/37] Bump swiftpm packages version --- .github/workflows/apple.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/apple.yml b/.github/workflows/apple.yml index 9dafaf67b1..43d35c7c4a 100644 --- a/.github/workflows/apple.yml +++ b/.github/workflows/apple.yml @@ -37,7 +37,7 @@ jobs: id: set_version shell: bash run: | - VERSION="0.5.0.$(TZ='PST8PDT' date +%Y%m%d)" + VERSION="0.6.0" echo "version=$VERSION" >> "$GITHUB_OUTPUT" build-demo-ios: @@ -212,7 +212,7 @@ jobs: name: executorch-frameworks-ios path: ${{ runner.temp }}/frameworks-ios/ - name: Only push to S3 when running the workflow manually from main branch - if: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }} + if: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/release/0.6' }} shell: bash run: | echo "UPLOAD_ON_MAIN=1" >> "${GITHUB_ENV}" From 9385137712b0f4e9125eae5bb4f22af0d0910288 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:41:10 -0700 Subject: [PATCH 02/37] Update demo app project --- .../ExecuTorchDemo/ExecuTorchDemo.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo.xcodeproj/project.pbxproj b/examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo.xcodeproj/project.pbxproj index 2ee4db5361..7c88eff27a 100644 --- a/examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo.xcodeproj/project.pbxproj +++ b/examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo.xcodeproj/project.pbxproj @@ -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; }; }; From 76cc9ec2c0f55b7bd9974f60897a2ebd3b9141b0 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:41:42 -0700 Subject: [PATCH 03/37] Update llama app project --- .../demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj b/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj index a067873a0b..0cfc4ddaa7 100644 --- a/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj +++ b/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj @@ -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; }; }; From be3bdc46300ae7765ec083d90becd6acffa99504 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:42:50 -0700 Subject: [PATCH 04/37] Update react native project --- .../react-native/rnllama/ios/rnllama.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo-apps/react-native/rnllama/ios/rnllama.xcodeproj/project.pbxproj b/examples/demo-apps/react-native/rnllama/ios/rnllama.xcodeproj/project.pbxproj index 612dd410a1..ea08f8cf77 100644 --- a/examples/demo-apps/react-native/rnllama/ios/rnllama.xcodeproj/project.pbxproj +++ b/examples/demo-apps/react-native/rnllama/ios/rnllama.xcodeproj/project.pbxproj @@ -947,7 +947,7 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/pytorch/executorch.git"; requirement = { - branch = "swiftpm-0.5.0.20250228"; + branch = "swiftpm-0.6.0"; kind = branch; }; }; From d3200abf8e151baf6d42e545c90b28e66391634a Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:44:01 -0700 Subject: [PATCH 05/37] Update getting-started.md --- docs/source/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/getting-started.md b/docs/source/getting-started.md index ddc7571944..a11856421d 100644 --- a/docs/source/getting-started.md +++ b/docs/source/getting-started.md @@ -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. From 2c5f633f5ac5d480e7b27deb34079b6234d62799 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:45:05 -0700 Subject: [PATCH 06/37] Update using-executorch-ios.md --- docs/source/using-executorch-ios.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/using-executorch-ios.md b/docs/source/using-executorch-ios.md index 70c2b366fa..b406b1259e 100644 --- a/docs/source/using-executorch-ios.md +++ b/docs/source/using-executorch-ios.md @@ -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-", (e.g. "swiftpm-0.5.0"), or a branch name in format "swiftpm-." (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-", (e.g. "swiftpm-0.6.0"), or a branch name in format "swiftpm-." (e.g. "swiftpm-0.6.0-20250501") for a nightly build on a specific date. ![](_static/img/swiftpm_xcode1.png) @@ -58,7 +58,7 @@ let package = Package( ], dependencies: [ // Use "swiftpm-." 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( From b9ab5e783f87c339d2c4ec7eac0e1bcb34cf52e2 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:47:49 -0700 Subject: [PATCH 07/37] Update mps_README.md --- examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md index f5292fe5c0..be7c83da60 100644 --- a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md +++ b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md @@ -76,7 +76,7 @@ sudo /Applications/CMake.app/Contents/bin/cmake-gui --install The prebuilt ExecuTorch runtime, backend, and kernels are available as a Swift PM package. ### Xcode -Open the project in Xcode.In 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, e.g., “swiftpm-0.5.0”, or a branch name in format "swiftpm-." (e.g. "swiftpm-0.5.0-20250228") for a nightly build on a specific date. +Open the project in Xcode.In 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, e.g., “swiftpm-0.6.0”, or a branch name in format "swiftpm-." (e.g. "swiftpm-0.6.0-20250501") for a nightly build on a specific date. Note: If you're running into any issues related to package dependencies, quit Xcode entirely, delete the whole executorch repo, clean the caches by running the command below in terminal and clone the repo again. From 70d300c6528a40dc9ad165d03f1e53c623cd364b Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:48:31 -0700 Subject: [PATCH 08/37] Update xnnpack_README.md --- .../apple_ios/LLaMA/docs/delegates/xnnpack_README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md index c45871a1fe..13f88ae1f3 100644 --- a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md +++ b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md @@ -130,9 +130,9 @@ While we recommended using the latest prebuilt package pre-configured with the X Go to Project Navigator, click on LLaMA. `Project --> LLaMA --> Package Dependencies`, and update the package dependencies to any of the available options below: -- Branch --> swiftpm-0.5.0.20250228 (amend to match the latest nightly build) +- Branch --> swiftpm-0.6.0.20250501 (amend to match the latest nightly build) +- Branch --> swiftpm-0.6.0 - Branch --> swiftpm-0.5.0 -- Branch --> swiftpm-0.4.0 ### 2.2 Manually build the package locally and link them From 90cffa56fabba2daab5ed00b9be9694b48001aac Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:52:33 -0700 Subject: [PATCH 09/37] Update using-executorch-ios.md --- docs/source/using-executorch-ios.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/using-executorch-ios.md b/docs/source/using-executorch-ios.md index b406b1259e..8b9f5544d8 100644 --- a/docs/source/using-executorch-ios.md +++ b/docs/source/using-executorch-ios.md @@ -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 release/0.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: From d0ce19a752efe4aac31207d938b17addf8c1f345 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 12:57:22 -0700 Subject: [PATCH 10/37] Update mps_README.md --- .../LLaMA/docs/delegates/mps_README.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md index be7c83da60..588d1b2b4d 100644 --- a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md +++ b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md @@ -24,16 +24,14 @@ conda activate et_mps Checkout ExecuTorch repo and sync submodules ``` -git clone https://github.com/pytorch/executorch.git -cd executorch -git submodule sync -git submodule update --init +git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch ``` Install dependencies ``` ./install_executorch.sh +./backends/apple/mps/install_requirements.sh ``` ## Prepare Models @@ -42,7 +40,7 @@ In this demo app, we support text-only inference with Llama 3.1, Llama 3, and Ll Install the required packages to export the model ``` -sh examples/models/llama/install_requirements.sh +./examples/models/llama/install_requirements.sh ``` Export the model @@ -78,16 +76,6 @@ The prebuilt ExecuTorch runtime, backend, and kernels are available as a Swift P ### Xcode Open the project in Xcode.In 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, e.g., “swiftpm-0.6.0”, or a branch name in format "swiftpm-." (e.g. "swiftpm-0.6.0-20250501") for a nightly build on a specific date. -Note: If you're running into any issues related to package dependencies, quit Xcode entirely, delete the whole executorch repo, clean the caches by running the command below in terminal and clone the repo again. - -``` -rm -rf \ - ~/Library/org.swift.swiftpm \ - ~/Library/Caches/org.swift.swiftpm \ - ~/Library/Caches/com.apple.dt.Xcode \ - ~/Library/Developer/Xcode/DerivedData -``` - Link your binary with the ExecuTorch runtime and any backends or kernels used by the exported ML model. It is recommended to link the core runtime to the components that use ExecuTorch directly, and link kernels and backends against the main app target. Note: To access logs, link against the Debug build of the ExecuTorch runtime, i.e., the executorch_debug framework. For optimal performance, always link against the Release version of the deliverables (those without the _debug suffix), which have all logging overhead removed. From 07c105ee635098f204be0e91e72ad0bdf7ab3074 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:00:31 -0700 Subject: [PATCH 11/37] Update xnnpack_README.md --- .../LLaMA/docs/delegates/xnnpack_README.md | 40 +++++++------------ 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md index 13f88ae1f3..d78b2960a0 100644 --- a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md +++ b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md @@ -13,31 +13,31 @@ More specifically, it covers: ## 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://conda.io/projects/conda/en/latest/user-guide/install/index.html)). The commands below are running on Linux (CentOS). -Create a Conda environment +Checkout ExecuTorch repo and sync submodules ``` -conda create -n et_xnnpack python=3.10.0 -conda activate et_xnnpack +git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && 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/). @@ -45,8 +45,9 @@ In this demo app, we support text-only inference with up-to-date Llama models an * Install the required packages to export the model: ``` -sh examples/models/llama/install_requirements.sh +./examples/models/llama/install_requirements.sh ``` + ### For Llama 3.2 1B and 3B SpinQuant models Meta has released prequantized INT4 SpinQuant Llama 3.2 models that ExecuTorch supports on the XNNPACK backend. * Export Llama model and generate .pte file as below: @@ -112,19 +113,6 @@ There are two options to add ExecuTorch runtime package into your XCode project: The current XCode project is pre-configured to automatically download and link the latest prebuilt package via Swift Package Manager. -If you have an old ExecuTorch package cached before in XCode, or are running into any package dependencies issues (incorrect checksum hash, missing package, outdated package), close XCode and run the following command in terminal inside your ExecuTorch directory - -``` -rm -rf \ - ~/Library/org.swift.swiftpm \ - ~/Library/Caches/org.swift.swiftpm \ - ~/Library/Caches/com.apple.dt.Xcode \ - ~/Library/Developer/Xcode/DerivedData \ - examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.xcworkspace/xcshareddata/swiftpm -``` - -The command above will clear all the package cache, and when you re-open the XCode project, it should re-download the latest package and link them correctly. - #### (Optional) Changing the prebuilt package version While we recommended using the latest prebuilt package pre-configured with the XCode project, you can also change the package version manually to your desired version. From 0dc33943d1a767694207ee6084370d70a654cebd Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:01:25 -0700 Subject: [PATCH 12/37] Update mps_README.md --- .../apple_ios/LLaMA/docs/delegates/mps_README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md index 588d1b2b4d..a78a802e60 100644 --- a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md +++ b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md @@ -14,17 +14,23 @@ More specifically, it covers: ## 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://conda.io/projects/conda/en/latest/user-guide/install/index.html)). The commands below are running on Linux (CentOS). -Create a Conda environment +Checkout ExecuTorch repo and sync submodules ``` -conda create -n et_mps python=3.10.0 -conda activate et_mps +git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch ``` -Checkout ExecuTorch repo and sync submodules +Create either a Python virtual environment: ``` -git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch +python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip +``` + +Or a Conda environment + +``` +conda create -n et_mps python=3.10.0 +conda activate et_mps ``` Install dependencies From 0301db6180d8af7a4da17edf6b6859a0fe2e0621 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:06:21 -0700 Subject: [PATCH 13/37] Update mediatek_README.md --- .../docs/delegates/mediatek_README.md | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md index 4d1346963c..3216df8891 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md @@ -21,23 +21,30 @@ 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 release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && 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) From 7a8d339ce492a93e539a657281e71074a861c579 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:06:56 -0700 Subject: [PATCH 14/37] Update qualcomm_README.md --- .../docs/delegates/qualcomm_README.md | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md index 92afe613f7..8c4c54f3e9 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md @@ -19,19 +19,25 @@ 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 release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && 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 From beb1c98b28a59860ee07abd63e32070fd895ce22 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:07:34 -0700 Subject: [PATCH 15/37] Update xnnpack_README.md --- .../docs/delegates/xnnpack_README.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md index 2b9bad21b7..244d418a05 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md @@ -21,35 +21,35 @@ 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 release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && 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 From 648b848a870a02cbd9887a16e0f00249884369f9 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:07:53 -0700 Subject: [PATCH 16/37] Update qualcomm_README.md --- .../android/LlamaDemo/docs/delegates/qualcomm_README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md index 8c4c54f3e9..4e7d9bdda7 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md @@ -80,7 +80,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 \ From e63d327d7dde71c81067be28a6444fdaa1ecbb50 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:10:37 -0700 Subject: [PATCH 17/37] Update README.md --- extension/benchmark/apple/Benchmark/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/benchmark/apple/Benchmark/README.md b/extension/benchmark/apple/Benchmark/README.md index e993ae4f97..8088878179 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 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules +git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules cd executorch ``` From 514edcc7917589152f801721fbe2ed1bae818970 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:12:44 -0700 Subject: [PATCH 18/37] Update README.md --- examples/demo-apps/apple_ios/ExecuTorchDemo/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo-apps/apple_ios/ExecuTorchDemo/README.md b/examples/demo-apps/apple_ios/ExecuTorchDemo/README.md index 844c83d220..53e338cb36 100644 --- a/examples/demo-apps/apple_ios/ExecuTorchDemo/README.md +++ b/examples/demo-apps/apple_ios/ExecuTorchDemo/README.md @@ -44,7 +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 +git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules cd executorch python3 -m venv .venv && source .venv/bin/activate From a8c38a890e06ed524eeb0507dd460fa9c3ae357c Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:14:06 -0700 Subject: [PATCH 19/37] Update README.md --- examples/demo-apps/react-native/rnllama/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo-apps/react-native/rnllama/README.md b/examples/demo-apps/react-native/rnllama/README.md index 33c607d635..e08e3820cd 100644 --- a/examples/demo-apps/react-native/rnllama/README.md +++ b/examples/demo-apps/react-native/rnllama/README.md @@ -20,7 +20,7 @@ A React Native mobile application for running LLaMA language models using ExecuT ## Installation -1. Clone the repository: `git clone git@github.com:pytorch/executorch.git` +1. Clone the repository: `git clone -b release/0.6 git@github.com:pytorch/executorch.git` 2. Navigate to the root of the repository: `cd executorch` From 8883c21ae56306f2a936632d3b115e984d538945 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:17:28 -0700 Subject: [PATCH 20/37] Update README.md --- docs/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/README.md b/docs/README.md index dd1fded5aa..f617447eaf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -39,14 +39,18 @@ 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 release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && 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 @@ -57,15 +61,11 @@ To build the documentation locally: ```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. From 84f6313b052fa6e7cad8feb40a85b9309b47516a Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:20:37 -0700 Subject: [PATCH 21/37] Update getting-started.md --- docs/source/llm/getting-started.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/source/llm/getting-started.md b/docs/source/llm/getting-started.md index 066bb3f3d1..3d22906d8b 100644 --- a/docs/source/llm/getting-started.md +++ b/docs/source/llm/getting-started.md @@ -45,13 +45,17 @@ cd et-nanogpt # Clone the ExecuTorch repository and submodules. mkdir third-party -git clone -b release/0.4 https://github.com/pytorch/executorch.git third-party/executorch +git clone -b release/0.6 https://github.com/pytorch/executorch.git third-party/executorch --depth 1 --recurse-submodules --shallow-submodules cd third-party/executorch -git submodule update --init -# Create a conda environment and install requirements. +# 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 ../.. @@ -78,9 +82,8 @@ 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 +git clone -b release/0.6 https://github.com/pytorch/executorch.git third-party/executorch --depth 1 --recurse-submodules --shallow-submodules cd third-party/executorch -git submodule update --init # Install requirements. PYTHON_EXECUTABLE=python ./install_executorch.sh From c1894f816596afc3bd59607d0b6f23f8674a5242 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:21:28 -0700 Subject: [PATCH 22/37] Update README.md --- examples/llm_pte_finetuning/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/llm_pte_finetuning/README.md b/examples/llm_pte_finetuning/README.md index bdd317109e..8aeea31608 100644 --- a/examples/llm_pte_finetuning/README.md +++ b/examples/llm_pte_finetuning/README.md @@ -7,7 +7,7 @@ In this tutorial, we show how to fine-tune an LLM using executorch. You will need to have a model's checkpoint, in the Hugging Face format. For example: ```console -git clone git clone https://huggingface.co/Qwen/Qwen2-0.5B-Instruct +git clone https://huggingface.co/Qwen/Qwen2-0.5B-Instruct ``` You will need to install [torchtune](https://github.com/pytorch/torchtune) following [its installation instructions](https://github.com/pytorch/torchtune?tab=readme-ov-file#installation). From fe16841e480b0edb27619c94416f4a8b6996aee8 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:22:15 -0700 Subject: [PATCH 23/37] Update test_ios.sh --- scripts/test_ios.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test_ios.sh b/scripts/test_ios.sh index 09461e0953..b93d3378ff 100755 --- a/scripts/test_ios.sh +++ b/scripts/test_ios.sh @@ -47,7 +47,7 @@ say() { say "Cloning the Code" pushd . > /dev/null -git clone https://github.com/pytorch/executorch.git "$OUTPUT" +git clone -b release/0.6 https://github.com/pytorch/executorch.git "$OUTPUT" cd "$OUTPUT" say "Updating the Submodules" From 5fe7d754936ac7648bd404022283a7533f5a6b83 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:30:29 -0700 Subject: [PATCH 24/37] Update using-executorch-building-from-source.md --- .../using-executorch-building-from-source.md | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/docs/source/using-executorch-building-from-source.md b/docs/source/using-executorch-building-from-source.md index 345f0324d5..505e2d40cc 100644 --- a/docs/source/using-executorch-building-from-source.md +++ b/docs/source/using-executorch-building-from-source.md @@ -36,27 +36,25 @@ 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 release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules + 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 + python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip + ``` - # Update and pull submodules - git submodule sync - git submodule update --init +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 From 2d5adcc5fb591705d099a02130d17e1fb66c381b Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:37:22 -0700 Subject: [PATCH 25/37] Update using-executorch-ios.md --- docs/source/using-executorch-ios.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/source/using-executorch-ios.md b/docs/source/using-executorch-ios.md index 8b9f5544d8..62799233af 100644 --- a/docs/source/using-executorch-ios.md +++ b/docs/source/using-executorch-ios.md @@ -106,15 +106,16 @@ git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --r 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): From 94961d4b908a0ec9b07eebd1fb9c74e795201ff3 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:52:55 -0700 Subject: [PATCH 26/37] Update README.md --- docs/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index f617447eaf..20476f3c16 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 release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch + git clone -b release/0.6 https://github.com/pytorch/executorch.git && cd executorch ``` 1. If you don't have it already, start either a Python virtual envitonment: @@ -52,8 +52,7 @@ To build the documentation locally: 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: From 5e1b24d7a9dea00e465806edcb4f0529fdc4bd7c Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:53:41 -0700 Subject: [PATCH 27/37] Update getting-started.md --- docs/source/llm/getting-started.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/source/llm/getting-started.md b/docs/source/llm/getting-started.md index 3d22906d8b..7aa8d03fe2 100644 --- a/docs/source/llm/getting-started.md +++ b/docs/source/llm/getting-started.md @@ -45,15 +45,13 @@ cd et-nanogpt # Clone the ExecuTorch repository and submodules. mkdir third-party -git clone -b release/0.6 https://github.com/pytorch/executorch.git third-party/executorch --depth 1 --recurse-submodules --shallow-submodules -cd third-party/executorch +git clone -b release/0.6 https://github.com/pytorch/executorch.git third-party/executorch && cd third-party/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 +conda create -yn executorch python=3.10.0 && conda activate executorch # Install requirements ./install_executorch.sh From 53172e197893fb228ac37b6a9ca9ebe992ca5240 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:54:33 -0700 Subject: [PATCH 28/37] Update getting-started.md --- docs/source/llm/getting-started.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/source/llm/getting-started.md b/docs/source/llm/getting-started.md index 7aa8d03fe2..a4ff2b6fad 100644 --- a/docs/source/llm/getting-started.md +++ b/docs/source/llm/getting-started.md @@ -43,7 +43,7 @@ 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.6 https://github.com/pytorch/executorch.git third-party/executorch && cd third-party/executorch @@ -78,10 +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.6 https://github.com/pytorch/executorch.git third-party/executorch --depth 1 --recurse-submodules --shallow-submodules -cd third-party/executorch +# Clone the ExecuTorch repository. +git clone -b release/0.6 https://github.com/pytorch/executorch.git third-party/executorch && cd third-party/executorch # Install requirements. PYTHON_EXECUTABLE=python ./install_executorch.sh From 0787117fc05313906afd8ff46364da1a855b7490 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:55:36 -0700 Subject: [PATCH 29/37] Update using-executorch-building-from-source.md --- docs/source/using-executorch-building-from-source.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/source/using-executorch-building-from-source.md b/docs/source/using-executorch-building-from-source.md index 505e2d40cc..093e8e3386 100644 --- a/docs/source/using-executorch-building-from-source.md +++ b/docs/source/using-executorch-building-from-source.md @@ -40,8 +40,7 @@ portability details. ```bash # Clone the ExecuTorch repo from GitHub - git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules - cd executorch + git clone -b release/0.6 https://github.com/pytorch/executorch.git && cd executorch ``` ### Create a Virtual Environment @@ -53,8 +52,7 @@ Create and activate a Python virtual environment: 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 + conda create -yn executorch python=3.10.0 && conda activate executorch ``` ## Install ExecuTorch pip package from Source From 4efbe31a923e4d86cfe73f6de512f4fe9d028955 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:56:28 -0700 Subject: [PATCH 30/37] Update using-executorch-ios.md --- docs/source/using-executorch-ios.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/using-executorch-ios.md b/docs/source/using-executorch-ios.md index 62799233af..56f9084376 100644 --- a/docs/source/using-executorch-ios.md +++ b/docs/source/using-executorch-ios.md @@ -97,7 +97,7 @@ xcode-select --install 2. Clone ExecuTorch: ```bash -git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch +git clone -b release/0.6 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: From b5b1d5791d719e653c7656d3aa462dfba0930ca2 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:57:21 -0700 Subject: [PATCH 31/37] Update mediatek_README.md --- .../android/LlamaDemo/docs/delegates/mediatek_README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md index 3216df8891..dabe0b6dc6 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md @@ -24,7 +24,7 @@ In this section, we will need to set up the ExecuTorch repo first with Conda env Checkout ExecuTorch repo and sync submodules ``` -git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch +git clone -b release/0.6 https://github.com/pytorch/executorch.git && cd executorch ``` Create either a Python virtual environment: @@ -36,8 +36,7 @@ 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 +conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack ``` Install dependencies From cb6316e1ddff6c7fd6bdf1ef22c5bc87d4139958 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:57:54 -0700 Subject: [PATCH 32/37] Update qualcomm_README.md --- .../android/LlamaDemo/docs/delegates/qualcomm_README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md index 4e7d9bdda7..bb14e7d295 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md @@ -22,7 +22,7 @@ In this section, we will need to set up the ExecuTorch repo first with Conda env Checkout ExecuTorch repo and sync submodules ``` -git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch +git clone -b release/0.6 https://github.com/pytorch/executorch.git && cd executorch ``` Create either a Python virtual environment: @@ -34,8 +34,7 @@ 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 +conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack ``` Install dependencies From 57cee8164f7b31ed27d74b9b21850e13ebbce33d Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:58:43 -0700 Subject: [PATCH 33/37] Update xnnpack_README.md --- .../android/LlamaDemo/docs/delegates/xnnpack_README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md index 244d418a05..6192624647 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md @@ -24,7 +24,7 @@ In this section, we will need to set up the ExecuTorch repo first with Conda env Checkout ExecuTorch repo and sync submodules ``` -git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch +git clone -b release/0.6 https://github.com/pytorch/executorch.git && cd executorch ``` Create either a Python virtual environment: @@ -36,8 +36,7 @@ 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 +conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack ``` Install dependencies From 658a0491292e5d312db947372a3dd4da309746f7 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 13:59:32 -0700 Subject: [PATCH 34/37] Update README.md --- examples/demo-apps/apple_ios/ExecuTorchDemo/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/demo-apps/apple_ios/ExecuTorchDemo/README.md b/examples/demo-apps/apple_ios/ExecuTorchDemo/README.md index 53e338cb36..0a44de8268 100644 --- a/examples/demo-apps/apple_ios/ExecuTorchDemo/README.md +++ b/examples/demo-apps/apple_ios/ExecuTorchDemo/README.md @@ -44,8 +44,7 @@ Follow the [Setting Up ExecuTorch](https://pytorch.org/executorch/stable/getting tutorial to configure the basic environment: ```bash -git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules -cd executorch +git clone -b release/0.6 https://github.com/pytorch/executorch.git && cd executorch python3 -m venv .venv && source .venv/bin/activate From f4420052d47d99f3b1cb71cd67c850b5e3f908bb Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 14:00:24 -0700 Subject: [PATCH 35/37] Update mps_README.md --- .../demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md index a78a802e60..dd0dfda733 100644 --- a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md +++ b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md @@ -17,7 +17,7 @@ In this section, we will need to set up the ExecuTorch repo first with Conda env Checkout ExecuTorch repo and sync submodules ``` -git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch +git clone -b release/0.6 https://github.com/pytorch/executorch.git && cd executorch ``` Create either a Python virtual environment: @@ -29,8 +29,7 @@ python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip Or a Conda environment ``` -conda create -n et_mps python=3.10.0 -conda activate et_mps +conda create -n et_mps python=3.10.0 && conda activate et_mps ``` Install dependencies From 7892a91b540a8edbba4add79bc582cdc4520b35d Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 14:00:59 -0700 Subject: [PATCH 36/37] Update xnnpack_README.md --- .../apple_ios/LLaMA/docs/delegates/xnnpack_README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md index d78b2960a0..687ef034bd 100644 --- a/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md +++ b/examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md @@ -16,7 +16,7 @@ In this section, we will need to set up the ExecuTorch repo first with Conda env Checkout ExecuTorch repo and sync submodules ``` -git clone -b release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules && cd executorch +git clone -b release/0.6 https://github.com/pytorch/executorch.git && cd executorch ``` Create either a Python virtual environment: @@ -28,8 +28,7 @@ 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 +conda create -n et_xnnpack python=3.10.0 && conda activate et_xnnpack ``` Install dependencies From bd8691ad47cf525e9bf77f8fc2eee475ee336abe Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 31 Mar 2025 14:01:44 -0700 Subject: [PATCH 37/37] Update README.md --- extension/benchmark/apple/Benchmark/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extension/benchmark/apple/Benchmark/README.md b/extension/benchmark/apple/Benchmark/README.md index 8088878179..5f54f5bd30 100644 --- a/extension/benchmark/apple/Benchmark/README.md +++ b/extension/benchmark/apple/Benchmark/README.md @@ -24,8 +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 release/0.6 https://github.com/pytorch/executorch.git --depth 1 --recurse-submodules --shallow-submodules -cd executorch +git clone -b release/0.6 https://github.com/pytorch/executorch.git && cd executorch ``` This command performs a shallow clone to speed up the process.