Use optimized graph in Inline (essentially, making Inline recursive now). (#26489)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26489
This basically fixes Inline(recurse=true) and makes it a default. One
reservation against running inlining recursively in the original
implementation was that we might hit a quadratic behavior, but in this
implementation it's not an issue since we're inlining only already
inlined graphs and as we recursively descend the call tree we're caching
graphs we've already optimized.
Test Plan: Imported from OSS
Differential Revision: D17485744
Pulled By: ZolotukhinM
fbshipit-source-id: 2ed7bdc69863b90a8c10a385d63f8e7c9e7b05f5
Author
Mikhail Zolotukhin