pytorch
b8580b08 - Fix lazy_modules while enabling Unspecialized '__call__' tracing (#98516)

Commit
1 year ago
Fix lazy_modules while enabling Unspecialized '__call__' tracing (#98516) This fixes a regression added in the following PR to graph-break on allowed modules with hooks, but has its own problems. - following #97184 PR makes 'allowed modules' with hooks graph-break, and lazy modules are allowed. (should we just make lazy modules not allowed ?) - graph-breaks at lazy modules fail the lazy module unit tests which assert no graphbreaks - this PR attempts to always 'initialize' lazy modules before tracing/calling into their __call__, and initializing a lazy module should delete all its hooks after firing them once, making the above issue go away Pull Request resolved: https://github.com/pytorch/pytorch/pull/98516 Approved by: https://github.com/yanboliang, https://github.com/jansel
Author
Committer
Parents
Loading