Commit f269fb8
Add Enum TorchScript serialization and deserialization support (pytorch#42963)
Summary:
Pull Request resolved: pytorch#42963
* Adds code printing for enum type
* Enhance enum type to include all contained enum names and values
* Adds code parsing for enum type in deserialization
* Enabled serialization/deserialization test in most TestCases. (With a few dangling issues to be addressed in later PRs to avoid this PR grows too large)
Test Plan: Imported from OSS
Reviewed By: SplitInfinity
Differential Revision: D23223281
Pulled By: gmagogsfm
fbshipit-source-id: 716d1866b7770dfb7bd8515548cfe7dc4c4585f71 parent aa53b2d commit f269fb8
File tree
11 files changed
+240
-180
lines changed- aten/src/ATen
- core
- test
- test/jit
- torch
- csrc/jit
- frontend
- python
- serialization
- jit
11 files changed
+240
-180
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1131 | 1131 | | |
1132 | 1132 | | |
1133 | 1133 | | |
| 1134 | + | |
1134 | 1135 | | |
1135 | 1136 | | |
1136 | 1137 | | |
1137 | 1138 | | |
1138 | 1139 | | |
1139 | 1140 | | |
1140 | | - | |
| 1141 | + | |
1141 | 1142 | | |
1142 | 1143 | | |
1143 | 1144 | | |
1144 | 1145 | | |
1145 | | - | |
| 1146 | + | |
1146 | 1147 | | |
1147 | 1148 | | |
1148 | 1149 | | |
| |||
1183 | 1184 | | |
1184 | 1185 | | |
1185 | 1186 | | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
1186 | 1195 | | |
1187 | | - | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1188 | 1201 | | |
1189 | | - | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1190 | 1205 | | |
1191 | 1206 | | |
1192 | 1207 | | |
1193 | 1208 | | |
1194 | 1209 | | |
1195 | 1210 | | |
1196 | 1211 | | |
| 1212 | + | |
1197 | 1213 | | |
1198 | 1214 | | |
1199 | 1215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
266 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
267 | 279 | | |
268 | 280 | | |
269 | 281 | | |
270 | | - | |
| 282 | + | |
271 | 283 | | |
272 | | - | |
| 284 | + | |
273 | 285 | | |
274 | 286 | | |
275 | 287 | | |
276 | 288 | | |
277 | | - | |
| 289 | + | |
278 | 290 | | |
279 | | - | |
| 291 | + | |
280 | 292 | | |
281 | 293 | | |
282 | 294 | | |
283 | 295 | | |
284 | | - | |
| 296 | + | |
285 | 297 | | |
286 | | - | |
| 298 | + | |
287 | 299 | | |
288 | 300 | | |
289 | 301 | | |
290 | 302 | | |
291 | | - | |
| 303 | + | |
292 | 304 | | |
293 | | - | |
| 305 | + | |
294 | 306 | | |
295 | 307 | | |
296 | 308 | | |
| |||
0 commit comments