Skip to content

[precompile] Diagnostics, and the save() checkpoint entry point - #195928

Closed
bobrenjc93 wants to merge 59 commits into
gh/bobrenjc93/1130/basefrom
gh/bobrenjc93/1130/head
Closed

bobrenjc93 wants to merge 59 commits into
gh/bobrenjc93/1130/basefrom
gh/bobrenjc93/1130/head

Conversation

@bobrenjc93

@bobrenjc93 bobrenjc93 commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

The report a caller gets when something cannot ship now names the actual
problem. The risky-drop warning is grouped by guard type and capped per type,
so the shape-bearing drops (SEQUENCE_LENGTH, CONSTANT_MATCH, TYPE_MATCH and
friends) lead the report instead of hiding behind hundreds of CLOSURE_MATCH
identity slots, and it says that a guard reached through a class or function
definition is a compile-time constant that cannot differ at serve time. A
missing compiled backend reports the recorded/total split rather than "never
recorded", and a backend that records nothing serializable (aot_eager) says so
instead of reading as a defect in the model. A serve-time recompile of an
installed artifact is counted (PrecompiledCallable.serve_time_compiles) and
said out loud once per graph, identified by compile id, backend id and the
first traced user line so continuations in a resume chain can be told apart;
the generated banner describes the serving mode it was emitted for. The
bypassed-entry diagnostic in _reject_uninstallable_entry fires from the
empty-frames state, which is what production actually produces, since
_multigraph_frames drops bypassed codes.

This commit also lands cap.save(): callable inside the capture block to
checkpoint everything captured so far to the two on-disk files without ending
the session, so a training loop can rewrite the artifact partway rather than
only at block exit. save() re-renders over the same capture session the exit
path uses, so exit stays the single place the artifact is finalized; a gate
refusal (the DynamoTracer require_* fields) or a write error raises but
leaves the previous files intact and the capture open.

Test Plan:

python test/test_precompile.py -k reports_what_it_compiles_at_serve -k missing_backend_error -k custom_op_captures -k no_dispatchable_graph
python test/dynamo/test_precompile_package.py -k risky_drop_warning_leads -k unserializable_backend_says_so
python test/test_precompile.py
python test/dynamo/test_precompile_package.py

Authored with an AI assistant.

[no ci]

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

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 Sep 3, 2026
This was referenced Sep 3, 2026
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@bobrenjc93 bobrenjc93 closed this Oct 16, 2026
@github-actions
github-actions Bot deleted the gh/bobrenjc93/1130/head branch November 17, 2026 01:47
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 release notes: dynamo topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant