Repository navigation
[precompile] Stop requiring AOTAutogradCache to key a graph before recording it - #194452
Closed
bobrenjc93 wants to merge 3 commits into
Closed
bobrenjc93 wants to merge 3 commits into
bobrenjc93 wants to merge 3 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/194452
Note: Links to docs will display an error until the docs builds have been completed. ❌ 12 New Failures, 1 Unrelated FailureAs of commit dcb3556 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 22, 2026
Closed
Closed
This was referenced Aug 22, 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 23, 2026
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):
A capture of a large sharded model ends with:
That function is how Dynamo threads a non-tensor external -- a process group, a
stream, a mempool -- into a graph, so a sharded model is built out of them.
AOTAutogradCache is not on the allowlist for it, declines to KEY the graph, and
therefore never SAVES; the bundled artifact precompile records is produced by
that save path, so the capture ends with a backend id and nothing behind it.
The gate being tripped asks "is this key enough to tell this graph's behaviour
apart from another's". A precompile artifact does not depend on that answer: it
is addressed by backend id and refuses to load against a different torch build.
So fall back to a nonce key rather than declining -- which is exactly what
torch._dynamo.aot_compileandaot_compile_joint_with_descriptorsalreadydo, with the config's own comment giving this rationale. Precompile was the one
bundled-artifact producer that did not set it.
This removes the whole class rather than a name at a time. Widening the
allowlist would have needed at least two entries for this one model, and the
second reason it reports -- "Unsupported call_method target getitem" -- is not
even an allowlist gap:
method_targetthere is the RECEIVER node, so it meansa method was called on a node named
getitemthat carries no example_value.Sequenced behind the commit below it, which is not optional. With a nonce key
the keyed lookup still runs, so every graph in one capture shares a keyspace;
until that key was unique per call, turning this on made the second unkeyable
graph in a capture hit the first one's entry.
Test Plan:
Two new tests. The first captures with
backend="inductor"a model callingsomething the cache will not key, and serves it -- it fails without this change
with the exact "never recorded" error. The second asserts every fallback key in
one capture is distinct, and needs the model to be unkeyable on BOTH sides of a
graph break, since one unkeyable graph cannot collide with anything.
Authored with an AI assistant.
Differential Revision: D117073083