pytorch/torch/_export/serde
Jiashen Cao 10d2373abd Add a registry for GraphModuleSerializer (#126550)
This PR adds a registration function and a global registry for GraphModuleSerializer. After this PR, custom serialization methods can be done through registration instead of subclassing for ease of maintenance.

## Changes
- Add a test case where it injects custom op to test serialization.
- Add custom op handler
- Change allowed op for verifier
Co-authored-by: Zhengxu Chen <zhxchen17@outlook.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/126550
Approved by: https://github.com/zhxchen17
2024-05-29 03:12:48 +00:00
..
__init__.py
schema_check.py [export] Ensure optional fields always have default value. (#121163) 2024-03-05 17:16:49 +00:00
schema.py [export] Restore original placeholder names (part 3: constant input de/serialization) (#123590) 2024-04-15 19:09:41 +00:00
schema.yaml [export] Restore original placeholder names (part 3: constant input de/serialization) (#123590) 2024-04-15 19:09:41 +00:00
serialize.py Add a registry for GraphModuleSerializer (#126550) 2024-05-29 03:12:48 +00:00
union.py [export] Improve serialization of union types. (#116511) 2024-01-03 04:58:59 +00:00
upgrade.py [export] remove upgrader. (#125625) 2024-05-09 16:30:12 +00:00