@@ -40,36 +40,45 @@ pip --version
4040
4141### 3. Getting Started Tutorial
4242
43- Before proceeding, follow the [ Setting Up ExecuTorch] ( https://pytorch.org/executorch/stable/getting-started-setup )
44- tutorial to configure the basic environment. Feel free to skip building anything
45- just yet. Make sure you have all the required dependencies installed, including
46- the following tools:
43+ Follow the [ Setting Up ExecuTorch] ( https://pytorch.org/executorch/stable/getting-started-setup )
44+ tutorial to configure the basic environment:
4745
48- - Buck2 (as ` /tmp/buck2 ` )
49- - Cmake (` cmake ` reachable at ` $PATH ` )
50- - FlatBuffers Compiler (` flatc ` reachable at ` $PATH ` or as ` $FLATC_EXECUTABLE `
51- enironment variable)
46+ ``` bash
47+ git clone -b release/0.2 https://github.com/pytorch/executorch.git
48+ cd executorch
49+ git submodule update --init
50+
51+ python3 -m venv .venv && source .venv/bin/activate
52+
53+ ./install_requirements.sh --pybind coreml mps xnnpack
54+ ```
5255
5356### 4. Backend Dependencies
5457
55- Also, follow the corresponding sections from [ Core ML] ( build-run-coreml.md ) and
56- [ MPS] ( build-run-mps.md ) tutorials to install additional dependencies for those
57- backends. Feel free to skip building anything just yet.
58+ Also, follow the corresponding sections from [ Core ML] ( https://pytorch.org/executorch/stable/build-run-coreml ) and
59+ [ MPS] ( https://pytorch.org/executorch/stable/build-run-mps ) tutorials to install additional dependencies for those
60+ backends:
61+
62+ ``` bash
63+ ./backends/apple/coreml/scripts/install_requirements.sh
64+
65+ ./backends/apple/mps/install_requirements.sh
66+ ```
5867
5968## Models and Labels
6069
61- Now let's move on to exporting and bundling the MobileNet v3 model.
70+ Now, let's move on to exporting and bundling the MobileNet v3 model.
6271
6372### 1. Export Model
6473
65- Export the MobileNet v3 model with Core ML, MPS and XNNPACK delegates , and move
74+ Export the MobileNet v3 model with Core ML, MPS and XNNPACK backends , and move
6675the exported model to a specific location where the Demo App will pick them up:
6776
6877``` bash
6978python3 -m examples.portable.scripts.export --model_name=" mv3"
70- python3 -m examples.xnnpack.aot_compiler --delegate --model_name=" mv3"
7179python3 -m examples.apple.coreml.scripts.export --model_name=" mv3"
7280python3 -m examples.apple.mps.scripts.mps_example --model_name=" mv3"
81+ python3 -m examples.xnnpack.aot_compiler --delegate --model_name=" mv3"
7382
7483mkdir -p examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo/Resources/Models/MobileNet/
7584mv mv3* .pte examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo/Resources/Models/MobileNet/
@@ -84,27 +93,6 @@ curl https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt \
8493 -o examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo/Resources/Models/MobileNet/imagenet_classes.txt
8594```
8695
87- ## Build Runtime and Backends
88-
89- Next, we will build the necessary
90- [ frameworks] ( https://developer.apple.com/documentation/xcode/creating-a-multi-platform-binary-framework-bundle )
91- for ExecuTorch and move them over for app linking.
92-
93- ### 1. Build Frameworks
94-
95- ``` bash
96- ./build/build_apple_frameworks.sh --Release --coreml --mps --xnnpack
97- ```
98-
99- ### 2. Move Frameworks for App Linking
100-
101- Make sure to have all the ` .xcframework ` bundles generated at the previous step
102- at a specific location where the Demo App will pick them up:
103-
104- ``` bash
105- mv cmake-out examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo/Frameworks
106- ```
107-
10896## Final Steps
10997
11098We're almost done! Now, we just need to open the project in Xcode, run the
0 commit comments