[dynamo][compile-time] Cache whether a function is inlineable#153192
[dynamo][compile-time] Cache whether a function is inlineable#153192anijain2305 wants to merge 8 commits intogh/anijain2305/759/basefrom
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/153192
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit a5e1b2d with merge base 81719eb ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…ble" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
…ble" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
…ble" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
…ble" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
| if isinstance(func, SkipFunctionVariable): | ||
| unimplemented_v2( | ||
| gb_type="Attempted to inline function marked as skipped (SkipFunctionVariable)", | ||
| context=f"Attempted to inline a SkipFunctionVariable {func}", | ||
| explanation="Attempted to inline a function that was previously determined to be marked as intentionally skipped.", | ||
| hints=[], | ||
| ) |
There was a problem hiding this comment.
Curious why we moved this to below? Looks like SkipFunctionVariable will graph break both before and after this patch anyways?
| self.guards_context = GuardsContext() | ||
| self.module_context = ModuleContext() | ||
| self.global_context = GlobalContext() | ||
| self.previously_inlined_functions = dict() |
There was a problem hiding this comment.
Would a weakref key'd dict be better here?
There was a problem hiding this comment.
Maybe. But the tracing context dies right after convert_frame is done, so we should not leak anything.
…ble" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
…ble" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
…ble" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
|
@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 |
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames