fix(seedless): extend the command buffer firewall to strict, lane batch, and add a ratchet - #174
Merged
Merged
Conversation
…ch, and add a ratchet (#169) #171 guarded the two solo decode funnels. The paths it left open matter: - runStrictLayers splits the forward across many command buffers. A single failure there is worse than a whole-CB failure, because the surviving layers sit on state the failed CB never wrote — a partial forward, not an obvious one. flushCB now records the fault and stepArgmax's .strict case refuses. This one is urgent for a specific reason: the error message added in #173 recommends --lossless as the workaround, so strict failing silently would make the advice we hand users actively unsafe. - stepArgmaxBatch / forwardRowsBatch: a failed batch CB leaves tokensOut holding whatever it held, so EVERY lane takes a token the GPU never produced. scripts/check_cb_guard.sh is a ratchet on bare waitUntilCompleted (89, down from 94). Deliberately not a dataflow analysis: it cannot tell a fire-and-forget blit from a decode readback, and it only stops the count from growing. The upgrade path — marking intentional bare waits with `// cb-unchecked: <reason>` and gating on unmarked ones — is written into the script rather than left implicit. Gates: RAWTESTS 99/99, BENCHBATCHTEST PASS, COMPTEST 97/97, CBGUARD PASS. Refs #169 Co-Authored-By: Claude <noreply@anthropic.com>
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.
Refs #169. Fourth and last of the firewall series (#171 → #172 → #173 → this).
What was still open after #171
runStrictLayerssplit CBsstepArgmaxBatch/forwardRowsBatchtokensOutholding whatever it held, so every lane takes a token the GPU never produced.Strict was the urgent one: the error message added in #173 recommends
--losslessas the workaround, so strict failing silently would make the advice we hand users actively unsafe.The ratchet
scripts/check_cb_guard.sh— barewaitUntilCompletedcount, currently 89 (down from 94 as sites were converted). Increase fails the gate; decrease prints a reminder to lower the baseline.Deliberately not a dataflow analysis, and the script says so: it cannot tell a fire-and-forget blit from a decode readback, and it only stops the count from growing. The upgrade path — mark intentional bare waits with
// cb-unchecked: <reason>and gate on unmarked ones — is written into the script rather than left as tribal knowledge.Still open
SeedlessMetalForward, 40 sites) — the largest remaining block!) output above ~2–6K prompt tokens #169waitUntilCompletedsomewhere to go, reusing this same recovery path!) output above ~2–6K prompt tokens #169 stays openGates
RAWTESTS 99/99 · BENCHBATCHTEST PASS · COMPTEST 97/97 · CBGUARD PASS
🤖 Generated with Claude Code