Commit b9dd175
committed
[Executorch][Export/ Recipes] Modify pre_edge_transform_passes, edge_transform_passes definition to take exported program and method name.
While adding QNN recipes, i realized there are gaps in pre edge and edge transform passes in the recipe logic. Where the transform passes need exported program to resolve them dynamically at runtime. Changes made:
- `pre_edge_transform_passes` is now renamed to `aten_transform_passes`
- `aten_transform_passes`: now accepts list of transformation functions which takes in (method_name, ExportedProgram) and gives back ExportedProgram
- `aten_transform_passes: Optional[List[Callable[[str, ExportedProgram], ExportedProgram]]]`
- `edge_transform_passes`: Now this is a list of callables that resolves to a list of passes, callables is needed because some of the passes might need ExportedProgram which is only available during execution and not when recipe is created.
- `edge_transform_passes: None | List[Callable[[str, ExportedProgram], List[PassType]]]`
Differential Revision: [D81730890](https://our.internmc.facebook.com/intern/diff/D81730890/)
[ghstack-poisoned]1 parent 245630a commit b9dd175
File tree
4 files changed
+216
-37
lines changed- export
- tests
4 files changed
+216
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | | - | |
| 121 | + | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
125 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
144 | | - | |
145 | | - | |
| 148 | + | |
| 149 | + | |
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| |||
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
154 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
155 | 161 | | |
156 | 162 | | |
157 | 163 | | |
| |||
240 | 246 | | |
241 | 247 | | |
242 | 248 | | |
243 | | - | |
244 | | - | |
| 249 | + | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
| |||
307 | 313 | | |
308 | 314 | | |
309 | 315 | | |
310 | | - | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | | - | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
152 | | - | |
153 | | - | |
154 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
155 | 161 | | |
156 | 162 | | |
157 | 163 | | |
| |||
165 | 171 | | |
166 | 172 | | |
167 | 173 | | |
168 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
169 | 177 | | |
170 | 178 | | |
171 | 179 | | |
| |||
205 | 213 | | |
206 | 214 | | |
207 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
208 | 233 | | |
209 | 234 | | |
210 | 235 | | |
211 | 236 | | |
212 | | - | |
| 237 | + | |
213 | 238 | | |
214 | 239 | | |
215 | 240 | | |
| |||
396 | 421 | | |
397 | 422 | | |
398 | 423 | | |
399 | | - | |
| 424 | + | |
400 | 425 | | |
401 | 426 | | |
402 | 427 | | |
| |||
471 | 496 | | |
472 | 497 | | |
473 | 498 | | |
474 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
475 | 502 | | |
476 | 503 | | |
477 | 504 | | |
| |||
513 | 540 | | |
514 | 541 | | |
515 | 542 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
521 | 563 | | |
522 | 564 | | |
523 | 565 | | |
| |||
0 commit comments