Repository navigation
[precompile] Record entry defaults and emit the multi-graph driver - #197990
Closed
bobrenjc93 wants to merge 1 commit into
Closed
bobrenjc93 wants to merge 1 commit into
bobrenjc93 wants to merge 1 commit into
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/197990
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: ✅ You can merge normally! (2 Unrelated Failures)As of commit 9b8d0c4 with merge base d78bbf2 ( 🟢 GREEN LIGHT - PR approved to be merged without human review:
reason: CRCR (non-blocking) - The following CRCR downstream CI jobs failed but are non-blocking:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Sep 21, 2026
Closed
Closed
Closed
Closed
Closed
This was referenced Sep 21, 2026
Closed
Closed
Closed
Contributor
Author
|
@pytorchbot merge -i |
Collaborator
Merge startedYour change will be merged while ignoring the following 0 checks: Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
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. Two small pieces complete the multi-graph artifact plumbing in
torch/_precompile.py._entry_binding(fn)records the entry's__defaults__and__kwdefaults__, which a code object does not carry; without them a defaulted parameter is absent from the served call'sf_localsand every guard misses. Closure cells are deliberately not recorded: a closure entry is refused earlier (a rebuilt cell would be a new object Dynamo's identity guard misses anyway), and the driver refuses one that arrives regardless rather than rebuilding it over empty cells._emit_multigraph_driver_source()renders_build_multigraph_forwardinto the artifact withinspect.getsource, the same path the other drivers use, followed byforward = _build_multigraph_forward()and the sameif __name__ == "__main__"hint block the single-graph artifacts end in.import inspectmoves to module scope, replacing the function-local import_emit_driver_sourcehad. Because that section ends in a top-level assignment,_parse_artifact_metadatano longer describes one as hypothetical and skipsforwardwithout the "unrecognized assignment" debug line, which stays a signal for a malformed artifact.Examples
Test Plan:
Authored with an AI assistant.
🤖 Generated with Claude Code
Co-Authored-By: Claude Fable 5.1 [email protected]