Commit 77500cd
retrieve cadence_passes in apply_jarvis_passes
Summary:
Merge cadence passes in apply_jarvis_passes.
This method partition OS passes an jarvis passes on the pass filter:
- OSS passes remain the same order as original jarvis passes `remove -> fusion -> replacement `
- **TODO1**: Jarvis only has `ReplaceMatmulWithTransposedMatmulPass` and `ReplaceAvgPoolWithChannelLastAvgPoolPass` left. Matmul should also be used by vision backend should is OSS-able. TBC by mcremon-meta
- Jarvis should keep `precompute_for_quantized_linear_pass` simplify because it's only used by v3. skrtskrtfb will make it as a ExportPass.
- Jarvis passes are appended to OSS passes
- OSS flow: OSS pass filter applies on opt-level and is-debug. Apply OSS pass filter on OSS passes, which guarentee correct results
- Jarvis flow: Jarvis pass filter applies on opt-level and is-debug backend. The same filter cannot be reused from OSS because passes are registered in separate pass dictionaries. To get the correct set of passes after filtetring,
1. merge OSS & jarvis pass filter,
2. combine OSS & jarvis passes,
3. apply the merged filter on all passes.
**Note**: The filter should return true if __OSS pass attribute **OR** Jarvis pass attribute matches with the filtering criteria__.
- Test filter adds coverage in corner case when some passes are filtered by opt-level
Differential Revision: D729992661 parent 2ff9abd commit 77500cd
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
0 commit comments