pgw#989: the dynamo mint's warmup_forward hour gets a breakdown, and inductor_compile: 0.0 stops lying - #511
Merged
Merged
Conversation
…d `inductor_compile: 0.0` stops lying
Every published JIT cell reported the same phase table — sdxl w8a8-lora64,
L40S, gen-worker 0.93.1, pod wz4g1ya8a4khne, 2026-08-06:
{'load': 13.87, 'warmup_forward': 4416.91, 'inductor_compile': 0.0,
'seal_publish': 96.809, 'finalize': 0.155}
97.6 % of the mint under one name, next to a zero named after the work.
The zero is not a broken clock. `mint_child` opened the `inductor_compile`
frame around `_drain_router`, and a fleet mint arms COLD with no router
(gw#587), so that phase measured an empty queue — while every compile ran
INLINE inside the warm forwards, i.e. inside `warmup_forward`. The drain is
now `router_drain`.
`gen_worker.warm_spans` measures the split the bucket was hiding: per warm job
and in total, `warm_compile_s` vs `warm_execute_s`, with the inductor
partition inside the compile half and an explicit `compile_other_s` residual.
The parent re-emits it as `jit_compile` rows (`warm:totals`, `warm:<member>`,
`warm_job:<name>`), so an AOT-vs-JIT comparison stays one grouped query.
The key set is the JIT one, and that is the reason for a second module rather
than reuse: MEASURED on the pin (torch 2.13.0+cu130), the AOT partition prices
one `torch.compile` call at 1.104 s of 5.054 s — 22 % — because
`AotCodeCompiler.compile` is AOT-only. `_compile.compile_inner` is the JIT
total and `PyCodeCache.load_by_key_path` (63 %) is where a JIT compile's time
actually goes.
Tests: 9 rows at the real seams over a frozen REAL metric delta — the
partition reconciles to the total with a named residual, the AOT key set is
shown to miss 78 % of the same compile, overlays are never summed in, a failing
warm job keeps its seconds, an unmeasurable wall OMITS the ratio rather than
reporting "compiled 0 %", and the parent emits/stays silent correctly.
Suite: 3302 passed, 37 skipped, 1 xfailed; mypy clean (232 files); ruff clean.
Contributor
Author
|
Rebased onto Suite re-run after the rebase: 3318 passed, 37 skipped, 1 xfailed; mypy clean (232 files), ruff clean. This also rides |
PaulFidika
force-pushed
the
989-mint-warm-attribution
branch
from
August 7, 2026 02:21
442c7f1 to
91a44ef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The number
Every published JIT cell reports this shape. sdxl w8a8-lora64, L40S, gen-worker 0.93.1, pod
wz4g1ya8a4khne, cellck5-a53e02a7885f9312fb1fa7df…, 2026-08-06 — read off the hub's ownworker_activity_events, not a log:97.6 % of the mint is one row, and the row named after the work is zero.
The zero is not a broken clock.
mint_childopened theinductor_compileframe around_drain_router, and a fleet mint arms COLD with no router (gw#587) — so that phase measures an empty queue, while every compile runs INLINE inside the warm forwards.warmup_forwardis therefore a bucket holding compile AND execution with no way to tell them apart, which is exactly the shape you cannot optimise or regression-test: a compile-bound mint and a warm plan running too many forwards look identical.What changes
router_drain— what it is.PHASE_INDUCTOR_COMPILEkeeps its real meaning on the AOT path (aot_mint) and in the executor.gen_worker.warm_spans— a ledger around the warm loop. Per job and in total:warm_compile_svswarm_execute_s(an honest residual), the inductor partition inside the compile half, andcompile_other_sso a newly-introduced phase shows up as the residual growing rather than as time vanishing (pgw#830's rule, applied to the JIT path).MintReport.mint_phases, documented as "empty for the dynamo recipe, which has no per-graph-class breakdown", now carries it. The parent re-emits underjit_compile/warm:totals,warm:<member>,warm_job:<name>— same kind, so an AOT-vs-JIT comparison stays ONE grouped query.Why a second key set and not the AOT one
MEASURED on the pin (torch 2.13.0+cu130), one
torch.compilecall, 5.06 s wall:aot_compile_spans)host_compile_s= 0.000 —AotCodeCompiler.compileis AOT-only_compile.compile_innerPyCodeCache.load_by_key_pathasync_compile.waitReusing the AOT key set would have priced this mint at a fifth of its cost and called the rest residual. That containment is asserted as a test row, so a pin bump that moves it fails loudly.
Identity
No cell is re-keyed.
mint_child,mint_delegate,activityand the newwarm_spansare all outsidecompile_cache.static_code_closure(verified against the live 147-file closure), and nothing here touches the traced graph, the seal, or codegen. Telemetry only: every path is exception-swallowing and cannot fail a mint.Tests
tests/test_warm_spans_pgw989.py— 9 rows at the real seams, no card and no compile required, over a frozen REAL metric delta:_compile.compile_innerwith a named residual;parallel_kernel_cpu_slegitimately exceeds the wall — it prices the async workers' CPU);compile_fractionrather than reporting "compiled 0 %";On
origin/master:warm_spansdoes not exist,mint_childcarries 2phase="inductor_compile"frames,mint_delegatehas no_emit_warm_ledger,activityhas noPHASE_ROUTER_DRAIN.Verification
tests/3302 passed, 37 skipped, 1 xfailed (-n 4 --dist loadfile)Note for the release lane
This is master-only.
mastercarries the wire-v1 protocol cut and cannot talk to the deployed pre-v1 hub, so do not fork a wheel off this — if the attribution is wanted on a pod before the next minor, it should ride the attempt-24 lane's0.93.2patch offv0.93.1rather than a second patch line.