You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[job] GB10: raise the Atlas tensor-core GEMM ceiling (29-39 vs cuBLAS 75-206 TFLOP/s) #71
State: a template rewrite is still open. The cuBLASLt route is measured as the interim.
Measured (reiner 622/623, main 10d4ec718, n=3):
27B with ATLAS_CUBLAS_GEMM=1: TTFT −33% at 10k (15.71 → 10.47 s) and −31% at 31.5k (53.00 → 36.83 s). ppl is +0.047% below the QSA bound and flat above it, and greedy output is identical.
Flash-Next: no change; the route doesn't engage on its projections.
ATLAS_CUBLAS_FP8=1: broken on the 27B (AlgoGetHeuristic status 15, 0-token responses).
ATLAS_CUBLAS_GEMM=1 can't boot the 27B DFlash2 recipes (reiner 644, main b03dc7363). The lever reserves 15.6 GB for lazy BF16 weight copies, and there isn't room for it:
util 0.70 (the concurrency sweep): 73.9 GB consumed + 15.6 GB = 90.1 GB committed, against an 83.7 GB budget;
util 0.80 (the ST-995 recipe): 108.3 GB against 95.7 GB.
Both refuse with "No memory left for KV cache". So step 1 below ends here: the lever can't ship on by default for the 27B while the DFlash2 drafter is loaded, unless the BF16 copies shrink (for example, only the GEMMs cuBLAS actually wins on).
Next:
Fix or remove the FP8 route (AlgoGetHeuristic status 15).
The real job: dense_gemm_bf16_pipelined and the MoE grouped GEMM at ≥ 60 TFLOP/s. That would make the BF16 copies unnecessary.
Kind
Feature for a model we already support
Model
all GB10 targets (measured on Qwen3.8-Flash-Next and 27B)
What's the job?
Raise the ceiling of Atlas's tensor-core GEMM templates. On an idle GB10 at the shapes a 29.7k prefill launches, every Atlas TC kernel lands at 29-39 TFLOP/s while cuBLAS does 75-99 (BF16) and 135-206 (FP8) on the same shapes (roofline.py). The template is 2-stage cp.async, 128-thread CTAs, M_TILE 64, barrier-separated dequant. Reference implementations: FlashInfer / CUTLASS SM120 block-scaled grouped GEMM, vLLM cutlass_moe_fp4. Done = dense_gemm_bf16_pipelined and the MoE grouped GEMM ≥ 60 TFLOP/s at those shapes, byte-identical greedy + ppl within noise.
Impact radius
Shared code, other models could change
What else could it touch?
Every model's prefill: dense_gemm, w4a16_gemm, the MoE grouped GEMM (symlinked across 7 targets).
First concrete piece: #77 — cuBLASLt was building descriptors/layouts and running AlgoGetHeuristic on every BF16 GEMM call; now cached per shape (bit-identical by construction). Validation queued as reiner job 255 (build + clippy + CUTLASS-vs-cuBLASLt GPU tests + 27B greedy identity/TTFT). Same bottleneck class found on Strix (#72): the two prefill GEMMs (w4a16_gemm_t_m128 47 %, w8a16_gemm_n_m128 30 %) run at ~15-16 TFLOP/s, ~27 % of gfx1151 WMMA peak.
The ATLAS_CUBLAS_GEMM / ATLAS_CUTLASS_GEMM / ATLAS_FP8_ROWWISE lazy BF16-copy OOM hazard now has a fix: #83. It reserves those copies in the KV budget at boot (routed experts excluded), and a config that cannot fit refuses at boot instead of hanging the box. With the flags off, nothing changes. #77 is closed: it was correct but produced no gain. Validation: reiner job 274, arm C71 (27B at util 0.88, the job 262 case). The GEMM-ceiling work itself stays open here.
The lazy FP8→BF16 copy hazard that #77 exposed (ATLAS_CUBLAS_GEMM / CUTLASS_GEMM / FP8_ROWWISE materialising BF16 copies outside the KV budget) is fixed by #83, now merged. The reserve is derived from the resident FP8 matrices; routed experts are excluded because they use MoE kernels. With it, the 27B cuBLAS boot at util 0.88 keeps 17.4 GB MemAvailable, where it previously left 2.1 GB and was killed (job 274). The GEMM-ceiling work itself (tensor-core throughput) is still open here.
Proposal: make this the GB10 kernel priority for the next ~3 weeks. The cleanup work ahead of it in the roadmap is done: #68 landed and the train is merged.
First deliverable: a microbench of an mxf4nvf4 MoE kernel over the resident [N,K/2] layout (no dequant, no transpose) against cuBLAS on the 29.7k shapes, before any serve integration.
Prerequisite (roadmap W0.3):ncu on reiner, which needs NVreg_RestrictProfilingToAdminUsers=0 and a reboot. Is it unblocked yet? Two earlier retractions came from inferred limiters.
Design consult (Qwen3.8-Max), checked against our own measurements. This is the first concrete kernel plan for the MoE half of this job.
Starting point (measured):
MoE is 154 TFLOP, 73 % of a 29.7k prefill, running at 26.4 TFLOP/s. cuBLAS does 75.5 (BF16) and 156 (FP8) at the hot expert shape.
Stubbing the FP4→e4m3 dequant saves 1.96 s (18.46 → 16.49 s).
The mxf4nvf4 twin over the transposed _t table was a wash (gate_up 2678 → 2662 ms, down 1891 → 1975 ms): it pays for a transpose instead of the dequant.
The checkpoint's original [N, K/2] e2m1 weights with [N, K/16] e4m3 scales are already resident for decode. That is the block-scaled B / SFB layout the MMA wants.
Proposed kernel (Qwen's design; I checked the arithmetic):
B read straight from the resident layout: 128 rows × 32 B per K64 step, 16 B cp.async pairs, B-scales [128, 4] alongside, smem rows swizzled to 64 B. No transpose.
Per-stage smem: A 2,048 + A-scale 256 + B 4,096 + B-scale 512 = 6.9 KB. 6 stages ≈ 41.5 KB (≈ 45 KB with barriers), so still 2 CTAs/SM.
The MMA → barrier → DEQUANT → barrier serialisation goes away; scales arrive in the same stage.
cuBLASLt prefill on main 10d4ec7, reiner jobs 622 and 623 (2026-09-28).
Setup: campaign serve with bf16 KV, no prefix cache, thinking off. TTFT is the median of 3 cold prefills. ppl is the paired 8-window check.
27B NVFP4, default (D) vs ATLAS_CUBLAS_GEMM=1 (C, BF16 cached dequant):
TTFT at 10k: 15.71 s → 10.47 s (−33 %).
TTFT at 31.5k: 53.00 s → 36.83 s (−31 %).
ppl: 3.79930 → 3.80107 below the QSA bound (+0.047 %), and 2.38727 → 2.38729 above it.
Greedy output identical on the 3 needle probes.
Observed on one fingerprint, n=3 per arm. Before any default change it needs an ST-995 run and a memory/concurrency check.
Flash-Next: C and F are identical to default in TTFT and ppl; the routes don't engage on its projections.
ATLAS_CUBLAS_FP8=1 is broken on the 27B.
Every prefill fails with Prefill chunk layer 0 failed: cuBLASLt AlgoGetHeuristic failed: status 15 (NOT_SUPPORTED).
Requests come back with 0 tokens (job 623 F arm, 35 errors), and the job-622 serve never passed its warmup request.
Because it's opt-in, I'd make it fail fast at startup when the heuristic probe refuses, instead of erroring on every request.
ATLAS_CUBLAS_GEMM=1 with DFlash2 at --gpu-memory-utilization 0.70: refuses to boot (No memory left for KV cache ... + 15.6 GB lazy BF16 reserve). The BF16 copies need a higher utilization in the DFlash2 recipe; not measured yet.
Activity
[-][job] Qwen3.8-Flash-Next: decode speed — MTP past the QSA bound, draft-vocab slicing, decode graphs[/-][+][job] GB10: raise the Atlas tensor-core GEMM ceiling (29-39 vs cuBLAS 75-206 TFLOP/s)[/+]AzeezIsh commentedon Sep 25, 2026
First concrete piece: #77 — cuBLASLt was building descriptors/layouts and running
AlgoGetHeuristicon every BF16 GEMM call; now cached per shape (bit-identical by construction). Validation queued as reiner job 255 (build + clippy + CUTLASS-vs-cuBLASLt GPU tests + 27B greedy identity/TTFT). Same bottleneck class found on Strix (#72): the two prefill GEMMs (w4a16_gemm_t_m12847 %,w8a16_gemm_n_m12830 %) run at ~15-16 TFLOP/s, ~27 % of gfx1151 WMMA peak.AzeezIsh commentedon Sep 26, 2026
The
ATLAS_CUBLAS_GEMM/ATLAS_CUTLASS_GEMM/ATLAS_FP8_ROWWISElazy BF16-copy OOM hazard now has a fix: #83. It reserves those copies in the KV budget at boot (routed experts excluded), and a config that cannot fit refuses at boot instead of hanging the box. With the flags off, nothing changes. #77 is closed: it was correct but produced no gain. Validation: reiner job 274, arm C71 (27B at util 0.88, the job 262 case). The GEMM-ceiling work itself stays open here.Merge pull request #83 from Atlas-Inf/fix/cublas-bf16-copy-budget
AzeezIsh commentedon Sep 26, 2026
The lazy FP8→BF16 copy hazard that #77 exposed (
ATLAS_CUBLAS_GEMM/CUTLASS_GEMM/FP8_ROWWISEmaterialising BF16 copies outside the KV budget) is fixed by #83, now merged. The reserve is derived from the resident FP8 matrices; routed experts are excluded because they use MoE kernels. With it, the 27B cuBLAS boot at util 0.88 keeps 17.4 GB MemAvailable, where it previously left 2.1 GB and was killed (job 274). The GEMM-ceiling work itself (tensor-core throughput) is still open here.spark-model: reserve lazy FP8->BF16 copies in the KV budget (Atlas-In…
AzeezIsh commentedon Sep 26, 2026
Triage (2026-09-26). This is the most leveraged open job, and the only one with no forward progress yet.
The same bottleneck class caps three other jobs:
Proposal: make this the GB10 kernel priority for the next ~3 weeks. The cleanup work ahead of it in the roadmap is done: #68 landed and the train is merged.
mxf4nvf4MoE kernel over the resident[N,K/2]layout (no dequant, no transpose) against cuBLAS on the 29.7k shapes, before any serve integration.ncuon reiner, which needsNVreg_RestrictProfilingToAdminUsers=0and a reboot. Is it unblocked yet? Two earlier retractions came from inferred limiters.AzeezIsh commentedon Sep 27, 2026
Design consult (Qwen3.8-Max), checked against our own measurements. This is the first concrete kernel plan for the MoE half of this job.
Starting point (measured):
_ttable was a wash (gate_up 2678 → 2662 ms, down 1891 → 1975 ms): it pays for a transpose instead of the dequant.[N, K/2]e2m1 weights with[N, K/16]e4m3 scales are already resident for decode. That is the block-scaled B / SFB layout the MMA wants.Proposed kernel (Qwen's design; I checked the arithmetic):
mma.sync … kind::mxf4nvf4.block_scalem16n8k64, f32 accumulate.cp.asyncpairs, B-scales[128, 4]alongside, smem rows swizzled to 64 B. No transpose.MMA → barrier → DEQUANT → barrierserialisation goes away; scales arrive in the same stage.cutlass_moe_fp4for the permutation, scheduler and epilogue.The real decision here is precision, and Qwen's plan glosses over it.
kind::mxf4nvf4needs both operands in e2m1, so activations get quantised to NVFP4 (per-16 e4m3 scales). That's W4A4.input_scales, so W4A4 is their intended deployment. vLLM's NVFP4 MoE runs exactly that and scored ppl 3.650 on this model in Qwen3.8-Flash-Next: serve EXL3 checkpoints on GB10 (M1–M4 of #65) #91's same-box table.kind::mxf8f6f4(e4m3 A × e2m1 B), uses UE8M0 per-32 scales. Converting NVFP4's e4m3 per-16 scales to that is itself lossy.ppl.py(split at the QSA bound) pluskl_driftagainst today's kernel, re-baselined after qwen4_exp: no final RMSNorm after the hyper-connection mixer (split from #91) #111 (which changes the absolute ppl scale), and BFCL. Not timing alone.Order:
roofline.py), before any serve integration.This is the single largest structural lever in #74 as well.
AzeezIsh commentedon Sep 28, 2026
cuBLASLt prefill on main 10d4ec7, reiner jobs 622 and 623 (2026-09-28).
Setup: campaign serve with bf16 KV, no prefix cache, thinking off. TTFT is the median of 3 cold prefills. ppl is the paired 8-window check.
27B NVFP4, default (D) vs
ATLAS_CUBLAS_GEMM=1(C, BF16 cached dequant):Flash-Next: C and F are identical to default in TTFT and ppl; the routes don't engage on its projections.
ATLAS_CUBLAS_FP8=1is broken on the 27B.Prefill chunk layer 0 failed: cuBLASLt AlgoGetHeuristic failed: status 15(NOT_SUPPORTED).ATLAS_CUBLAS_GEMM=1with DFlash2 at--gpu-memory-utilization 0.70: refuses to boot (No memory left for KV cache ... + 15.6 GB lazy BF16 reserve). The BF16 copies need a higher utilization in the DFlash2 recipe; not measured yet.