pytorch/torch/_export
Pian Pawakapan c9a258e474 [export] handle constant aliasing for export (#125509)
Summary: Currently export will [error out](2b5ae2611e/torch/export/_trace.py (L477)) if a constant is aliased. This PR supports this by modifying ConstantAttrMap to map constants to a list of FQNs instead of a single FQN, populating the ExportedProgram constants dict to contain multiple entries to the same constant.

Test Plan: added test case in test_export.py

Differential Revision: D56955654

Pull Request resolved: https://github.com/pytorch/pytorch/pull/125509
Approved by: https://github.com/angelayi, https://github.com/ydwu4
2024-05-10 00:14:37 +00:00
..
db switch tests from constrain_as* to torch._check* (#125253) 2024-05-01 21:01:27 +00:00
pass_infra
passes [export] handle constant aliasing for export (#125509) 2024-05-10 00:14:37 +00:00
serde [export] remove upgrader. (#125625) 2024-05-09 16:30:12 +00:00
__init__.py Print capture_pre_autograd_graph warning only once (#125848) 2024-05-09 22:04:05 +00:00
error.py Fix global flake8 issues (#124771) 2024-04-26 15:35:53 +00:00
exported_program.py [export] Remove CallSpec (#117671) 2024-02-08 17:19:03 +00:00
non_strict_utils.py [export] handle constant aliasing for export (#125509) 2024-05-10 00:14:37 +00:00
pass_base.py Revert "[FX] Update type hints in torch.fx._compatibility.py (#125469)" 2024-05-06 18:36:43 +00:00
utils.py [export] disable_forced_specializations (#124949) 2024-05-08 18:42:39 +00:00
verifier.py [export] Add torch_fn (#122693) 2024-03-30 06:47:15 +00:00
wrappers.py [export] Use forward hooks to capture module signatures. (#120468) 2024-02-27 17:44:06 +00:00