Repository navigation
[precompile] Search the whole guard state for the unpicklable value - #194622
Closed
bobrenjc93 wants to merge 4 commits into
Closed
bobrenjc93 wants to merge 4 commits into
bobrenjc93 wants to merge 4 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/194622
Note: Links to docs will display an error until the docs builds have been completed. ❌ 13 New Failures, 1 Unrelated FailureAs of commit 8ad8f64 with merge base 1b4e490 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Aug 24, 2026
Closed
Closed
This was referenced Aug 24, 2026
Contributor
Author
|
@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This was referenced Aug 26, 2026
Contributor
Author
|
@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This was referenced Aug 28, 2026
Contributor
Author
|
@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
Contributor
Author
|
@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
Author
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):
An unpicklable value in the guard state raises with its type and, since
D116962600, the attribute path that reaches it -- unless it lives outside the
two scopes, where it still arrives bare:
Two things were wrong, and only the second one mattered.
pickle_guards_stateemptiesoutput_graph.global_scopebefore dumping, aspart of pruning what an AOT precompile does not need, and the diagnostic runs
afterwards from the
exceptand reads the scope that was just emptied. Real,fixed by snapshotting the roots first -- and on the capture that prompted this,
worth two objects, which is why it changed nothing.
The reason it changed nothing is the root set. The walk started at
local_scope+global_scope, five objects on that capture, while the picklerwalks
state: the whole output graph, its guards, its guard-tree values. Avalue held by a compiler internal reachable from the guards is not reachable
from either scope, so the search could not find it however well the scopes were
preserved. Both reported frames were that shape -- one a lock inside
triton.compiler, one under a resume function -- and both reported nothingwhile four sibling frames in the same run reported
local_scope['self']correctly. The diagnostic was not failing to run; it was searching the wrong
five objects.
Search from
state. The scopes stay as SEEDS ahead of it in the queue, so avalue living in one still reports the short readable path rather than a longer
route through the graph. The visit cap goes up accordingly: the walk runs once,
on a path that is already raising.
Test Plan:
Two new tests. One asserts a value reachable only through a global is found
from the snapshot and not from the pruned scope, so it fails if the snapshot is
taken a line too late. The other puts a lock on a compiler-internal-shaped
object hanging off the guards, reachable from neither scope, and asserts both
that it is now named and that a value reachable BOTH ways still reports the
short scope path -- the property that makes rooting at
statean additionrather than a regression in readability.
Not reproduced end to end. Getting an unpicklable value into a real guard state
needs a guard that reads it -- the pruning correctly discards it otherwise --
and every natural shape I built captured cleanly. The defect is plain enough on
inspection that I would rather fix it and say the tests are unit tests than
leave it because the model that hit it is not one I can run.
Authored with an AI assistant.
Differential Revision: D117286103