[dynamo] Deprecate inline_inbuilt_nn_modules config#178205
Conversation
inline_inbuilt_nn_modules has defaulted to True and the False path is legacy. This makes the config a no-op (always True), emits a deprecation warning when users set it to False, and removes all dead False-path code from runtime [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/178205
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (4 Unrelated Failures)As of commit 7211897 with merge base e534ad5 ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
inline_inbuilt_nn_modules has defaulted to True and the False path is legacy. This makes the config a no-op (always True), emits a deprecation warning when users set it to False, and removes all dead False-path code from runtime cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo Lucaskabela [ghstack-poisoned]
inline_inbuilt_nn_modules has defaulted to True and the False path is legacy. This makes the config a no-op (always True), emits a deprecation warning when users set it to False, and removes all dead False-path code from runtime cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo Lucaskabela [ghstack-poisoned]
| if ( | ||
| ( | ||
| torch._dynamo.config.inline_inbuilt_nn_modules | ||
| or isinstance(self, variables.FSDPManagedNNModuleVariable) |
There was a problem hiding this comment.
Shouldn't we keep the check from the or?
There was a problem hiding this comment.
Wait nvm since inline_inbuilt_nn_modules is true this entire portion is now true - checked myself sorry XD
There was a problem hiding this comment.
No worries - I was confused too - Trust in Claude we must lol
Lucaskabela
left a comment
There was a problem hiding this comment.
Generally LGTM - minor comment on our deprecation message
| default=True, | ||
| justknob="pytorch/compiler:inline_inbuilt_nn_modules", | ||
| deprecated=True, | ||
| deprecation_message="does not do anything, inline_inbuilt_nn_modules is always True", |
There was a problem hiding this comment.
Do we have an expected removal date? We could include that in the message if so
There was a problem hiding this comment.
I dont want to add it now -- because in the past, this has been hard, so I am expecting reverts.
There was a problem hiding this comment.
I can do this post 2.12 release, if the deprecate flag survives till 2.12 release.
| if ( | ||
| ( | ||
| torch._dynamo.config.inline_inbuilt_nn_modules | ||
| or isinstance(self, variables.FSDPManagedNNModuleVariable) |
There was a problem hiding this comment.
Wait nvm since inline_inbuilt_nn_modules is true this entire portion is now true - checked myself sorry XD
| @@ -910,13 +908,7 @@ def raise_local_type_error(obj: Any) -> NoReturn: | |||
|
|
|||
|
|
|||
| def should_optimize_getattr_on_nn_module(value: Any) -> bool: | |||
There was a problem hiding this comment.
Return type should be typing_extensions.TypeIs[torch.nn.Module] to properly propogate typing info now.
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: inline_inbuilt_nn_modules has defaulted to True and the False path is legacy. This makes the config a no-op (always True), emits a deprecation warning when users set it to False, and removes all dead False-path code from runtime X-link: pytorch/pytorch#178205 Approved by: https://github.com/Lucaskabela, https://github.com/mlazos Reviewed By: georgehong Differential Revision: D98065356 fbshipit-source-id: e55bae4fd2e0ff075f6a7de0215af05a18de5279
inline_inbuilt_nn_modules has defaulted to True and the False path is legacy. This makes the config a no-op (always True), emits a deprecation warning when users set it to False, and removes all dead False-path code from runtime Pull Request resolved: #178205 Approved by: https://github.com/Lucaskabela, https://github.com/mlazos Co-authored-by: Xia-Weiwen <12522207+Xia-Weiwen@users.noreply.github.com>
inline_inbuilt_nn_modules has defaulted to True and the False path is legacy. This makes the config a no-op (always True), emits a deprecation warning when users set it to False, and removes all dead False-path code from runtime Pull Request resolved: pytorch#178205 Approved by: https://github.com/Lucaskabela, https://github.com/mlazos
inline_inbuilt_nn_modules has defaulted to True and the False path is legacy. This makes the config a no-op (always True), emits a deprecation warning when users set it to False, and removes all dead False-path code from runtime Pull Request resolved: pytorch#178205 Approved by: https://github.com/Lucaskabela, https://github.com/mlazos
inline_inbuilt_nn_modules has defaulted to True and the False path is legacy. This makes the config a no-op (always True), emits a deprecation warning when users set it to False, and removes all dead False-path code from runtime Pull Request resolved: pytorch#178205 Approved by: https://github.com/Lucaskabela, https://github.com/mlazos
…churn (#182531) PR #178205 stripped the cudagraph re-record limit entirely (made exceed_rerecord_limit a no-op). Restore it, but don't count StaticInputIdxMismatch (nn parameter / mark_static_address ptr churn under inline_inbuilt_nn_modules) toward the limit; structural reasons like CudagraphManagedIdxMismatch and ExpectedDeadIndicesBeforeGraphMismatch do count. Authored with assistance from Claude. Differential Revision: [D103898330](https://our.internmc.facebook.com/intern/diff/D103898330) Pull Request resolved: #182531 Approved by: https://github.com/BoyuanFeng ghstack dependencies: #182524
…churn (pytorch#182531) PR pytorch#178205 stripped the cudagraph re-record limit entirely (made exceed_rerecord_limit a no-op). Restore it, but don't count StaticInputIdxMismatch (nn parameter / mark_static_address ptr churn under inline_inbuilt_nn_modules) toward the limit; structural reasons like CudagraphManagedIdxMismatch and ExpectedDeadIndicesBeforeGraphMismatch do count. Authored with assistance from Claude. Differential Revision: [D103898330](https://our.internmc.facebook.com/intern/diff/D103898330) Pull Request resolved: pytorch#182531 Approved by: https://github.com/BoyuanFeng ghstack dependencies: pytorch#182524
Stack from ghstack (oldest at bottom):
inline_inbuilt_nn_modules has defaulted to True and the False path is legacy. This makes the config a no-op (always True), emits a deprecation warning when users set it to False, and removes all dead False-path code from runtime
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @Lucaskabela @mlazos