Repository navigation
Red control for #530: row targets ignore the values offset (do not merge) - #531
Draft
jonathan308 wants to merge 4 commits into
Draft
jonathan308 wants to merge 4 commits into
jonathan308 wants to merge 4 commits into
Conversation
…o its pages A complete-checkpoint restore of a lossy (balanced) checkpoint decoded every coded row on the staging thread, then copied it 16 KiB at a time into the staged pages, and the pages themselves were staged as copied host zeros. Models that store their sliding-window layers coded paid this cost on every restore, even for a one-block hit. - With more than one decoding thread (at most eight, and at most half the active cores), the streaming row decoder decodes the whole rows of a transfer call concurrently, a wave of 1,024 rows at a time. Rows of a paged native layer are written straight to their page addresses (CBv2PagedCheckpointStorage.rowTargets, the same addresses append writes); other rows keep the ordered batched sink calls. Each row's bytes are a pure function of its coded bytes, so the restored state is unchanged. A refused row fails the transfer with the same error, and the staged rows are those the sequential decode leaves. - Provider-staged checkpoint segments wrap zero-fill-on-demand pages when the live pool does (PagedKVPoolConfig.hostZeroedSegments), as admission growth already does, instead of copying host zeros into fresh buffers. - The wave's scratch and bookkeeping are charged with the import's decoder scratch. - DARKBLOOM_PREFIX_CACHE_PARALLEL_STAGE=0 keeps every row on the calling thread and the original sink path; a pool without hostZeroedSegments keeps copied host zeros. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…row decode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deliberate defect so the row-target and restore tests show they detect a wrong destination: CBv2PagedCheckpointStorage.rowTargets drops the values offset, so value rows land on key rows. Not for merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
writeNative now writes into a caller's buffer (writeNative(_:into:)), so the existing testBF16CheckBeforeRoundingRefusesNaNsThatRoundToFiniteWords gives it one row of BF16 destination. The assertion is unchanged: every NaN pattern that rounds to a finite word is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 3 tasks
This branch has not been deployed
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.
Proposed changes
Red control for #530 (do not merge). This branch is #530's code plus one commit with a deliberate defect (head
aaae679953: the mutation4c4527200bon #530's9db9dfc15c, then #530's test fixf335812335cherry-picked, so itstree is #530's head
f335812335plus the mutation; the first CI run did not build the test target, as on #530):CBv2PagedCheckpointStorage.rowTargetsdrops the values offset, so value rows decoded straight into theirpages land on key rows.
A tests-only control is not possible for #530: its new tests call the new API (
rowTargets, the decoder's thread andwave parameters), so without the change they do not compile.
Expected CI: Fork Tests fails at the tests that write paged rows through
rowTargets:CBv2PagedCheckpointRowTargetsTests.sameBytes(FP16, BF16, FP32) andNativeQuantizedPagedCheckpointTests.concurrentRestoreIsBitIdentical(FP16, BF16, FP32);rowTargets, the existing lossy paged restoretests
NativeQuantizedPagedCheckpointTests"Interior native cuts keep ring mapping, exact recent rows and nativeserving pages" and
NemotronSuperLossyCompleteCheckpointTests.assistantHistoryRestoresExactlyBesideLossyTargetRows.Observed in Fork Tests run 45341070065, attempt 2: exactly these four tests fail, every other test runs and passes.
Attempt 1 also had a 30 s engine-step watchdog in a cold (unrestored) donor of
Inkling2PrefixRealGeometryTestsandone shard that could not download the test products; both passed when the failed jobs ran again.
Checklist
pre-commit run --all-filesto format my code / installed pre-commit prior to committing changesAI usage
accurately describes the code changes.