Repository navigation
Conversation
585c469 to
c4d2144
Compare
|
@ashhart updated this stack (#3532 → #3533 → #3534) for the
|
|
Thanks @laudney. The shared CUDA primitives are reused correctly, and the release projections have FP64 references, fixed splits and prompt/decode equality checks. The red
|
c4d2144 to
200e86a
Compare
|
@ashhart rebased onto main |
|
Thanks @laudney for the shared-primitive refactor and patch-identical rebase. The common MMA/cp.async/ldmatrix reuse, FP64 references, fixed One coverage issue remains in The cumulative diff conflicts in After that revision and rebase, we still owe the GB10
|
200e86a to
9033c95
Compare
|
@ashhart updated: head
GB10 (
Host checks on the stack head: |
The CUDA plan typed every projection as an EXL3 group, so another weight format would have to thread branches through every reader. GroupPlan and ExpertsPlan now hold their stored form in a tagged union with an EXL3 arm, readers go through it, and the expert width splits on a per-format block (expertShare: 128 for EXL3, 64 for the release format). EXL3 plans, emitted calls and pinned fingerprints are unchanged; block.Options gains the checkpoint format for the release arms to come.
The CUDA reader opens engram-l<L>-r<R>of<W>.bin, but the packer wrote only rank 0 of 1, so a four-rank release had no tables to read from SSD. A rank's rows are now its whole hash columns (rankRows, the reader's headShard), the packer, verifier and manifest work on that span with shard-relative offsets, the tool takes --rank and --world, and checkShards validates a rank's shards against its span at boot.
DeepSeek's own checkpoint stores FP8 32x32 blocks, MXFP4 experts and BF16 matrices that the CUDA plan could not express. The plan gains FP8, BF16 and MXFP4 forms with the rank's rows, columns and expert ids, cut on the mesh (release_shard over fabric/mesh), the Engram tables are checked and left on disk, and staging uploads the stored bytes unchanged. The real release plans at worlds 1, 2 and 4 with no tensor left over: 72.31 GiB a rank at world 4. Serving still refuses the format until its kernels land.
The release checkpoint's dense projections need GB10 kernels that multiply its FP8 block-scaled and BF16 weights as stored, with prompt and decode rows bit-equal; this adds block-scaled mxf8f6f4 and BF16 MMA tiles (decode, mid, prompt and a stage-free warp form) over one per-element K order and a row-independent split, the FP8 activation round trip with and without RMSNorm, the fixed split sum, a separate sm_121a image set loaded only for release checkpoints, contract checks (prompt equals decode, every tile position, one-CTA grids, group views, cancellation) and records for nvcc 13.0 and 13.5.
The release contract's prompt-versus-decode, row-independence and launch-shape checks ran FP8 only at splits 4 and 1, while the world-4 plan serves wkv and the shared w1/w3 at split 8. A wkv case (K 5120, N 512, BF16 out) now runs every check at split 8, the case table's comment names the splits it covers, and the tile comment no longer quotes a bandwidth measurement.
9033c95 to
e325f31
Compare
|
@ashhart main moved again, so the stack is rebased once more onto
At this head on a GB10: |
Step 3 of #3527: the release's FP8 and BF16 projections on GB10, prompt rows and decode rows bit-equal by construction.
mxf8f6f4MMA, one FP32 accumulator a column, K split fixed by (K, N)m16n8k16BF16 MMA, FP32 accumulationact_quantWhy
Serving the checkpoint as DeepSeek released it is crucial for benchmarking and for adoption: SGLang, vLLM and TRT-LLM serve these same bytes, so comparisons are like for like with no conversion step, and users run the checkpoint they already download, with no TensorFold-specific requant (#3527).
What this changes
Adds
release_mma.cuh/release_tile.cuh(fragments, scale lanes, the cp.async stage pipeline),release_proj.cu,release_glue.cu, the launches (kernels_release.zig, served split tablerelease_split.zig), a separatesm_121aimage set loaded byKernels.loadReleaseonly for release checkpoints, the contract files and the release bench.Issue: Refs DeepSeek-V4.1-Flash release weights (FP8 + MXFP4) on CUDA at world 4 on four GB10s #3527 (step 3 of 5)
Stacked on: dsv41: plan, cut and stage the release weights; Engram packs for any world (#3527 2/5) #3531 (adds c4d2144)
atc overlap --json: run on the stack head against main e7e2424: textual conflicts with idol: Idol's denoiser on CUDA (stacked on #1766) #1767 and CUDA: #1764's BF16 prompt tile for Qwen ModelOpt, Nemotron and Dory, plus two exact Qwen prompt kernels (#1762) #2008 (shared registries:registry_joins.zig,build/cuda.zig,contract_family_sets.zig,kernel-contract.md) and DeepSeek-V4.1: read the pack's weight spans past the page cache (core/direct_io) #1924 (prepared.zig,build/dsv41_shared.zig); 10 open pull requests untested (ATC coverage limits). The registry entries are additive; whichever lands second rebases.Shared primitives: the release headers take their
mma.sync,cp.asyncandldmatrixfromcommon/(qmm_frag.cuh,cp_async.cuh, and the newcommon/block_scale_mma.cuhfor the block-scaled MMA), astools/zig/cuda_common_check.pyrequires; the three release images' SASS (nvcc 13.5, sm_121a) is identical before and after, so the contract results, records and receipts below (measured at 993faef) carry over.Checks on this head
zig build test test-golden test-dsv41-cuda-host test-dsv41-forward test-dsv41-device-host test-kernel-contract compile-dsv41-cuda compile-dsv41-serveron the stack head: 5296/5334 passed, 37 skipped, 1 failed (cli_config_test"serve --config: expand ...", which fails identically on main e7e2424 on the same host: inherited).zig fmt --check build.zig zigandgit diff --checkpass at every stack head. Each commit ran the family host suites when it was made (on main 811c384).zig build kernel-contract(the release filterdsv41_relran; see the kernel section); other SMs (the release images aresm_121aonly).Receipt
tf-dsv41-test release-benchin the table.Kernel contract, only when a GPU kernel is new or changed
tf_dsv41_rel_fp8/_mid/_prompt,tf_dsv41_rel_bf16/_mid/_prompt, the stage-free_fp8_warp/_bf16_warp,tf_dsv41_rel_sum,tf_dsv41_rel_actq,tf_dsv41_rel_rms_actq(new; they replace nothing: release checkpoints were refused).tf-cuda-test kernel-contract dsv41_rel(nvcc 13.5, GB10):(filtered) SUMMARY 9 kernels: 9 pass gates 1-4, 0 fail, 0 known findings; 0 controls: 0 red as planted, 0 missed; 0 limit problems, exit 0. Extra checks: prompt == decode bytes at M = 1, 5, 16, 17, 100 and offsets 0, 15, 16, 2047 of 2,048 (5 shapes); one row at every position of 16-, 64- and 128-row tiles with 5 neighbour sets (3 x 1,040 launches); one CTA and the warp form equal the served bytes; wo_a group views equal contiguous copies; cancellation [2^25, 0, -2^25, 1] inside the bound at S = 1, 2, 4.kernel-contract-limitsaudits report no stale release record (their other findings are inherited).Checklist
The title and description match the head commit, including the receipt and the stack.
New tests fail before the change, pass after it, and skip cleanly without their dependency.
Comments and docstrings are one line. No measurements or history in the source.
No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.
Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off.
Drafted output equals
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Drafts and concurrency: equal, receipt above. Resume: not run, sessions are off at 4 slots.)No precision traded for speed. The release arithmetic is the checkpoint's own (DeepSeek-V4.1-Flash release weights (FP8 + MXFP4) on CUDA at world 4 on four GB10s #3527); EXL3 bits are unchanged.
Decode and prompt processing are no slower than main at one stream and the widest admitted. (n/a for the release checkpoint: main refuses it. EXL3 paths are untouched by format gating; not re-measured, no EXL3 pack on the test machines.)