Repository navigation
Conversation
This was referenced Nov 10, 2026
Owner
|
Thanks @laudney, this reads cleanly: every tower tensor is consumed and the padded device bytes are counted. Two small things:
|
laudney
force-pushed
the
pr-dots-c
branch
2 times, most recently
from
November 11, 2026 08:14
7bdb0cd to
f4550b0
Compare
Contributor
Author
|
Thanks, both are in:
|
Owner
|
Thanks @laudney, both are in. The new
|
ashhart
added a commit
to laudney/TensorFold
that referenced
this pull request
Nov 12, 2026
14 of 26 tasks
ashhart
added a commit
to laudney/TensorFold
that referenced
this pull request
Nov 12, 2026
The tower's tensors load as plain BF16 [n, k] matrices for cuBLASLt: fc1 and fc3 stacked into one gate|up projection, and the patch weight flattened to 588 columns and zero-padded to 592 so its rows meet the library's alignment. Every vision_tower tensor is consumed, the device bytes count the padding, and a failed load drains its uploads before any buffer is freed.
The drain test called settle directly, so dropping the errdefer in load, or registering it before the tower's own errdefer, would stay green. A host test now runs load on a sparse checkpoint against a fake device whose first upload's wait fails: the buffers must go only after the context proved the copies done. The sparse checkpoint helper moves to its own test file so the tower's tests can share it.
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.
vision_towertensors on CUDA[n, k]matrices for cuBLASLtWhat this changes
The tower's weights load on CUDA (
zig/src/families/dots_mocr/cuda_tower_weights.zig). Everyvision_towertensor is consumed, the device bytes count the padding, and a failed load drains its uploads before it frees anything. No served path opens the tower in this piece.882648a03). This PR's commits:5f6ca2530feat(dots): dots.mocr's image tower weights on CUDA;f4550b060test(dots): pin the tower load's settle before its buffers go. Piece 3 of 7.cd1cb0baainto main6b739dd5eis clean (git merge-tree).Checks on this head
f4550b060zig build test-cuda-host,check-native-cuda-host7/7,test-kernel-contract,zig fmt --checkandgit diff --checkpass; lean 386 / 386, 0 new against piece b. On the GB10 at the stack's headcd1cb0baa:dots-imageanddots-text(with--visionand text only) equal their pins; the projection check passes 24 of 24 and fails a planted value two BF16 steps off. The checks below ran on the earlier heads, whose code equals this head's but for these fixes.python3 tools/zig/lean_check.py, on the base (cuda: a shared engine for dense decoders, with dots.mocr's text decoder on it #2673's head05e5e5fdd) and on this head: 386 / 386, 0 new (also 0 new against piece b).zig build test-cuda-host: 378/378 steps, 0 failed (the test binaries this piece changes re-ran; the others are the parent's and passed there).zig build test-cuda-dense-host: 33/33 passed, uncached.zig build test-dots-mocr-cuda-host: 14/14 passed, uncached.zig build check-native-cuda-host: 7/7 steps.zig build test-kernel-contract: 32/32 steps, 0 failed.zig build compile-cuda-tests(the GB10 runner compiles): 10/10 steps.zig fmt --check build.zig zig,git diff --check: pass.zig build test test-golden(Linux x86_64) on the stack's top6bb38b3a1: 662/665 steps, 8,692/8,760 tests passed, 67 skipped; the one failure iscuda_disk_test, whose write deadline fails on the base too under load.Receipt
n/a: no served path opens the tower in this piece. The exact device bytes (2,524,194,816) are pinned by a host test against a sparse checkpoint in piece d, where the tower uses these weights.
Checklist
padRows, the upload drain, and the load's settle order throughloadon a sparse checkpoint) each fail with their check removed.