Repository navigation
[precompile] Actually remove a dropped guard from the artifact - #194409
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/194409
Note: Links to docs will display an error until the docs builds have been completed. ❌ 11 New Failures, 1 Unrelated FailureAs of commit 55a3976 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 21, 2026
Closed
Closed
This was referenced Aug 22, 2026
Closed
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):
Dropping an unrebuildable guard did not, in two separate ways, produce an
artifact that could be served.
FIRST: the drop was recorded but not applied. Capture logged ten drops and
listed them in DROPPED_GUARDS; the pickle still contained all ten, so
loadrefused the artifact with the same AttributeError the capture had already
reported handling. A reviewer reading the header would believe the guard was
gone.
That is a regression from further down this stack. The pruning lives inside
build_filter_entries, which used to run for every CheckFunctionManager."Build a precompiled frame's guard tree twice, not three times" then stopped
calling it when there is no RUNTIME filter -- exactly the configuration
_apply_guard_policyuses -- and derived the filter entries from the runtimebuilder instead. The failures were still collected, so the log and the header
were right; nothing pruned
all_guards, so the serialized set was not. Thepruning is now its own step, run after EVERY build that can collect.
SECOND, and this one was never right: a guard on
base.attrdoes not travelalone. Dynamo also emits a HASATTR on
baseforattr, and that guard'struth value is RECOMPUTED at rebuild by reading the reconstructed object. Drop
only the first and the second comes back as its own inverse --
not hasattr(base, attr)-- so the artifact loads and then rejects the verycall it was captured on:
So the companions go with it: anything keyed on the same (base, attribute) link,
recorded as risky alongside the guard that failed. With both fixes the minimal
case -- exactly one guard dropped, everything else intact -- captures, loads and
serves, matching eager.
Both messages now name the frame. Several frames can guard the same source
string -- the model this came from captured ten variants each of two frames
guarding the same weakref -- so without it there is no telling "recorded but not
applied" from "one frame swept and another missed", and those need different
fixes.
Test Plan:
test_aot_compile.py has 3 pre-existing failures in this environment
(test_aot_compile_with_aoti*,
fatal error: cuda.h).The existing drop test asserted only that the drop was RECORDED, which is what
let both of these through. It now injects the fault NARROWLY -- one attribute
stops being carried, the rest of the artifact is untouched, so a dropped guard
is distinguishable from a wrecked artifact -- then decodes the shipped artifact,
asserts the dropped source is absent from every variant's guard state, loads it,
and SERVES it against eager. Each half fails on its own without its fix.
Authored with an AI assistant.
Differential Revision: D116983946