pytorch
b9294c7c - Allow more inserts before reIndexTopology (#102312)

Commit
1 year ago
Allow more inserts before reIndexTopology (#102312) Summary: Currently if you are inserting into JIT IR at the same point in the middle of the graph, it only allows for 40 inserts before it has to reindex. Reindexing is N**2 behavior, which can lead to slow load times. This changes it so that it keeps track of how many insertions happen at single point (like when a function is being inlined) to predict how many future insertions will happen there. It then adjusts how it assigns topology to make sure there is enough room for those predicted insertions. In practice this will allow around 2M inserts at a single point before it reindexes. Test Plan: test_jit.py Differential Revision: [D46206617](https://our.internmc.facebook.com/intern/diff/D46206617) Pull Request resolved: https://github.com/pytorch/pytorch/pull/102312 Approved by: https://github.com/eellison
Author
Committer
Parents
Loading