Commit 561ae71
Introduce apply_torch_ops_passes to test mul fusion e2e (#11741)
Summary:
This diff
1) extends export_to_edge() with apply_torch_ops_passes() call
We need this to grab the actual mul argument value and fusing in later passes. Otherwise, the constant gets lifted by _lower_ep_to_edge()
2) implements e2e mul fusion test.
We test that both ReplaceMulTensorWithMulAndFullOpsPass() and FuseMulTensorIntoQuantPass() passes get applied correctly and which results into mul.Tensor being removed completely.
Reviewed By: hsharma35
Differential Revision: D764696131 parent f9a3ca8 commit 561ae71
File tree
4 files changed
+46
-35
lines changed- backends/cadence/aot
4 files changed
+46
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
| 43 | + | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| |||
308 | 310 | | |
309 | 311 | | |
310 | 312 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
| 313 | + | |
319 | 314 | | |
320 | 315 | | |
321 | 316 | | |
| |||
326 | 321 | | |
327 | 322 | | |
328 | 323 | | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 324 | + | |
337 | 325 | | |
338 | 326 | | |
339 | 327 | | |
| |||
370 | 358 | | |
371 | 359 | | |
372 | 360 | | |
373 | | - | |
374 | 361 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 362 | + | |
382 | 363 | | |
383 | 364 | | |
384 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1127 | 1127 | | |
1128 | 1128 | | |
1129 | 1129 | | |
| 1130 | + | |
1130 | 1131 | | |
1131 | 1132 | | |
1132 | 1133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
92 | | - | |
| 97 | + | |
93 | 98 | | |
94 | | - | |
| 99 | + | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | | - | |
98 | | - | |
99 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
100 | 109 | | |
101 | 110 | | |
102 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2449 | 2449 | | |
2450 | 2450 | | |
2451 | 2451 | | |
| 2452 | + | |
2452 | 2453 | | |
0 commit comments