pytorch/torch/_export
Tugsbayasgalan Manlaibaatar b756b580fb Improve fake tensor leakage detection in export by not relying on gc too much (#163516)
Previously we relied on gc to get the snapshot of fake tensors before and after export to get list of fake tensors that are created during export. This caused some flakiness in our test suite (https://github.com/pytorch/pytorch/issues/162232). it seems super hard to make gc deterministic, so we just instrument fake tensor creation which seems lot better. In addition, it is also quite faster than previous approach becuase we are no longer manually triggering garbage collector.

Differential Revision: [D82966648](https://our.internmc.facebook.com/intern/diff/D82966648)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/163516
Approved by: https://github.com/ezyang
2025-09-22 22:04:24 +00:00
..
db Move export_db to use new tracer, remove restriction on optional inputs (#162993) 2025-09-18 00:43:32 +00:00
pass_infra pyfmt lint more export files (#155783) 2025-06-12 23:04:11 +00:00
passes [aoti-fx] Add meta["val"] metadata (#161019) 2025-08-21 16:45:41 +00:00
serde [triton][export] serialization in internal path + unit tests (#162200) 2025-09-10 09:49:10 +00:00
__init__.py Fix inconsistent test and add new tracer as config (#162558) 2025-09-17 17:01:48 +00:00
config.py Improve fake tensor leakage detection in export by not relying on gc too much (#163516) 2025-09-22 22:04:24 +00:00
converter.py [BE][2/16] fix typos in torch/ (torch/_*/) (#156312) 2025-07-12 05:47:06 +00:00
error.py
non_strict_utils.py kill allow_complex_guards_as_runtime_asserts (#161794) 2025-09-04 00:17:01 +00:00
pass_base.py [BE][PYFMT] migrate PYFMT for torch/_[a-h]*/ to ruff format (#144551) 2025-06-25 06:16:06 +00:00
tools.py PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
utils.py Don't skip register_dataclass unflatten in dynamo (#162557) 2025-09-17 16:53:02 +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