Skip to content

The jump tables were #219's after all, and the census that missed it is a gate (#225) - #229

Merged
feitreim merged 2 commits into
mainfrom
brx-census-gate
Aug 7, 2026
Merged

feitreim merged 2 commits into
mainfrom
brx-census-gate

Conversation

@feitreim

@feitreim feitreim commented Aug 7, 2026

Copy link
Copy Markdown
Owner

#228 found that the cargo-cache volume had been serving stale builds, and noted
in passing that a fresh regcount at main reads zero jump tables where #227
had recorded 55 unchanged. It left the before/after to whoever would take it on
verified-fresh builds. This is that, on three refs, and it inverts #227's
finding: the tables were #219's after all.

The three readings

Each through _freshen, same image, same sm_100a, same pinned nightly, and in
each container log all four crates are seen to recompile (Compiling ferro-kittens, device-tests, kittens-examples, kittens-experiments):

ref entry functions carrying a brx
3ae07a8 #218, the commit before the access ladder 0 of 309
bda3329 after #219, before #227 55 of 318 (9 shipped)
09beda9 main, after #227 0 of 319

So #219 put every jump table in this tree there and #227 took every one of
them out
— oxide-train's bisect, reproduced in ferro's own PTX, in both
directions. The 55 at bda3329 matches the day-one census exactly, which is the
control: that reading was always right.

Neither negative result #227 built its narrative on survives:

The fix in #227 was right, and right for the reason it gave. What was wrong
was the measurement it took of itself, and the story it wrote from that.

The shared_drain_quad reconciliation, which splits

#225's standing conclusion is "brx is necessary but not sufficient", resting on
two claims. One holds and one does not:

So the shape it carries is the consumer's shape minus the construct the
consumer failed on
. Its doc claimed the opposite in so many words and is
rewritten. It stays — it is still the only entry that instantiates every drain
at once, and a change that makes the ladder expensive again goes red here rather
than in a consumer's bisect — but as a standing check, not as evidence about a
driver.

The gate

The census set its own arming condition ("it arms into a gate when the shipped
set reads zero") and that condition is now met on two builds known to be fresh:
before the ladder existed, and at main.

_print_jump_tables still prints every tabled entry — the diagnostic is
unchanged, and the .branchtargets excerpt with it — and now raises when any
kernel in the shipped set carries one
: everything examples/ emits plus the
GATED_KERNELS rows. Probes are printed and do not fail the run, for the
local-memory depot's reason next door: a probe exists to measure a spelling, and
a spelling worth measuring may be one the library must not ship.

That is not a hole. Nine of bda3329's 55 were shipped, four from examples/
alone, so the #219 regression sits inside the gated set with room to spare.

Verification, in both directions

A gate nobody has watched fail is not a check, so it was run against the tree it
exists to reject.

Green at this branch — scripts/modal-run regcount, exit 0, occupancy gate
green, depot report unchanged:

  jump tables — `brx` in the PTX text, per entry function.
  ...so a shipped kernel carrying one fails this run.
    zero everywhere: none of the 319 entry functions carry one.

Red at bda3329's sources under the same armed modal_app.py — exit 1,
after the full census table printed:

RuntimeError: 9 shipped kernel(s) carry a `brx` jump table:
  examples/gemm_cg2_staged_x8x4: 3
  examples/gemm_sol_m256: 3
  examples/gemm_sol_m256_n128: 3
  examples/gemm_sol_m512: 3
  experiments/gemm_cg2_staged: 3
  experiments/gemm_cg2_staged_x8x4: 3
  experiments/gemm_sol_m256: 3
  experiments/gemm_sol_m256_n128: 3
  experiments/gemm_sol_m512: 3

This is the codegen that lost oxide-train its module at `cuModuleLoadData` with
DriverError(218) (#225) ... The tree read zero at 3ae07a8 and reads zero at
main, so this is a regression and not a baseline.

scripts/fmt --check clean. Four CPU containers total; no GPU seconds.

Also here

…is a gate (#225)

Three readings of `regcount`'s jump-table census, each from a build that
`_freshen` (#228) forced and whose four crates are seen to recompile in the
container log, same image and same pinned nightly:

    3ae07a8   #218, before the access ladder        0 of 309
    bda3329   after #219, before #227              55 of 318   (9 shipped)
    09beda9   main, after #227                      0 of 319

#219 introduced every `brx` in this tree and #227 removed every one of them,
which is the consumer's bisect exactly. #227 reported the opposite -- 51 already
present at 3ae07a8, identical counts across its own fix -- from a comparison
taken across the warm cache volume #228 later found serving stale builds. Both
numbers are superseded. 3ae07a8 has no `AccessWidth` to match on at all, so
zero is the only count that tree can produce.

Half of #225's "necessary but not sufficient" survives and half does not. No GPU
entry point mounts the cache volume (#226), so #227's B200 runs at then-main
really were runs of the 55-table tree and those modules really did load.
`shared_drain_quad` is the half that goes: it was added on the fix branch, after
the fix had put both drains back on a three-case dispatch, so it has never
carried a table and it is inside main's 0 of 319. Its doc said it demonstrated a
JIT taking four of them; it demonstrated nothing of the kind, and now says so.

So the census arms on the condition it set for itself. A kernel in the shipped
set -- `examples/` plus `GATED_KERNELS` -- carrying a `brx` fails the run;
probes are printed and do not, the way the local-memory depot's are. The table
stays as the diagnostic.

Watched in both directions: green at this branch (0 of 319) and red at bda3329's
sources under the same armed `modal_app.py`, naming the nine shipped kernels.
@feitreim
feitreim merged commit c437b89 into main Aug 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant