pytorch/torch/_export
Yiming Zhou bea7d428bc [export] Preserve custom metadata for tensor constants (#152241)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/151476
The `custom_meta` collected from `mod` has keys that follow name of nodes in `mod`, which are inconsistent with the node names after the naming pass. For example a constant `b` will become `c_b`.

Test Plan: buck2 run caffe2/test:test_export -- -r test_run_decompositions_keep_tensor_constant_metadata

Differential Revision: D73703068

Pull Request resolved: https://github.com/pytorch/pytorch/pull/152241
Approved by: https://github.com/angelayi
2025-04-30 00:30:35 +00:00
..
db PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
pass_infra PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
passes [export] Integrate meta kernel generation with draft-export (#150809) 2025-04-17 20:52:31 +00:00
serde [export] improve error message for deserializing custom triton op (#152029) 2025-04-24 20:22:05 +00:00
__init__.py PEP585: More UP006 fixes (#146392) 2025-02-20 06:18:13 +00:00
converter.py [export] refactor DimHints for type errors (#149424) 2025-03-19 18:51:07 +00:00
error.py
non_strict_utils.py [export] Enable symint inputs for AdditionalInputs and ShapesCollection (#151842) 2025-04-22 22:29:18 +00:00
pass_base.py PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
tools.py PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
utils.py [export] Preserve custom metadata for tensor constants (#152241) 2025-04-30 00:30:35 +00:00
verifier.py Expand allowed_getattr_types_for_subgm to torch.Tensor (#150867) 2025-04-09 11:01:45 +00:00
wrappers.py Support subclass constructor capturing in export (#147014) 2025-03-16 18:19:19 +00:00