@@ -40,36 +40,45 @@ pip --version
40
40
41
41
### 3. Getting Started Tutorial
42
42
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:
47
45
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
+ ```
52
55
53
56
### 4. Backend Dependencies
54
57
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
+ ```
58
67
59
68
## Models and Labels
60
69
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.
62
71
63
72
### 1. Export Model
64
73
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
66
75
the exported model to a specific location where the Demo App will pick them up:
67
76
68
77
``` bash
69
78
python3 -m examples.portable.scripts.export --model_name=" mv3"
70
- python3 -m examples.xnnpack.aot_compiler --delegate --model_name=" mv3"
71
79
python3 -m examples.apple.coreml.scripts.export --model_name=" mv3"
72
80
python3 -m examples.apple.mps.scripts.mps_example --model_name=" mv3"
81
+ python3 -m examples.xnnpack.aot_compiler --delegate --model_name=" mv3"
73
82
74
83
mkdir -p examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo/Resources/Models/MobileNet/
75
84
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 \
84
93
-o examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo/Resources/Models/MobileNet/imagenet_classes.txt
85
94
```
86
95
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
-
108
96
## Final Steps
109
97
110
98
We're almost done! Now, we just need to open the project in Xcode, run the
0 commit comments