diff --git a/backends/apple/coreml/setup.md b/backends/apple/coreml/setup.md index 6b7ffa4ded8..c6daae0d989 100644 --- a/backends/apple/coreml/setup.md +++ b/backends/apple/coreml/setup.md @@ -6,16 +6,8 @@ This is a tutorial for setting up the Core ML backend. 1. Follow the instructions described in [Setting Up ExecuTorch](/docs/source/getting-started-setup.md) to set up ExecuTorch environment. -2. Run `install_requirements.sh` to install dependencies required by the **Core ML** backend. -``` -cd executorch - -./backends/apple/coreml/scripts/install_requirements.sh - -``` - -3. Run the example script to validate that the **Core ML** backend is set up correctly. +2. Run the example script to validate that the **Core ML** backend is set up correctly. ``` cd executorch @@ -26,7 +18,7 @@ python3 -m examples.apple.coreml.scripts.export --model_name add ``` -4. You can now integrate the **Core ML** backend in code. +3. You can now integrate the **Core ML** backend in code. ```python # Delegate to Core ML backend diff --git a/docs/source/backends-coreml.md b/docs/source/backends-coreml.md index a06820b2d08..126727735ae 100644 --- a/docs/source/backends-coreml.md +++ b/docs/source/backends-coreml.md @@ -28,12 +28,6 @@ Before starting, make sure you install the Xcode Command Line Tools: xcode-select --install ``` -Finally you must install the CoreML backend by running the following script: -```bash -sh ./backends/apple/coreml/scripts/install_requirements.sh -``` - - ---- ## Using the CoreML Backend diff --git a/docs/source/using-executorch-ios.md b/docs/source/using-executorch-ios.md index e975cb9ef22..70c2b366fa8 100644 --- a/docs/source/using-executorch-ios.md +++ b/docs/source/using-executorch-ios.md @@ -103,19 +103,18 @@ git clone https://github.com/pytorch/executorch.git --depth 1 --recurse-submodul 3. Set up [Python](https://www.python.org/downloads/macos/) 3.10+ and activate a virtual environment: ```bash -python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip +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), if you plan to build them as well: +4. Install the required dependencies, including those needed for the backends like [Core ML](backends-coreml.md) or [MPS](backends-mps.md). Choose one: ```bash -./install_executorch.sh --pybind coreml mps xnnpack +# ExecuTorch with xnnpack and CoreML backend +./install_executorch.sh --pybind xnnpack -# Optional dependencies for Core ML backend. -./backends/apple/coreml/scripts/install_requirements.sh - -# And MPS backend. +# Optional: ExecuTorch with xnnpack, CoreML, and MPS backend ./backends/apple/mps/install_requirements.sh +./install_executorch.sh --pybind xnnpack mps ``` 5. Install [CMake](https://cmake.org): diff --git a/examples/apple/coreml/README.md b/examples/apple/coreml/README.md index f4270956b2c..4dba5031358 100644 --- a/examples/apple/coreml/README.md +++ b/examples/apple/coreml/README.md @@ -18,16 +18,8 @@ We will walk through an example model to generate a Core ML delegated binary fil 1. Following the setup guide in [Setting Up ExecuTorch](https://pytorch.org/executorch/stable/getting-started-setup) you should be able to get the basic development environment for ExecuTorch working. -2. Run `install_requirements.sh` to install dependencies required by the **Core ML** backend. -```bash -cd executorch - -./backends/apple/coreml/scripts/install_requirements.sh - -``` - -3. Run the export script to generate a Core ML delegated binary file. +2. Run the export script to generate a Core ML delegated binary file. ```bash cd executorch @@ -39,11 +31,14 @@ python3 -m examples.portable.scripts.export -h python3 -m examples.apple.coreml.scripts.export --model_name add ``` -4. Run the binary file using the `coreml_executor_runner`. +3. Run the binary file using the `coreml_executor_runner`. ```bash cd executorch +# Install requirements needed to run the example runner +./backends/apple/coreml/scripts/install_requirements.sh + # Builds the Core ML executor runner. Generates ./coreml_executor_runner if successful. ./examples/apple/coreml/scripts/build_executor_runner.sh