Skip to content

Commit 4670276

Browse files
shoumikhinpytorchbot
authored andcommitted
Update readme. (#3301)
Summary: Pull Request resolved: #3301 overriding_review_checks_triggers_an_audit_and_retroactive_review Oncall Short Name: executorch Differential Revision: D56517032 fbshipit-source-id: ec2f7fbb1111daf8bd529e0917be698bac3435f4 (cherry picked from commit 5b0030f)
1 parent eabdeb0 commit 4670276

File tree

1 file changed

+23
-35
lines changed
  • examples/demo-apps/apple_ios/ExecuTorchDemo

1 file changed

+23
-35
lines changed

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

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -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
6675
the exported model to a specific location where the Demo App will pick them up:
6776

6877
```bash
6978
python3 -m examples.portable.scripts.export --model_name="mv3"
70-
python3 -m examples.xnnpack.aot_compiler --delegate --model_name="mv3"
7179
python3 -m examples.apple.coreml.scripts.export --model_name="mv3"
7280
python3 -m examples.apple.mps.scripts.mps_example --model_name="mv3"
81+
python3 -m examples.xnnpack.aot_compiler --delegate --model_name="mv3"
7382

7483
mkdir -p examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo/Resources/Models/MobileNet/
7584
mv 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

11098
We're almost done! Now, we just need to open the project in Xcode, run the

0 commit comments

Comments
 (0)