Repository navigation
dsv41 metal: the vision tower's kernels under the kernel contract - #1721
Conversation
e4f97d8 to
cd0382b
Compare
cd0382b to
c1587cd
Compare
|
Thanks @gilby. The six vision kernels are gated against float64 from the same BF16 inputs with NaN and both infinities, multi-row launches equal one launch, and launch records are checked for every Apple family. One change: none of the six has a planted control. Our contract run at #1722 shows 98 kernels with the same 178 controls as 89 kernels before; vision.metal declares TF_CTL but no kernel branches on it. Please add one control per kernel, each required to fail its gate: bias dropped or GELU replaced in epi, sin/cos swapped in qkv, max not subtracted in attn, gate/up swapped in swiglu, a stride off by one in unshuffle, a delimiter one row late in merge. |
c1587cd to
ac6a263
Compare
|
Thanks @ashhart. One planted control per kernel, each required to fail its gate: |
f2b5399 to
72916b7
Compare
|
Thanks @gilby. This one is ready. The six planted controls went red on our M5 Ultra contract run (98 kernels, 192 of 192 controls), and this push changes only one build line. Keeping the max in the rescale and dropping it from the exponent is the right way to plant the attention fault. One cosmetic thing, if you touch it again: the merge control picks the wrong delimiter rather than one a row late, so its label could say that. It lands right after #1720. |
|
Thanks @gilby, nothing is owed here. The six controls are in and red, and it lands right after #1720. Please add a CHANGELOG line citing "(#1721, part of #1676)", noting that nothing serves through these kernels until #1722. If you touch it again, the |
72916b7 to
2363bd4
Compare
|
The six planted controls are in (one per kernel, each red as planted on our M5 Ultra contract run: 98 kernels, 192 of 192 controls, SUMMARY in the earlier note), and this branch is rebased onto the #1720 stack (the 5 Nov conflict is gone). CHANGELOG line added citing "(#1721, part of #1676)", noting nothing serves through these kernels until #1722. The |
|
Thanks @gilby. This push doesn't have the six planted controls.
Once the controls are back, we'll re-run the Metal kernel contract (98 kernels, 192 controls). Main is frozen for today's release, and this lands after it, in order.
|
2363bd4 to
539147d
Compare
|
The six planted controls are back, at head
Contract at
The vision subset alone:
|
539147d to
8399847
Compare
|
Rebased onto main eab305d with #1720's new head ( |
|
Thanks @gilby. The Metal kernel contract on
|
8399847 to
de2df51
Compare
# Conflicts: # CHANGELOG.md
vision.metal holds the ViT's epilogues, RoPE, attention, SwiGLU, the aligner's unshuffle and the stream merge, each registered with the contract against float64.
de2df51 to
7ff4a49
Compare
|
Thank you @gilby. 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 @gilby! This is in TensorFold 1.2.10, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.10
|
What this changes
The vision tower's Metal kernels (
vision.metal: epilogues, RoPE, attention, SwiGLU, the aligner's unshuffle, the stream merge), registered with the kernel contract.Each of the six kernels carries a planted control, required to fail its gate: the epilogue's bias dropped or GELU replaced, sin and cos swapped in qkv, the attention max not subtracted from the exponent, gate and up swapped in swiglu, an unshuffle stride off by one, and a stream-merge delimiter one row late.
Part 17 of 18 of the stack for #1676; stacks on
dsv41-metal-pr/16-metal-serving(part 16, #1720), on main with parts 1 to 5 (#1705 to #1709) merged.Receipt
tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: n/a: kernels only; the kernel contract checks each launch geometry's bits against the others and against float64.tools/bench_openai.py: measured on the last PR of the stack.ttft_sfromtools/bench_cache.py --require-coldon a long prompt, or "n/a" with the reason when the change cannot reach prompt processing: measured on the last PR of the stack.zig build test tf-kernel-contract -Dcpu=apple_m1: exit 0, 627/627 steps succeeded; kernel contract,tf-kernel-contract --only dsv41(Metal):SUMMARY 98 kernels: 98 pass gates 1-4, 0 fail, 0 known findings; 192 controls: 192 red as planted, 0 missed; 0 limit problems; gates 120204 ms, limits 153 ms;zig build test-dsv41-metal-all -Dcpu=apple_m1(every DeepSeek Metal device step): exit 0, 9/9 steps succeeded; 37/37 tests passed;python3 tools/zig/lean_check.py: 5149 files, 424 problems, the same count as main (5027 files, 424). Zig's summary counts only the test binaries it ran in that invocation, so the step count is the comparable figure.test-dsv41-metal-real,test-dsv41-metal-vision-real) were run at the stack's top and are in dsv41 metal: image prompts #1722's receipt.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.SUMMARYline is in the receipt.