Commit cb583f3
authored
Separate CoreML util and inmemoryfs targets to be reusable (#9481)
### Summary
In this diff, we separate the targets for `coreml/runtime/util` and
`coreml/runtime/inmemoryfs`.
#### Why?
As part of #9019, we want to
support CoreML export out-of-the-box. Unfortunately, part of the
workflow now includes installing an executorch+coreml binding as a pip
wheel:
https://github.com/pytorch/executorch/blob/5fdfa511966208c7e237a9e920a7c63f513b4fb7/backends/apple/coreml/scripts/install_inmemoryfs.sh#L20
This then gets used throughout the library. i.e.
https://github.com/pytorch/executorch/blob/5fdfa511966208c7e237a9e920a7c63f513b4fb7/backends/apple/coreml/compiler/coreml_preprocess.py#L19
So we want to now bake this pybinding into the main wheel. Ultimately
this `executorchcoreml` module, gets built using inmemoryfs:
https://github.com/pytorch/executorch/blob/5fdfa511966208c7e237a9e920a7c63f513b4fb7/backends/apple/coreml/runtime/inmemoryfs/setup.py#L17-L38
So, to enable creating a pybinding target, we must first decouple the
`util` and `inmemoryfs` libraries so they can be used in
`coremldelegate` and the future pybinding.
### Test plan
This should really be a no-op w.r.t. builds. So, CI +
```
$ ./install_executorch.sh --pybind coreml
```
cc @larryliu0820 @lucylq1 parent d15c0d0 commit cb583f3
File tree
5 files changed
+69
-22
lines changed- backends/apple/coreml
- examples/apple/coreml
- executor_runner/coreml_executor_runner.xcodeproj
- scripts
- scripts
- tools/cmake
5 files changed
+69
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
2 | 7 | | |
3 | 8 | | |
4 | 9 | | |
| |||
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
114 | 145 | | |
115 | 146 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 147 | + | |
120 | 148 | | |
121 | 149 | | |
122 | 150 | | |
123 | 151 | | |
124 | 152 | | |
125 | 153 | | |
126 | 154 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 155 | | |
131 | 156 | | |
132 | 157 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 158 | | |
137 | 159 | | |
138 | 160 | | |
139 | | - | |
140 | 161 | | |
141 | 162 | | |
142 | 163 | | |
| |||
156 | 177 | | |
157 | 178 | | |
158 | 179 | | |
159 | | - | |
160 | 180 | | |
161 | 181 | | |
162 | 182 | | |
163 | 183 | | |
164 | | - | |
165 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
166 | 191 | | |
167 | 192 | | |
168 | 193 | | |
| |||
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
| 100 | + | |
| 101 | + | |
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
| |||
214 | 222 | | |
215 | 223 | | |
216 | 224 | | |
217 | | - | |
| 225 | + | |
218 | 226 | | |
219 | 227 | | |
220 | 228 | | |
| |||
273 | 281 | | |
274 | 282 | | |
275 | 283 | | |
276 | | - | |
| 284 | + | |
277 | 285 | | |
278 | 286 | | |
279 | 287 | | |
| |||
297 | 305 | | |
298 | 306 | | |
299 | 307 | | |
300 | | - | |
301 | | - | |
302 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
303 | 311 | | |
304 | 312 | | |
305 | 313 | | |
| |||
319 | 327 | | |
320 | 328 | | |
321 | 329 | | |
322 | | - | |
323 | | - | |
324 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
325 | 333 | | |
326 | 334 | | |
327 | 335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| |||
0 commit comments