pytorch/torch/_export
Malay Bag 058782c6ab [torch.export] Rmoving unused constants - add support for corner case (#165205)
Summary: In some cases unused constant had only one level of child node, no second level of child node. Those constants should be removed too. The added test case has the scenario where this scenario will happen.

Test Plan:
```
buck test mode/opt caffe2/test:test_export -- 'test_unused_constant'
```

https://www.internalfb.com/intern/testinfra/testrun/15481123837456594

Differential Revision: D84398413

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165205
Approved by: https://github.com/angelayi
2025-10-14 20:26:28 +00:00
..
db [export] Turn on install_free_tensors flag (#164691) 2025-10-14 15:33:50 +00:00
pass_infra pyfmt lint more export files (#155783) 2025-06-12 23:04:11 +00:00
passes [torch.export] Rmoving unused constants - add support for corner case (#165205) 2025-10-14 20:26:28 +00:00
serde Enable ruff rule E721 (#165162) 2025-10-13 01:48:55 +00:00
__init__.py [5/N] Apply ruff UP035 rule (#164423) 2025-10-02 07:31:11 +00:00
config.py [RELAND v2] Close some sources of fake tensors (#164372) 2025-10-02 18:58:52 +00:00
converter.py Pyrefly suppressions 6/n (#164877) 2025-10-08 02:30:57 +00:00
error.py
non_strict_utils.py Pyrefly suppressions 6/n (#164877) 2025-10-08 02:30:57 +00:00
pass_base.py Pyrefly suppressions 6/n (#164877) 2025-10-08 02:30:57 +00:00
tools.py PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
utils.py [1/N] Use "is" in python type comparison (#165037) 2025-10-10 12:36:50 +00:00
verifier.py Support vmap + custom autograd function/improve DTensor constructor inefficiency (#162240) 2025-09-11 17:42:41 +00:00
wrappers.py Support vmap + custom autograd function/improve DTensor constructor inefficiency (#162240) 2025-09-11 17:42:41 +00:00