Skip to content

[precompile] End-to-end tests for the dynamo tracer's guard policy, installed mode and numerics - #195922

Closed
bobrenjc93 wants to merge 7 commits into
gh/bobrenjc93/1124/basefrom
gh/bobrenjc93/1124/head
Closed

bobrenjc93 wants to merge 7 commits into
gh/bobrenjc93/1124/basefrom
gh/bobrenjc93/1124/head

Conversation

@bobrenjc93

@bobrenjc93 bobrenjc93 commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Tests only. The public tracer="dynamo" surface landed in the previous
commit with the tests of its calling convention and its core round trips;
the rest of the end-to-end coverage did not fit under the size limit there,
so it lands here. These pin, through torch.compiler.precompile and
load: that a custom guard filter composes with the default and a drop it
adds is refused as risky; that the guard-drop policy keeps every guard that
discriminates -- value pins, branch flags, shapes, TYPE_MATCH, dict membership
-- and drops only invariant identity guards, reported in the artifact header;
that serialized guards carry no export bookkeeping or fake-tensor machinery;
that a guarded non-module object prunes its unguarded attributes and an
interned value never poisons the artifact; the installed serving mode's
lifecycle (load installs nothing, racing first calls install once, a call
racing unload cannot reinstall, unload releases the recorded backends, fn=
refuses a foreign function, a missing captured module raises
PrecompileError); automatic dynamic across graph breaks; eager-backend round
trips through HOPs, autocast and checkpoint; kernels rendered as source with
per-subgraph names; and device-generic numerics -- dynamo-tracer round trips, unbacked
dynamic shapes and fx custom builtins, plus the make_fx artifact's
capture-time autocast pinning -- instantiated only for CPU when no GPU is
present. Three package-level tests
on serving concurrency and shared inner frames are added to
test_precompile_package.py for the same reason.

Test Plan:

python test/test_precompile.py
python test/dynamo/test_precompile_package.py

Authored with an AI assistant.

[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/195922

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

❌ 32 New Failures

As of commit 37f4438 with merge base 1ad121e (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

This was referenced Sep 3, 2026
[ghstack-poisoned]
@bobrenjc93 bobrenjc93 added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 4, 2026
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
bobrenjc93 added a commit that referenced this pull request Sep 4, 2026
…nstalled mode and numerics

Tests only. The public ``tracer="dynamo"`` surface landed in the previous
commit with the tests of its calling convention and its core round trips;
the rest of the end-to-end coverage did not fit under the size limit there,
so it lands here. These pin, through ``torch.compiler.precompile`` and
``load``: that a custom guard filter composes with the default and a drop it
adds is refused as risky; that the guard-drop policy keeps every guard that
discriminates -- value pins, branch flags, shapes, TYPE_MATCH, dict membership
-- and drops only invariant identity guards, reported in the artifact header;
that serialized guards carry no export bookkeeping or fake-tensor machinery;
that a guarded non-module object prunes its unguarded attributes and an
interned value never poisons the artifact; the installed serving mode's
lifecycle (load installs nothing, racing first calls install once, a call
racing unload cannot reinstall, unload releases the recorded backends, ``fn=``
refuses a foreign function, a missing captured module raises
PrecompileError); automatic dynamic across graph breaks; eager-backend round
trips through HOPs, autocast and checkpoint; kernels rendered as source with
per-subgraph names; and device-generic numerics -- dynamo-tracer round trips, unbacked
dynamic shapes and fx custom builtins, plus the make_fx artifact's
capture-time autocast pinning -- instantiated only for CPU when no GPU is
present. Three package-level tests
on serving concurrency and shared inner frames are added to
test_precompile_package.py for the same reason.

Test Plan:

```
python test/test_precompile.py
python test/dynamo/test_precompile_package.py
```

Authored with an AI assistant.

ghstack-source-id: 228ef8a
Pull-Request: #195922
[ghstack-poisoned]
[ghstack-poisoned]
bobrenjc93 added a commit that referenced this pull request Sep 5, 2026
…nstalled mode and numerics

Tests only. The public ``tracer="dynamo"`` surface landed in the previous
commit with the tests of its calling convention and its core round trips;
the rest of the end-to-end coverage did not fit under the size limit there,
so it lands here. These pin, through ``torch.compiler.precompile`` and
``load``: that a custom guard filter composes with the default and a drop it
adds is refused as risky; that the guard-drop policy keeps every guard that
discriminates -- value pins, branch flags, shapes, TYPE_MATCH, dict membership
-- and drops only invariant identity guards, reported in the artifact header;
that serialized guards carry no export bookkeeping or fake-tensor machinery;
that a guarded non-module object prunes its unguarded attributes and an
interned value never poisons the artifact; the installed serving mode's
lifecycle (load installs nothing, racing first calls install once, a call
racing unload cannot reinstall, unload releases the recorded backends, ``fn=``
refuses a foreign function, a missing captured module raises
PrecompileError); automatic dynamic across graph breaks; eager-backend round
trips through HOPs, autocast and checkpoint; kernels rendered as source with
per-subgraph names; and device-generic numerics -- dynamo-tracer round trips, unbacked
dynamic shapes and fx custom builtins, plus the make_fx artifact's
capture-time autocast pinning -- instantiated only for CPU when no GPU is
present. Three package-level tests
on serving concurrency and shared inner frames are added to
test_precompile_package.py for the same reason.

Test Plan:

```
python test/test_precompile.py
python test/dynamo/test_precompile_package.py
```

Authored with an AI assistant.

ghstack-source-id: c9a0eda
Pull-Request: #195922
@bobrenjc93 bobrenjc93 closed this Oct 17, 2026
@github-actions
github-actions Bot deleted the gh/bobrenjc93/1124/head branch November 17, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor 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