Repository navigation
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: |
ac6a263 to
f2b5399
Compare
…over Metal target.zig is the lanes' verify target: a slot's prompt, its windows of rows for several slots in one launch, keeps and rewinds, and kept prompt states (the prompt cache) whose resumed rows the reply reports as cached_tokens. boot.zig loads a release checkpoint folder and entry.zig serves it as tensorfold-dsv41 (dsv41-metal-serve). Tests serve the tiny model through LaneHost: concurrent equals solo equals serial, drafted equals draft:false, cache hits equal fresh runs, seeds and cancels.
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.
f2b5399 to
72916b7
Compare
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.