Repository navigation
Conversation
A prefill boundary of at most split_rows (32) rows writes the new streams out of place into the spare buffer, but the plan sized prefill roles only from 2,048-, 17- and 16-row programs, and the 2,048-row one never uses the spare. Segments of 18 to 32 rows wrote past the 17-row spare into the next arena role: at world 4 a 23-row segment turned row 17 into 2.6e38 after the first ffn site and the reply into BOS tokens. The plan now also takes the 32-row program; a test checks every role of 18- to 32-row segments fits the plan.
|
Thanks @laudney, that is a clean catch. The out of place boundary writing up to 32 rows into a buffer planned for 17 explains the BOS replies on #3527 exactly, the one extra planned program is the smallest fix that covers it, and with 17 rows or fewer the planned set is unchanged so nothing that worked moves. The new test failing on the planned size before the fix and passing after is the right shape of proof. CI is still pending on the head, so this waits on that rather than on you. #3388 plans the same 32-row program for the one-slot case in #3366, so we will land one of the two and fold the other's test into it, with credit to both. We will run the device cell ourselves: DeepSeek V4.1 Flash on a GB10 at world 4, prompts of 8 to 186 tokens, branch against main, correct replies where main gave BOS and hashes equal where main already served them right.
|
… replay (ashhart#3366) Every segment from 17 to 33 rows, at starts 0, 2,048 and 65,536, in full mode and in replay's encoder, must find the second streams buffer (w.x1) planned for its rows. On main 25de9d7 it fails at 18, 24 and 32 rows (w.x1 needs 737,280, 983,040 and 1,310,720 bytes against 696,320 planned) and passes with the 32-row program planned; 17 and 33 pass either way. The sweep is @laudney's test from ashhart#3529, widened to both edges and to replay. Co-authored-by: laudney <[email protected]>
|
Thanks @laudney, and for finding this at world 4. Your fix and #3388 plan exactly the same buffers on current main: we compared every role's size at 32, 48 and 2,048 rows, in full and replay mode, and they match. #3388 came first with the #3366 claim and the pair receipts, so it is the one that lands. Your sweep test goes onto it as a commit with your co-author credit, widened to 17 and 33 rows and to replay's encoder. On main it fails at 18, 24 and 32 rows, and with the fix it passes. We will close this one when #3388 lands. Once that happens, the #3527 stack can drop this commit and take the fix from main.
|
… replay (ashhart#3366) Every segment from 17 to 33 rows, at starts 0, 2,048 and 65,536, in full mode and in replay's encoder, must find the second streams buffer (w.x1) planned for its rows. On main 25de9d7 it fails at 18, 24 and 32 rows (w.x1 needs 737,280, 983,040 and 1,310,720 bytes against 696,320 planned) and passes with the 32-row program planned; 17 and 33 pass either way. The sweep is @laudney's test from ashhart#3529, widened to both edges and to replay. Co-authored-by: laudney <[email protected]>
… replay (ashhart#3366) Every segment from 17 to 33 rows, at starts 0, 2,048 and 65,536, in full mode and in replay's encoder, must find the second streams buffer (w.x1) planned for its rows. On main 25de9d7 it fails at 18, 24 and 32 rows (w.x1 needs 737,280, 983,040 and 1,310,720 bytes against 696,320 planned) and passes with the 32-row program planned; 17 and 33 pass either way. The sweep is @laudney's test from ashhart#3529, widened to both edges and to replay. Co-authored-by: laudney <[email protected]>
… replay (#3366) Every segment from 17 to 33 rows, at starts 0, 2,048 and 65,536, in full mode and in replay's encoder, must find the second streams buffer (w.x1) planned for its rows. On main 25de9d7 it fails at 18, 24 and 32 rows (w.x1 needs 737,280, 983,040 and 1,310,720 bytes against 696,320 planned) and passes with the 32-row program planned; 17 and 33 pass either way. The sweep is @laudney's test from #3529, widened to both edges and to replay. Co-authored-by: laudney <[email protected]>
Prefill segments of 18..32 rows wrote past the spare streams buffer; the plan now sizes it for them.
w.x<1 - cur>(spare streams) in the prefill plansplit_rowsboundary)What this changes
block_prefill_mhc.sitewrites a boundary of at mostsplit_rows(32) rows out of place into the spare streams buffer.planProgramsplanned prefill programs at 2,048, 17 and 16 rows only, and the 2,048-row program never takes the out-of-place path, so the spare was sized for 17 rows. The plan now also emits the 32-row program; withrows <= 17the planned set is the same as before.atc overlap --json: run on the DeepSeek-V4.1-Flash release weights (FP8 + MXFP4) on CUDA at world 4 on four GB10s #3527 stack's head against main e7e2424; this PR's two files (forward_prefill.zig,index_scratch_test.zig) are in none of the reported conflicts.Checks on this head
zig build test-dsv41-forward test-dsv41-cuda-host582/583 passed, 1 skipped. The new test "prefill plan: segments of 18..32 rows write the spare streams within the planned roles" fails without the fix (w.x1: need 737280, planned 696320) and passes with it.Receipt
Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Drafts and concurrency: measured equal on the DeepSeek-V4.1-Flash release weights (FP8 + MXFP4) on CUDA at world 4 on four GB10s #3527 stack. Resume: not run, sessions are off at 4 slots.)