Commit c786135
committed
Update on "Add preserve_ops to EdgeCompileConfig"
1. Add `preserve_ops` to `EdgeCompileConfig`
2. Remove preserved ops from the decomposition table in `to_edge`.
3. Add checks to the verifier ensuring that preserved ops do not have mutations or views.
4. Update 'core_aten_exception_list' to be 'preserved_ops' in `to_edge_transform_and_lower`.
Context/Usage
**core_aten_ops_exception_list**
- Contains operators that are missing a decomposition to core aten.
- Exclude these so that verification can still be run on the rest of the graph.
- Ideally, this list should be empty.
**preserve_ops**
- Contains operators that the user specifically does not want decomposed.
- Must be aten; custom ops are ignored by verifier.
Edge case:
- If an aten operator does not have a decomp, and the user specifically wants it to be preserved, put it in preserve_ops rather than core_aten_ops_exception_list.
Differential Revision: [D78298749](https://our.internmc.facebook.com/intern/diff/D78298749/)
[ghstack-poisoned]1 parent 391119f commit c786135
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
137 | 142 | | |
138 | 143 | | |
139 | | - | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
146 | 151 | | |
| 152 | + | |
147 | 153 | | |
148 | 154 | | |
149 | 155 | | |
| |||
0 commit comments