Repository navigation
[precompile] Say what an installed artifact actually does when a guard misses - #194450
Closed
bobrenjc93 wants to merge 2 commits into
Closed
bobrenjc93 wants to merge 2 commits into
bobrenjc93 wants to merge 2 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/194450
Note: Links to docs will display an error until the docs builds have been completed. ❌ 14 New Failures, 1 Unrelated FailureAs of commit b43d795 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):
An installed artifact answers a guard miss by COMPILING a fresh graph, not by
refusing. That is deliberate and necessary -- a frame reachable only through the
frame evaluator has no other way to run, and a large model has plenty of them --
but it was invisible in three ways at once.
The artifact's own generated banner said the opposite. It was emitted for both
serving modes and described only the standalone one: "Nothing is installed onto
your code objects and no frame evaluator is involved" and "a call no captured
variant covers RAISES rather than compiling a new one". Both false for
SERVING_MODE="installed", on that artifact's own front page. It is now split per
mode and the installed text says what installed does.
Nothing was logged. And because serving wires the package through
torch._dynamo.optimize(..., isolate_recompiles=True), the artifact has a private
cache identity, so TORCH_LOGS=recompiles prints nothing either. A user watching
an artifact quietly serve less of itself on every batch saw exactly what a
healthy one looks like. There is now a warning at the single choke point every
serve-time compile passes through.
And there was nothing to measure. serve_time_compiles() on the loaded object
returns the count, which is the number to gate a job on: zero means the artifact
covered every call it saw. This matters more than it sounds for the change below
it in the stack -- protecting TYPE_MATCH turns a silent wrong answer into a
guard miss, and in installed mode a guard miss is a silent RECOMPILE returning
the right answer. Strictly safer and completely invisible without this.
Test Plan:
The new test asserts all three: the banner no longer makes the standalone claim,
serving a covered call leaves the count at zero, and serving an uncovered one
raises it.
Authored with an AI assistant.
Differential Revision: D117073081