Skip to content

Add FX graph cache custom guard replay test - #188050

Closed
jansel wants to merge 2 commits into
gh/jansel/1511/basefrom
gh/jansel/1511/head
Closed

jansel wants to merge 2 commits into
gh/jansel/1511/basefrom
gh/jansel/1511/head

Conversation

@jansel

@jansel jansel commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

AOTAutograd passes a custom guard evaluator into the FX graph cache so it can enforce its exact-match guard contract. A previous guard-provenance change accidentally bypassed that evaluator during cache-hit post-load guard replay, which regressed vLLM through the AOTAutograd cache path.

Add a focused cache-hit test that mocks a stored graph and verifies FxGraphCache._lookup_graph invokes the caller-supplied guard evaluator when replaying guards after load.

Test Plan:

PYTHONPATH=. python test/inductor/test_codecache.py TestFxGraphCache.test_cache_hit_replays_custom_guard_evaluator

lintrunner -a

Generated by my agent

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jun 24, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/188050

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ You can merge normally! (5 Unrelated Failures)

As of commit 214b4cf with merge base c004e2d (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs 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.

[ghstack-poisoned]
jansel added a commit that referenced this pull request Jun 24, 2026
AOTAutograd passes a custom guard evaluator into the FX graph cache so it can enforce its exact-match guard contract. A previous guard-provenance change accidentally bypassed that evaluator during cache-hit post-load guard replay, which regressed vLLM through the AOTAutograd cache path.

Add a focused cache-hit test that mocks a stored graph and verifies FxGraphCache._lookup_graph invokes the caller-supplied guard evaluator when replaying guards after load.

Test Plan:

PYTHONPATH=. python test/inductor/test_codecache.py TestFxGraphCache.test_cache_hit_replays_custom_guard_evaluator

lintrunner -a

Generated by my agent

ghstack-source-id: fa48003
Pull-Request: #188050
@jansel
jansel requested a review from williamwen42 July 6, 2026 16:51
@jansel

jansel commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@zou3519 can you review this?

@jansel jansel closed this Jul 16, 2026
@github-actions
github-actions Bot deleted the gh/jansel/1511/head branch August 16, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant