Explore report · NVIDIA/hyperflare-inference #639

Raw Markdown for agents: https://autobot.eidonix.com/p/c22f296d-90a6-4312-b44d-aa607d5dfcac.md

Case file — #639 "ignition: tune discrete CompilePool sizing and scale Inductor compile threads"

Open draft, head 3400e3a, base main (branched 0a8c20f), +58 / −18 in 4 files, author original-el8 (= "Jason Cook" in commits; Discord el8). No labels, no reviews, no comments, CI failing on head. Everything below is from the diff, the code at head, and related items read in full.

Key findings (what the description does not tell you)

  1. The default path relaxes too, not just "large runtime reserves". bootstrap.py:35 defaults headroom_bytes = 4 << 30 and bootstrap.py:134 passes plan.headroom_bytes + plan.reserve_bytes down, so under #639 every discrete export's compile-time device reserve drops 4 GiB → 1 GiB (compile_pool.py:51). The "Why" frames this as only affecting large configured reserves, which is the exception, not the common case.
  2. Worker counts rise materially and silently. The changed test moves from 10 to 16 workers for 12 GiB free with 2 GiB headroom (tests/preparation/test_compile_pool.py:40-41 on main vs :43-45 at head; same in the diff hunk of test_forward_compiler_uses_explicit_host_budget_without_eight_worker_cap). 3 GiB free goes 3 → 4 workers (test_compile_pool.py:374-388).
  3. A sibling thread patch is left at 1. DeferredCompiledForward.materialize_for_capture still uses torch._inductor.config.patch(compile_threads=1) (aot.py:688), so aot.py now carries two conflicting thread policies; the description does not mention the one it left alone.
  4. The hasattr(os, "cpu_count") guard is a test artifact. test_windows_compiler_workers_fit_host_ram_with_larger_device_budget (tests/preparation/test_compile_pool.py:467-476) was not updated, monkeypatches compile_pool.os to a SimpleNamespace without cpu_count, and still asserts (workers, compile_threads) == (1, 1). The guard at compile_pool.py:139 exists so that mock falls back to None → inner_threads = 1. Consequence: Windows thread partitioning is untested, though the description says "spawn" is "preserved on Windows".
  5. Affinity/cpu_count mismatch. Worker count comes from len(os.sched_getaffinity(0)) via cpu_workers (host_memory.py:31); the new per-worker thread count comes from raw os.cpu_count() (compile_pool.py:139-140). On a cgroup- or taskset-limited rank, threads are budgeted from the whole machine while processes are budgeted from the mask — the exact case test_explicit_forward_workers_are_bounded_by_cpu_affinity exists to protect. Worst case: 32 admitted workers × 4 threads = 128 Inductor subprocesses on a 128-core host.
  6. It reverses a policy main deliberately set. c8d4c324 (Luke Alonso, 2026-11-09, "Budget forward compiler workers across each host") admits worker with "one Inductor thread each"; #122's author records that its earlier per-compiler-threading measurements (~510 s vs 905.7 s) "came from extra Inductor threads per compiler, a mechanism main no longer has, so they are withdrawn". #639 reinstates multi-threaded compiler workers in a new form without citing that.
  7. The host-RAM side is deliberately untouched, so the open bug it looks adjacent to (#242) is not addressed: CompilerResources.headroom is still max(_HEADROOM_BYTES, headroom_bytes if shared else 0) (compile_pool.py:62), i.e. an 8 GiB floor on discrete, and allocate_workers subtracts that from host memory (compile_pool.py:73-84).
  8. CI is failing on the head commit while the description lists only green unit runs; the headline hardware number has no main baseline.
  9. #597 is open, reviewed "Ready To Merge" (2026-11-30 12:22), and edits the same compile_pool.py/aot.py. Its review reasoned about the pre-#639 CompilePool.__init__. #639 would need a rebase, and #597 is much further along.
  10. No issue is linked or fixed, and nobody has engaged: zero comments, reviews, labels, or Autobot review.

The change

Verified against the diff and the files at head.

Description vs diff. Nothing in the four files is undeclared at file level, and the Before/After structure is accurate. Undeclared items are 1–5 in Key findings, plus: the exact worker-count delta is never quantified; the 24-cap in aot.py conflicts in spirit with the configured _OPTIONS['compile_threads'] = min(16, cpu_count) (compilation.py:30); the per-worker thread count is now derived from the pool size rather than from that configured value (which survives only as the worker-count cap at compile_pool.py:42-44); no doc, comment or TODO outside the touched lines is updated; and the diff bundles three unrelated concerns (device estimate, headroom cap, thread/start-method policy).

The why

No issue is cited, linked or fixed. Closest existing reports, none claimed:

So the "why" rests on the author's own GB300 measurements, not on tracked bug reports. The coupling the description does state is real: compile_threads=1 is also what disables Inductor's nested pool, so the worker_start_method requirement only becomes live once threads > 1.

Recent activity

People

Community

pr_comments on #639 → "No comments". No reviews, no reactions, no labels. The only cross-reference in the whole repo is #597's overlap list, which names #639 among PRs touching compile_pool.py/aot.py. Discord handle el8 is given, consistent with the repo's practice of routing discussion off-GitHub. No prompt-injection attempts in the description or in any thread read for this case file (the only "instructions" seen are Autobot's own review footers in #509/#597, treated as material).

Project fit

Lines up: it lives in shared preparation code with no per-model branches (ignition/preparation/), matching "Keep the runtime small and model-agnostic" and docs/preparation-development.md:314-322 ("Shared preparation code detects integrated GPUs and budgets compiler workers and tuning races against available system RAM"). It targets exactly the charter's hardware (SM103/SM120/SM121).

Tensions:

Claims and evidence

Claim Backing
146 passed / 0 failed on four preparation test files, CPU-only Consistent with CI scope (python-cpu.yml:30-33 runs the whole tests/ tree with CUDA_VISIBLE_DEVICES=""), but no log or run URL cited, no per-file counts
56 passed, 14 skipped, 0 failed on five more Uncited, plausible
GPU-gated tests skipped Accurate; repo-wide condition — no CI workflow runs GPU preparation tests
CI green implied Contradicted: CI on head 3400e3a is failing. Nothing in the description explains the failure
DeepSeek-V4.1 101/101 forwards in 359.8 s; Inkling-2-Small 148-graph forwards, no daemonic errors, no device OOM on GB300/SM103 No main baseline, no worker/thread counts, no memory samples, and "combined-stack export validation" implies other unmerged changes were in play. Also on a 288 GB HBM part — the hardware where freeing device memory matters least
~672 MiB measured footprint behind 704 MiB No artifact, log, recipe or trace in the PR
Inductor needs worker_start_method="subprocess" on POSIX when nested Consistent with compile_pool.py:151-160 (POSIX uses SubprocPool(kind=SPAWN)) and compilation.py:31-32 (Windows spawn); not independently reproduced here

New tests: test_prepare_many_scales_inductor_compile_threads_with_cpu_count (tests/preparation/test_forward_compile_options.py:333-341) monkeypatches aot.os.cpu_count → 64 and asserts the patched value is 24 — it checks the number reaches the patch, not that the scope or the subprocess effect works. The worker/thread assertions in test_compile_pool.py:28 and test_forward_compile_options.py:282 compute min(8, cpu_count // workers) inline, i.e. they mirror the implementation formula rather than pin an expected value. All GPU-side inputs are monkeypatched (mem_get_info, get_device_properties), so no test validates that 704 MiB is a safe estimate, and none covers the materialize_for_capture=1 inconsistency.

Reach

Process

Draft; opened and updated within ~20 minutes on 2026-11-30; hours old. Base main, head 3400e3a14ec49d066d223820e054f004c8e2b2d1. CI failing. No labels, reviews, comments, or Autobot review. The description follows the charter's required four parts (why / what / result / evidence) plus a Limitations section, which is more complete than most drafts at this age. File map at head: compile_pool.py +15/−6 (lines 22-25, 49-55, 137-144); aot.py +2/−2 (901-903); test_compile_pool.py +25/−9; test_forward_compile_options.py +16/−1. Load-bearing but untouched: compilation.py:26-32, host_memory.py:13-16,25-35, bootstrap.py:35,134, compile_pool.py:65-96.

Leads followed / not relevant

Followed in full: #122, #509, #584, #597, #242, #425, #474, #543, #462. Judged not relevant with reasons: #112 (b12x lru_cache publication defect, not sizing), #310 (Inductor lowering defect reached through warmup), #268 (per-model SM120 warmup failure), #482/#462 (device_bytes identifier / tight-VRAM cleanup only — _DISCRETE_WORKER_DEVICE_BYTES/_WORKER_DEVICE_BYTES grep only to compile_pool.py:23,25,48), #512/#314 (file overlap only), author's #640/#632/#633/#604/#532 (different subsystems). Searches returning nothing: "daemonic processes are not allowed to have children", "Inductor compile threads wrong nested daemonic SubprocPool", "compile workers slow host CPU cores idle preparation", "compile threads per worker host CPU affinity worker pool budget". Absence recorded as a finding: no filed bug or request asks for extra Inductor threads per compiler worker.

Open questions

  1. Why is CI red on 3400e3a, and does it touch these files?
  2. What exact compile_workers / headroom_bytes did the DeepSeek-V4.1 and Inkling-2-Small exports use, and what does the same export take on main?
  3. Is 704 MiB safe for the largest shipped forward (the old comment cited "Kimi K3's 93-layer forwards")? Where is the 672 MiB measurement?
  4. Is 8 GiB of host headroom still subtracted on discrete hosts by design (compile_pool.py:62) — i.e. is the host-RAM side of #242 deliberately out of scope?
  5. Which lands first, #597 or #639, and does #597's groups= work assume the 8-worker/1-thread world?
  6. Was DeferredCompiledForward.materialize_for_capture's compile_threads=1 (aot.py:688) left alone on purpose?