always save expr in sympy_expr_tracker#164113
Closed
bobrenjc93 wants to merge 5 commits intogh/bobrenjc93/610/basefrom
Closed
always save expr in sympy_expr_tracker#164113bobrenjc93 wants to merge 5 commits intogh/bobrenjc93/610/basefrom
bobrenjc93 wants to merge 5 commits intogh/bobrenjc93/610/basefrom
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/164113
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit f0cb236 with merge base dfda239 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
cc ezyang EikanWang jgong5 wenzhe-nrv [ghstack-poisoned]
This was referenced Sep 30, 2025
In certain cases, such as with tensor subclasses like dtensor, symnodes are created in create_aot_state and stored within the dtensor spec. However, since create_aot_state runs without proxy tensor tracing enabled, no thunked proxy is created at this stage. As a result, when execution reaches aot_stage1_graph_capture, errors occur in our new internal training library, for example: ``` RuntimeError: 202048*s81 (140026802016016) is not tracked with proxy for <torch.fx.experimental.proxy_tensor.PythonKeyTracer object at 0x7f5a505fce20> Adding TORCHDYNAMO_VERBOSE=1 doesn't seem to give me more information. ``` This PR modifies the code so that we can now use sympy_expr_tracker to map symnodes created outside of proxy-traced contexts to their corresponding thunked proxies when operating in traced contexts. I'm still not certain if this is the right long term fix, but this at least unblocks the internal high priority workstream that is blocked on this issue. cc ezyang EikanWang jgong5 wenzhe-nrv [ghstack-poisoned]
In certain cases, such as with tensor subclasses like dtensor, symnodes are created in create_aot_state and stored within the dtensor spec. However, since create_aot_state runs without proxy tensor tracing enabled, no thunked proxy is created at this stage. As a result, when execution reaches aot_stage1_graph_capture, errors occur in our new internal training library, for example: ``` RuntimeError: 202048*s81 (140026802016016) is not tracked with proxy for <torch.fx.experimental.proxy_tensor.PythonKeyTracer object at 0x7f5a505fce20> Adding TORCHDYNAMO_VERBOSE=1 doesn't seem to give me more information. ``` This PR modifies the code so that we can now use sympy_expr_tracker to map symnodes created outside of proxy-traced contexts to their corresponding thunked proxies when operating in traced contexts. I'm still not certain if this is the right long term fix, but this at least unblocks the internal high priority workstream that is blocked on this issue. cc ezyang EikanWang jgong5 wenzhe-nrv [ghstack-poisoned]
Collaborator
|
Starting merge as part of PR stack under #164210 |
In certain cases, such as with tensor subclasses like dtensor, symnodes are created in create_aot_state and stored within the dtensor spec. However, since create_aot_state runs without proxy tensor tracing enabled, no thunked proxy is created at this stage. As a result, when execution reaches aot_stage1_graph_capture, errors occur in our new internal training library, for example: ``` RuntimeError: 202048*s81 (140026802016016) is not tracked with proxy for <torch.fx.experimental.proxy_tensor.PythonKeyTracer object at 0x7f5a505fce20> Adding TORCHDYNAMO_VERBOSE=1 doesn't seem to give me more information. ``` This PR modifies the code so that we can now use sympy_expr_tracker to map symnodes created outside of proxy-traced contexts to their corresponding thunked proxies when operating in traced contexts. I'm still not certain if this is the right long term fix, but this at least unblocks the internal high priority workstream that is blocked on this issue. cc ezyang EikanWang jgong5 wenzhe-nrv [ghstack-poisoned]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
In certain cases, such as with tensor subclasses like dtensor, symnodes are created in create_aot_state and stored within the dtensor spec. However, since create_aot_state runs without proxy tensor tracing enabled, no thunked proxy is created at this stage. As a result, when execution reaches aot_stage1_graph_capture, errors occur in our new internal training library, for example:
This PR modifies the code so that we can now use sympy_expr_tracker to map symnodes created outside of proxy-traced contexts to their corresponding thunked proxies when operating in traced contexts.
I'm still not certain if this is the right long term fix, but this at least unblocks the internal high priority workstream that is blocked on this issue.
cc @ezyang @EikanWang @jgong5 @wenzhe-nrv