Commit 1f77863
Move verification to after to_backend for to_edge_transform_and_lower (pytorch#12630)
Summary:
Some operators require preservation because they are intended to be consumed by a backend. These operators can contain view and mutation, as they won't be part of the graph after to_backend.
If there are still view and mutation ops after to_backend, verification should throw an error.
This diff:
1. Removes verification check from _generated_edge_program, which is called by to_edge and to_edge_transform_and_lower on the aten dialect.
2. to_edge: run verification for aten dialect (before to_edge) and edge dialect (after to_edge).
3. to_edge_transform_and_lower: only run the edge verification.
Reviewed By: metascroy
Differential Revision: D785355191 parent 6aa864e commit 1f77863
2 files changed
+28
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
794 | | - | |
795 | 794 | | |
796 | 795 | | |
797 | 796 | | |
798 | 797 | | |
799 | 798 | | |
800 | 799 | | |
801 | 800 | | |
802 | | - | |
803 | 801 | | |
804 | 802 | | |
805 | 803 | | |
| |||
816 | 814 | | |
817 | 815 | | |
818 | 816 | | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | 817 | | |
832 | 818 | | |
833 | 819 | | |
| |||
1144 | 1130 | | |
1145 | 1131 | | |
1146 | 1132 | | |
1147 | | - | |
1148 | 1133 | | |
1149 | 1134 | | |
1150 | 1135 | | |
| |||
1288 | 1273 | | |
1289 | 1274 | | |
1290 | 1275 | | |
| 1276 | + | |
1291 | 1277 | | |
1292 | 1278 | | |
1293 | 1279 | | |
1294 | 1280 | | |
1295 | | - | |
| 1281 | + | |
1296 | 1282 | | |
1297 | 1283 | | |
1298 | 1284 | | |
| |||
1336 | 1322 | | |
1337 | 1323 | | |
1338 | 1324 | | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
1339 | 1340 | | |
1340 | | - | |
| 1341 | + | |
1341 | 1342 | | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
1342 | 1352 | | |
1343 | 1353 | | |
1344 | 1354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
0 commit comments