Repository navigation
dots: the image tower's weights on CUDA - #2769
Conversation
|
Thanks @laudney, this reads cleanly: every tower tensor is consumed and the padded device bytes are counted. Two small things:
|
7bdb0cd to
f4550b0
Compare
|
Thanks, both are in:
|
|
Thanks @laudney, both are in. The new
|
# Conflicts: # CHANGELOG.md
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.
|
Thank you @laudney. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
|
Thanks @laudney! This is in TensorFold 1.2.10, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.10
|
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.