Commit f1a23fa
authored
Support for Model API for Selective Build in OSS (#11601)
### Summary
Added support for parsing the selected operators and dtypes directly
from an exported model to a `selected_operators.yaml` file. Previously,
operators had to be specified in string list or in a schema yaml file
for the selective build process. Now, a model can be specified at build
time (e.g. `-DEXECUTORCH_SELECT_OPS_FROM_MODEL="./mv2.pte"`) to parse
and select operators.
### Test plan
Added a test for this in
`examples/selective_build/test_selective_build.sh`. When run with `bash
examples/selective_build/test_selective_build.sh cmake` a resultant
`selected_operators.yaml` file is created at
`cmake-out/examples/selective_build/select_build_lib/selected_operators.yaml`
that conatins the selected operators as well as their dtypes.1 parent b59f5cc commit f1a23fa
File tree
3 files changed
+36
-1
lines changed- examples/selective_build
- tools/cmake
3 files changed
+36
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| 115 | + | |
| 116 | + | |
111 | 117 | | |
112 | 118 | | |
113 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
164 | 187 | | |
165 | 188 | | |
166 | 189 | | |
| |||
177 | 200 | | |
178 | 201 | | |
179 | 202 | | |
| 203 | + | |
180 | 204 | | |
181 | 205 | | |
182 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
0 commit comments