Repository navigation
[aot_autograd] Pin the "example_value" dynamic-shape read against a real Dynamo backend graph - #197357
Closed
bobrenjc93 wants to merge 57 commits into
Closed
[aot_autograd] Pin the "example_value" dynamic-shape read against a real Dynamo backend graph#197357bobrenjc93 wants to merge 57 commits into
bobrenjc93 wants to merge 57 commits into
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/197357
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 48 PendingAs of commit 0d08436 with merge base d78bbf2 ( 🟢 GREEN LIGHT - PR approved to be merged without human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Sep 16, 2026
Closed
Closed
bobrenjc93
added a commit
that referenced
this pull request
Sep 20, 2026
…inst a real Dynamo backend graph **Summary.** This is a follow-up to the `_graph_has_dynamic_shapes` fix that made the probe read `"example_value"` as well as `"val"`: it adds the end-to-end regression test that fix was missing and tightens the surrounding prose. `test_dynamo_dynamic_graph_runs_at_multiple_shapes` compiles a module with `torch.compile(dynamic=True)` through a recording backend, lowers the captured graph with `compile_to_python`, and runs the artifact at three batch sizes; on the parent of the original fix the artifact specialized to the example size and failed `assert_size_stride` at every other size. The helper's docstring and the two unit tests now say precisely which graphs carry which key: make_fx writes only `"val"`, the graph Dynamo hands a torch.compile backend carries only `"example_value"`, and Dynamo's export paths stamp `"val"` as well, so `"val"` alone does not identify a make_fx graph. The unit test also covers the union in the other direction (a symbolic `"val"` beside a static `"example_value"`). The code change is prose only; the behaviour under test is the `_graph_has_dynamic_shapes` change in #197258 (the second commit of this stack), which is kept byte-identical because it is already approved. ## Test Plan ``` python test/functorch/test_compile_to_python.py -k dynamic_graph_runs_at_multiple_shapes python test/functorch/test_compile_to_python.py -k graph_has_dynamic_shapes python test/functorch/test_compile_to_python.py ``` Authored with an AI assistant (Claude Code). Co-Authored-By: Claude Fable 5.1 <[email protected]> ghstack-source-id: 27d50e8 Pull-Request: #197357
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Contributor
Author
|
/easycla |
This was referenced Sep 21, 2026
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
bobrenjc93
added a commit
that referenced
this pull request
Sep 21, 2026
…inst a real Dynamo backend graph **Summary.** This is a follow-up to the `_graph_has_dynamic_shapes` fix that made the probe read `"example_value"` as well as `"val"`: it adds the end-to-end regression test that fix was missing and tightens the surrounding prose. `test_dynamo_dynamic_graph_runs_at_multiple_shapes` compiles a module with `torch.compile(dynamic=True)` through a recording backend, lowers the captured graph with `compile_to_python`, and runs the artifact at three batch sizes; on the parent of the original fix the artifact specialized to the example size and failed `assert_size_stride` at every other size. The helper's docstring and the two unit tests now say precisely which graphs carry which key: make_fx writes only `"val"`, the graph Dynamo hands a torch.compile backend carries only `"example_value"`, and Dynamo's export paths stamp `"val"` as well, so `"val"` alone does not identify a make_fx graph. The unit test also covers the union in the other direction (a symbolic `"val"` beside a static `"example_value"`). The code change is prose only; the behaviour under test is the `_graph_has_dynamic_shapes` change in #197258 (the second commit of this stack), which is kept byte-identical because it is already approved. ## Test Plan ``` python test/functorch/test_compile_to_python.py -k dynamic_graph_runs_at_multiple_shapes python test/functorch/test_compile_to_python.py -k graph_has_dynamic_shapes python test/functorch/test_compile_to_python.py ``` Authored with an AI assistant (Claude Code). Co-Authored-By: Claude Fable 5.1 <[email protected]> ghstack-source-id: 93e552a Pull-Request: #197357
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):
Summary. This is a follow-up to the
_graph_has_dynamic_shapesfix that made the probe read"example_value"as well as"val": it adds the end-to-end regression test that fix was missing and tightens the surrounding prose.test_dynamo_dynamic_graph_runs_at_multiple_shapescompiles a module withtorch.compile(dynamic=True)through a recording backend, lowers the captured graph withcompile_to_python, and runs the artifact at three batch sizes; on the parent of the original fix the artifact specialized to the example size and failedassert_size_strideat every other size. The helper's docstring and the two unit tests now say precisely which graphs carry which key: make_fx writes only"val", the graph Dynamo hands a torch.compile backend carries only"example_value", and Dynamo's export paths stamp"val"as well, so"val"alone does not identify a make_fx graph. The unit test also covers the union in the other direction (a symbolic"val"beside a static"example_value").The code change is prose only; the behaviour under test is the
_graph_has_dynamic_shapeschange in #197258 (the second commit of this stack), which is kept byte-identical because it is already approved.Test Plan
Authored with an AI assistant (Claude Code).
Co-Authored-By: Claude Fable 5.1 [email protected]