Commit 2efa68a
Introduce apply_torch_ops_passes to test mul fusion e2e (#11741)
Summary:
Pull Request resolved: #11741
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 3b1c7fd commit 2efa68a
2 files changed
+26
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
268 | 272 | | |
269 | 273 | | |
270 | 274 | | |
| |||
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
309 | | - | |
| 313 | + | |
310 | 314 | | |
311 | 315 | | |
312 | 316 | | |
| |||
324 | 328 | | |
325 | 329 | | |
326 | 330 | | |
327 | | - | |
| 331 | + | |
328 | 332 | | |
329 | 333 | | |
330 | 334 | | |
| |||
368 | 372 | | |
369 | 373 | | |
370 | 374 | | |
371 | | - | |
| 375 | + | |
372 | 376 | | |
373 | 377 | | |
374 | 378 | | |
| |||
| 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 | | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | | - | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
0 commit comments