Repository navigation
flash_forward earns its checked run, and the run finds the epilogue dropped the head term (#85) - #182
Merged
Merged
Conversation
…the seed's key-axis ramp is what makes the online rescale a tested path
… what saw it: 50885 of 65536 outputs, now 1.66e-3 worst
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.
Closes the #85 gap:
flash_forwardgets a launcher, an f64 causal reference, and acheck— and the first checked run in this kernel's life found its second real bug.The harness (first commit): the reference is the straightforward stable softmax in f64 over bf16-rounded inputs, deliberately not the kernel's
exp2/LOG2Efolding or its online rescale. The seed puts a carrier ramp on the key axis so the running max moves at nearly every key block — the online rescale is exercised, not merely compiled — and the keys above the diagonal are the best-scored ones a broken mask could admit. The check runs four key blocks (one pastSTAGES, so the ring wraps andfree's recycled phase is waited on for real) by two heads (so a head plane in the wrong place is a wrong number, not a coincidence).Vsits in[1, 3)so outputs are a convex combination in[1, 3)and relative error is never against a cancellation.The bug (second commit): the fp32 epilogue's
store_rowscursor dropped the head term — the TMA input maps take the head as a plane coordinate and cannot get it wrong, but the output cursor takes the address it is handed, and every head wrote query block x's rows of panel zero. Demonstrated on B200 before fixing: 50,885 of 65,536 outputs wrong (head 1's panel never written, head 0's holding whichever CTA wrote last), every other check passing. At one head it would have passed — which is why the check runs two.After the fix: all checks pass,
flash_forwardworst relative error 1.66e-3 = 0.85 × 2⁻⁹ — the floor isP's trip to bf16 as the second MMA'sAoperand, scale-free in the sequence since the weights sum to one. Tolerance 2⁻⁸, one doubling above, measured rather than inherited (it was provisionally 2⁻⁷ before the number existed). Argument indocs/kernels/flash_forward.md, which also records the bug.This kernel's #175 band overwrite was found by inspection; this one by the reference. Both lived exactly as long as nothing compared
Oto a known-good answer.Validation:
buildgreen;examplesfail-before (predicted signature, everything else passing) and pass-after on B200;regcountall gates green (flash_forward165 regs, unchanged 1824 B census entry — its map-walk story is #166's remaining item and untouched here). The status table, occupancy row (1 block/SM at the 147,532 B plan, as documented) andexperiments' SKIPPED note updated; a timed bench case is deliberately left out until a causal-FLOP denominator is argued.