pytorch - 💡(How to fix) Fix [caching_precompile] test_automatic_dynamo_graph_breaks_device_cpu regression starting 2026-05-13 on py3.14 [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

NameError: name '_compiled_fn_31<UUID>' is not defined File "test/dynamo/test_package.py", line 502, in test_automatic_dynamo_graph_breaks self.assertEqual(compiled_fn(*args), args[0].sum()) File "torch/_dynamo/eval_frame.py", line 1117, in compile_wrapper result = fn(*args, **kwargs) File "test/dynamo/test_package.py", line 472, in fn if x.sum() == mid: File "test/dynamo/test_package.py", line 474, in torch_dynamo_resume_in_fn_at_472 elif x.sum() < mid: File "test/dynamo/test_package.py", line 472, in torch_dynamo_resume_in_fn_at_474 if x.sum() == mid: File "test/dynamo/test_package.py", line 474, in torch_dynamo_resume_in_fn_at_472 elif x.sum() < mid: File "test/dynamo/test_package.py", line 474, in torch_dynamo_resume_in_fn_at_474 elif x.sum() < mid:

Root Cause

I haven't bisected. These three are flagged purely because they are the largest dynamo-touching changes in the window and the failure is in dynamo's compiled-fn install path (torch/_dynamo/package.py::CompilePackage.install, which binds __compiled_fn_<N>_<UUID> into the module's globals dict).

Fix Action

Fixed

Code Example

pull / ... / test       (default, 4)  26    pull / ... / test-osdc (default, 4)  23
pull / ... / test       (default, 3)  22    pull / ... / test-osdc (default, 3)   7
pull / ... / test       (default, 2)  16    pull / ... / test-osdc (default, 5)   7
pull / ... / test       (default, 5)   7    pull / ... / test-osdc (default, 2)   3
                                             pull / ... / test-osdc (default, 1)   1

---

NameError: name '__compiled_fn_31_<UUID>' is not defined
  File "test/dynamo/test_package.py", line 502, in test_automatic_dynamo_graph_breaks
    self.assertEqual(compiled_fn(*args), args[0].sum())
  File "torch/_dynamo/eval_frame.py", line 1117, in compile_wrapper
    result = fn(*args, **kwargs)
  File "test/dynamo/test_package.py", line 472, in fn
    if x.sum() == mid:
  File "test/dynamo/test_package.py", line 474, in torch_dynamo_resume_in_fn_at_472
    elif x.sum() < mid:
  File "test/dynamo/test_package.py", line 472, in torch_dynamo_resume_in_fn_at_474
    if x.sum() == mid:
  File "test/dynamo/test_package.py", line 474, in torch_dynamo_resume_in_fn_at_472
    elif x.sum() < mid:
  File "test/dynamo/test_package.py", line 474, in torch_dynamo_resume_in_fn_at_474
    elif x.sum() < mid:
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

test/dynamo/test_package.py::TestPackage::test_automatic_dynamo_graph_breaks_device_cpu started failing consistently on 2026-05-13 ~05:21 UTC on linux-jammy-py3.14-clang18, on both the test (linux.4xlarge) and test-osdc (mt-l-x86iavx512-16-128) job variants, across all 5 shards of the default config. Per HUD: 112 recorded failures in 2 days, zero in the preceding 12 days.

HUD: https://hud.pytorch.org/failure?name=pull+%2F+linux-jammy-py3.14-clang18+%2F+test+%28default%2C+5%2C+5%2C+linux.4xlarge%29&jobName=linux-jammy-py3.14-clang18+%2F+test+%28default%2C+5%2C+5%2C+linux.4xlarge%29&failureCaptures=test%2Fdynamo%2Ftest_package.py%3A%3ATestPackage%3A%3Atest_automatic_dynamo_graph_breaks_device_cpu

Earliest failures (UTC)

TimeBranch / SHAJob
05:21gh/drisspg/320/head @ 2526fd8e52c9test (default, 4, 5)
~12-14maintest-osdc (default, 4, 5) and (default, 5, 5)
16:01trunk/3e22c4a0305...test-osdc (default, 1, 5)

Affected jobs per HUD, 112 total over 2 days:

pull / ... / test       (default, 4)  26    pull / ... / test-osdc (default, 4)  23
pull / ... / test       (default, 3)  22    pull / ... / test-osdc (default, 3)   7
pull / ... / test       (default, 2)  16    pull / ... / test-osdc (default, 5)   7
pull / ... / test       (default, 5)   7    pull / ... / test-osdc (default, 2)   3
                                             pull / ... / test-osdc (default, 1)   1

Suspect window

The merge-base of the first known failing commit with main is 9c5a056651f (2026-05-12 23:51 UTC). The first failing job started 5h38m later. Main commits in that window that significantly touch dynamo Variable handling:

  • #181281 Refactor IsInstanceBuiltinVariable (2026-05-13 01:15 UTC)
  • #180630 Refactor HasAttrBuiltinVariable (2026-05-13 01:15 UTC)
  • #180622 Refactor SetAttrBuiltinVariable (2026-05-13 01:15 UTC, 377 LOC in torch/_dynamo/variables/builtin.py)

I haven't bisected. These three are flagged purely because they are the largest dynamo-touching changes in the window and the failure is in dynamo's compiled-fn install path (torch/_dynamo/package.py::CompilePackage.install, which binds __compiled_fn_<N>_<UUID> into the module's globals dict).

Related

  • #182110 — DISABLED test_graph_break_bomb_backend_inductor_device_cpu. Same suite, same NameError: __compiled_fn_<N>_<UUID> is not defined, same py3.14. Auto-filed by the bot; likely the same root cause.
  • Closed TestPackage flake siblings (mostly XPU): #163045, #163032, #162938 (this exact test, XPU variant), #162939, #159334, #156576.

cc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @amjames @jataylo @azahed98 @oulgen @jamesjwu @masnesral @aditvenk @Lucaskabela

Error logs

NameError: name '__compiled_fn_31_<UUID>' is not defined
  File "test/dynamo/test_package.py", line 502, in test_automatic_dynamo_graph_breaks
    self.assertEqual(compiled_fn(*args), args[0].sum())
  File "torch/_dynamo/eval_frame.py", line 1117, in compile_wrapper
    result = fn(*args, **kwargs)
  File "test/dynamo/test_package.py", line 472, in fn
    if x.sum() == mid:
  File "test/dynamo/test_package.py", line 474, in torch_dynamo_resume_in_fn_at_472
    elif x.sum() < mid:
  File "test/dynamo/test_package.py", line 472, in torch_dynamo_resume_in_fn_at_474
    if x.sum() == mid:
  File "test/dynamo/test_package.py", line 474, in torch_dynamo_resume_in_fn_at_472
    elif x.sum() < mid:
  File "test/dynamo/test_package.py", line 474, in torch_dynamo_resume_in_fn_at_474
    elif x.sum() < mid:

Each pytest rerun produces a fresh UUID; the failure is deterministic in the sense that all three retries fail with the same error pattern.

Versions

Not applicable -- this is a CI regression reproducible in pytorch/pytorch CI only. Affected environment per the HUD link above: linux-jammy-py3.14-clang18 on linux.4xlarge (EC2) and mt-l-x86iavx512-16-128 (OSDC) runner classes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - 💡(How to fix) Fix [caching_precompile] test_automatic_dynamo_graph_breaks_device_cpu regression starting 2026-05-13 on py3.14 [1 pull requests]