Skip to content

[precompile] Name the graph in the serve-time recompile warning - #194549

Closed
bobrenjc93 wants to merge 4 commits into
gh/bobrenjc93/1064/basefrom
gh/bobrenjc93/1064/head
Closed

bobrenjc93 wants to merge 4 commits into
gh/bobrenjc93/1064/basefrom
gh/bobrenjc93/1064/head

Conversation

@bobrenjc93

@bobrenjc93 bobrenjc93 commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

An installed artifact answers a guard miss by compiling, and says so. What it
did not say was WHICH graph. It named type(gm._orig_mod).__name__, which is
the same string for every graph a model produces, so a capture that recompiled
nine graphs printed "GraphModule" nine times. A reader could tell that coverage
was leaking but not where, and on a model whose submodule calls each break the
graph -- a resume chain, where every continuation is a separate compile -- that
is the whole question.

Three things identify a graph from inside a backend and all are already there.
The compile id keys tlparse. The backend id keys the artifact, so a warning can
be matched against summary().backend_graphs. And the first node carrying a
stack trace names the user line, which for a continuation is the resume frame
Dynamo minted -- torch_dynamo_resume_in_forward_at_86 -- which is the only
one of the three that distinguishes one break in a chain from the next by
something a reader recognises.

precompile: serving compiled a NEW graph -- no captured variant matched
this call ... Graph: compile id 9/0; backend id __compiled_fn_26_71491030;
first traced at File "model.py", line 87, in torch_dynamo_resume_in_forward_at_86.

Test Plan:

python test/test_precompile.py
python test/dynamo/test_package.py

One new test serves an uncovered input through an installed artifact whose
entry breaks its graph twice, and asserts every warning carries all three
identifiers and that no two warnings are identical -- the last being the
property that was missing, since nine copies of one string is what made the
old message useless.

Authored with an AI assistant.

Differential Revision: D117282530

[ghstack-poisoned]
@bobrenjc93 bobrenjc93 added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category labels Aug 23, 2026
@pytorch-bot

pytorch-bot Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 12 New Failures, 1 Unrelated Failure

As of commit 8f7c71d with merge base 1b4e490 (image):

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.

@pytorch-bot pytorch-bot Bot added ciflow/inductor ciflow/torchtitan Run TorchTitan integration tests module: dynamo labels Aug 23, 2026
This was referenced Aug 23, 2026
[ghstack-poisoned]
@bobrenjc93

Copy link
Copy Markdown
Contributor Author

@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

[ghstack-poisoned]
@bobrenjc93

Copy link
Copy Markdown
Contributor Author

@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

[ghstack-poisoned]
@bobrenjc93

Copy link
Copy Markdown
Contributor Author

@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@bobrenjc93

Copy link
Copy Markdown
Contributor Author

@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@bobrenjc93

Copy link
Copy Markdown
Contributor Author

Superseded by the canonical precompile stack #195353-#195362; this change lives in #195362 (with the guard-drop policy half in #195360). Closing to consolidate review there. The branch is kept on GitHub.

@bobrenjc93 bobrenjc93 closed this Sep 3, 2026
@github-actions
github-actions Bot deleted the gh/bobrenjc93/1064/head branch November 11, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/torchtitan Run TorchTitan integration tests ciflow/trunk Trigger trunk jobs on your pull request module: dynamo topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant