mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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