Repository navigation
The pin reaches ferro main, and the module the driver refused loads: #227 confirmed downstream - #130
Merged
Merged
Conversation
Bumps `ferro-kittens` from `3ae07a8` (#218) to `b589b8a` (#227) across all four manifests. Zero source churn: this repo never called `access_width` directly, only the two drains, and #227 left their signatures alone. This bump is also the experiment ferro #227 could not run. #219's exhaustive `match AccessWidth` put four `brx.idx` jump tables in `gemm_tcgen05_bf16_optimized` and the driver's PTX JIT refused the module at `cuModuleLoadData` with `DriverError(218)` (oxide #127, ferro #225). ferro could not reproduce the refusal -- the same tables load fine there -- and restored the compare-chain lowering anyway. Whether `cargo oxide run gemm` loads at this pin is the only test that exists.
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.
Bumps the pinned
ferro-kittensrevision from3ae07a8(#218) tob589b8a(ferro #227), across all four manifests. Zero source churn — the diff is
four
rev =strings and the four lockfiles that follow them.This is a bump, but the reason it exists is the experiment. oxide-train#127
stopped one commit short of ferro main because ferro #219 put four
brx.idxjump tables in
gemm_tcgen05_bf16_optimizedand the driver's PTX JIT refusedthe module at the first
cuModuleLoadDatawithDriverError(218), before aline of gate output. ferro #227 restored the compare-chain lowering — and
could not reproduce the refusal, which is why this bump is the only test that
exists (ferro #225, ferro #227's "Follow-up"). Confirmation is posted on
ferro#225.
The headline: the module loads
cargo oxide run gemm, the exact run that died:Same B200, same driver
580.95.05the failure was reported on, same tree thatwas red at ferro
41f9e57. #227 fixes the downstream failure.What that does and does not settle is worth stating, because ferro #227 was
careful about it and this PR should be too. ferro's own tree JIT-loads 55
jump-tabled kernels on this driver,
shared_drain_quad's four-tables-in-one-entryincluded, so
brxalone is not sufficient — the trigger is some interaction withthe rest of this module that ferro has no kernel big enough to reach. What is
now established is the consumer-side bisect in both directions: red exactly when
the tables are present, green exactly when they are not, across two independent
changes to how the dispatch lowers, with nothing else in this repo moving. The
mechanism ferro #227 names — an exhaustive
matchover arepr(usize)enummaterialises rungs a caller has constant-folded away, four cases table where
three branch — is consistent with every observation on both sides.
The window, checked against the diffs
Over
3ae07a8..b589b8aonly four files under ferro'ssrc/change at all:src/global.rs— the only behavioural change that reaches this repo.AccessWidthandaccess_widthkeep #219's typing; the drains dispatch on anew private
access_width_bytes(three arms and a wildcard) and hold theircoverage obligation through
AccessWidth::RUNGS+ aconst { assert! }. Therest of the file's diff is #224's occupancy note.
src/lib.rs—#![feature(variant_count)], forRUNGS. Internal toferro; the toolchain is already the same pinned
nightly-2026-04-03, so itcosts consumers nothing.
src/ldst.rs,src/mma.rs— documentation only.gpu/gemm/src/optimized.rs:537,541is this repo's only caller of either drain,and nothing calls
access_widthdirectly, so #219's enum return — the churnworth checking for — reaches no call site here. #223 is examples/experiments,
#224 is docs, #226 is ferro's own CI. Local typecheck (
cuda_cudart13.0 redistCUDA_TOOLKIT_PATH) clean on all four crates.Gates: all four green, at existing tolerances
gemmflash-attnflashopsmodelflash is bit-identical to main, and the gate was run on
mainto say sorather than quoting #127's numbers. Both logs' whole parity section — 107
lines: the swizzle and
transpose_bprobes (score_mma probe max abs error 1.907e-6), everyy0 gpu/refrow at all five forward shapes and theramped-key case, every
max abs error, every correction count including theramped-key case's 32 of 32 (100.00%), and
dq/dk/dvat all three backwardshapes — diffs to nothing. The only lines that move in the entire log are
the four benchmark timings, in separate containers and under 1%:
[32,1024,24,128]model losses. Every initial loss is identical to six decimals —
2.949841(MoE with aux loss),
1.526770(AdamW and Muon),3.105546(block linears) —and both dense overfits terminate at
0.000000. The two terminal values thatmove are the ones that are nondeterministic in the code itself: the MoE aux-loss
overfit reads
0.000039here against main's0.000030and #127's0.000042/0.000112, and the block-linear overfit0.000097against0.000056and0.000077/0.000093. Both land inside a spread two runs of an unchangedbranch already produce; that is the MoE scatter's atomics, not a numerics change.
Codegen: the module is instruction-for-instruction main's
rebuilds --kernel gemm, both trees, offlineptxas. Every entry allocatesidentically, and the branch is self-consistent across two fresh builds:
gemm_tcgen05_bf16_optimizedgemm_tcgen05_f32_optimizedgemm_tcgen05_f32_accumulateregister_gemm_storeregister_gemm_accumulateregister_gemm_tn_accumulateregister_gemm_nt_storeresidency_probe_cg2residency_probe_cg4descriptor_transpose_probedevice_atomic_probelibdevice_math_probe(registers / stack frame bytes; zero spill everywhere)
gemm.ptx's sha256 does differ across the two trees, and it is worth sayingwhy rather than waving at it — #127 quoted digests, and a digest is not
actually the right instrument here. Dumping both modules (
PTX=1 ./run.sh gemm)and comparing them per entry:
(
gemm_tcgen05_bf16_optimized1622 → 1622,f32_optimized1062 → 1062,f32_accumulate609 → 609, and so down).brx: 0 on both sides..branchtargets: 0..local: 0. The jump tablesare gone, which is the point of the PR, and nothing took their place.
-C metadatadisambiguator, all ninegemm.ptxentries areline-for-line identical and so are
transpose_probe.ptx's three.So the entire byte difference is two things, neither of them code: the gemm
crate's disambiguator (
CslX9098XTmGh_→Cs1wjYWhUtbSC_, which any change tothe dependency graph moves, and it rides inside every mangled
__dynamic_smem__symbol), and the entry emission order, which permutesbetween containers and renumbers every virtual register downstream of it. That
second one is oxide-train#122's known codegen nondeterminism, and it is exactly
why
rebuild_stabilitybuilds every round at the same path — the harnesscontrols for it within a run and cannot across two. A per-function digest is
therefore not a cross-container instrument in this repo; the opcode census and
the normalised instruction stream are, and both say nothing moved.
The second, independent reading agrees.
compare_profile model mainbuilds botharms in one container and prints
bin/profile's whole table for each: 37gpu/opskernels with their registers, spill,maxntid, blocks/SM andthreads/SM, plus the three tcgen05 GEMMs. Diffs to nothing — all 42 lines
identical,
gemm_tcgen05_bf16_optimized202 /f32_optimized174 /f32_accumulate194, 4224 spill bytes, 1 CTA/SM on both sides.(The crate-composition gap #127 documented is main's too and unchanged here: the
same three GEMMs are 160 / 172 / 146 with zero spill inside
gpu/gemmand202 / 174 / 194 with 4224 B inside
gpu/model.)The harness prints that table four times across the run — both arms' build-time
run and both arms' warmed run — and all four are identical, so this is not a
single lucky reading.
Its timed halves, same container, back to back: 723.1253 ms full step on
main(721.3919 in kernels, 99.76%) against 713.4329 ms here, and thewarmed
=== baseline main ===pass at 716.6606 ms (714.9037, 99.75%). Allthree sit within 1.3% of each other, which is drift and not a claim — with every
static counter above identical there is no mechanism for a real one, and #127
measured the same 99.76% kernel fraction at a baseline of 736.5460 ms in a
different container.
Unlocked, not taken here
ldst::{store_row_vec, load_row_vec}andSharedVec::slice,the library route for flash's hand-rolled shared arrays. Flagged in The accumulator carries the MMA shape and the column count, and the pin stops where the drains' access ladder becomes a jump table #127 as
the first thing to pick up; still is, and still a separate PR.
Exp2Hwagainst softwareexp2_approxon thisrepo's flash forward, given ferro's −3.9% on its own.
global.rs/ldst.rssays atile walk over
load_rowsloses 2.1× to a block-per-row loop on a row-wisenorm.
gpu/ops' norms are the place that claim would be checked against.Unrelated, pre-existing
gpu/flash-attn/src/main.rs:763still callsnaive_module.split_group2, whichgpu/opsrenamed tosplit_group3. That bin does not compile onmaineither,no gate builds it, and this PR does not touch it.