My BF16 projection kernels for Muse Spark Open went from 1.2032× to 1.5138× over SGLang’s H200 kernels in 10 days. That’s 4,014.85 us down to 3,191.18 us, same outputs. I ended up with entries on all 5 boards of the Open Kernel Challenge, 1.51× to 1.92× over baseline.

The kernel track was the first leg of the competition and it’s done now. This post is what worked and what didn’t. The short version:

  • Worked: measuring bandwidth first, shortening the dependent instruction chain, a lossless relayout of the W4A16 dequant, and not letting anything ship without paired H200 timing
  • Didn’t: custom large-m CuTe kernels, warp-specialized GEMM, a cuBLASLt search, weight compression, and trusting my local GPU to rank anything

The second leg is serving. It opens Nov 12 at noon EST on SGLang v0.5.23, and patches have to be lossless. What carries over is at the bottom. Tables are my Nov 3 snapshot. Organizer updates, rules.

The problem and the boundary

Muse Spark Open is an 816B MoE, 42B active params and 256 experts, served by SGLang on an 8×H200 node under TP8/EP8. The kernel track swaps out one piece of that path at a time and times it vs. SGLang’s kernel on the same shapes. My first scored entry was Oct 24, 9 days after SGLang’s day-0 support.

Most of my time went to muse_bf16_proj: attention projections, MoE-block projections and the router. What you can’t do there:

  • Drop precision. Operands are BF16 and the router has its own accuracy check
  • Anything that won’t capture into a CUDA graph and replay, so no data-dependent allocation or control flow
  • Input-dependent work outside the timed call. prepare(weights) gets up to 300 s but only for weight preprocessing (lossless repacking, layout changes)

The boundary I held myself to: the real computation runs faster, it’s correct on fresh inputs, and it doesn’t fall over on shapes near the scored ones. No replayed outputs, harness untouched. I also kept FP32 accumulation everywhere, which is my own rule and stricter than the challenge asks for in places. A speedup that only exists inside the benchmark isn’t one I’d want to hand a customer.

What the process delivered

Team n8mauer, public kernel boards, 2026-11-03 (UTC). Each score is one problem vs. its own SGLang baseline. Kernel scores, NOT whole-node throughput.

Scores table
board entry score
muse_bf16_proj stack 8 3,191.18 us (1.5138x)
muse_decode_layer v24 12,610.25 us (1.7938x)
muse_moe_w4a16 hybrid14cf + DQ9 7,001.12 us (1.9209x)
muse_prefill_layer fast4 255,015.55 us (1.5191x)
muse_attention_decode n22b 1.9192x

Before and after on the main board:

date muse_bf16_proj entry time vs. SGLang
Oct 24 guarded kernel selection 4,014.85 us 1.2032×
Nov 3 stack 8 3,191.18 us 1.5138×

Find the limiting resource

I started from the H200 spec sheet: 4.8 TB/s HBM, 989 TFLOPS dense BF16, 141 GB. Decode projections have a few rows and mostly stream weights, so the budget is bytes. Prefill projections have thousands of rows and can fill the tensor cores.

First thing I measured was achieved bandwidth per projection at parity with SGLang:

Achieved bandwidth table
projection achieved (TB/s) of 4.8 TB/s peak
qkv 3.0 63%
pooler 3.5 73%
unpooler 3.8 79%
o 2.6 54%
sliced unpooler 1.7 35%
router 1.3 27%

This changed the plan. Going from a smaller projection to a bigger one cost about what HBM peak says it should, so the kernels were already streaming fine. What was left was fixed cost per launch: how many kernels a step launches and how each one finishes. That killed a pile of bandwidth ideas before I spent GPU hours on them.

One thing that bit me early. The judge times with cold L2 and subtracts graph cost, so profiler time and scored time aren’t the same number. I never promoted a candidate off a profiler time after that.

Shorten the dependency chain

The late gains all came from 1 idea. In the stage loops of the handwritten kernels, stage time follows the serial chain of dependent instructions, not the instruction count. I tested it by adding 2 ladders separately. Dead padding instructions: almost no change. Dependent instructions: latency went up once the slack ran out.

Figure 4 is a model with nominal cycles, not measured H200 timings.

The edits that came out of it. None of them change an output bit:

edit target result
DH rb/rq E12 descriptor construction 1 LEA.HI instead of a shift-and-add chain; BF16 stack 6
WGD ro6 output rows double buffering, hoisted descriptor base; BF16 stack 7
TL small-m router tail exchange and waits moved behind the MMA; BF16 stack 8
DQ9 W4A16 expert dequantization lossless relayout of the 4-bit dequant; MoE step 4-5% faster; MoE entry 1.9209×
rbm DQ9 MoE engine at 128-256 tokens same relayout ported to the engine’s table; layer and prefill candidates still validating at the snapshot

Each one was compared bitwise against the previous build and timed in pairs on rented H200s before it got stacked.

The last BF16 step, 3,204.05 to 3,191.18 us, is 0.4%. A single scored run moves more than that by itself. So I split it into code change, node difference and run-to-run scatter, and let the paired measurements decide. The scored run just confirmed it.

Methods and negative results

I listed 15 H200 kernel methods before starting and tracked each one to a status. Closed means I ran it and it didn’t earn more time.

# Method Status Evidence
1 Roofline by workload shape Implemented locally Development notes record cold-L2 bandwidth measurements against the 4.8 TB/s H200 peak.
2 Fuse shared-input projections Partly qkv_gate is one weight; router hi and lo run in one launch through m 32.
3 Persistent work-list kernel Not started Not implemented. Complexity needs to be justified by a repeatable gain over simpler approaches.
4 Swap-AB skinny tiles Implemented locally Small-m TMA kernels compute the weight tile times X^T; the natural orientation did not win in the recorded comparisons.
5 Split-K with last-CTA reduce Implemented locally Ticket kernels reset their counters inside the graph; the tested balanced split-K candidate lost across the 30 development shapes (0.9817x).
6 Deep TMA pipeline Implemented locally TensorDescriptor weight loads with 3 to 4 stages and 64x128 or 128x64 boxes were used in the local kernels.
7 Programmatic dependent launch Not started Not implemented; no performance result claimed.
8 Weight repack in prepare Implemented locally Transposed layout, TMA-tiled copies and the hi/lo pair are in; a tile-contiguous layout ran natively twice with no aggregate win.
9 Router as BF16 hi + lo Implemented locally Recorded error 2.7e-6 against the 1e-4 development check; the original-FP32 full-K candidate at m 1 was not promoted.
10 Warp-specialized persistent GEMM Tried, closed Tested Hopper producer/consumer variants passed local correctness checks but ran 1.32 to 2.37x slower.
11 Cluster 2x1 TMA multicast Feasibility only Cluster DSMEM reviewed during development; no prototype or speedup claimed.
12 Tile-shape dispatch Implemented locally Development compared tile configurations by shape bucket; tested wider tiles and larger grids did not produce winners.
13 Development tuning, fixed dispatch Implemented locally Development used correctness-gated tuning in prepare; scored sources froze the selected maps. Untimed setup remains subject to the problem contract.
14 L2-aware tile order Implemented locally GROUP_M=8 grouped rasterization in the Triton GEMM.
15 TMA store epilogue Not started Not implemented; no performance result claimed.

What lost:

  • Custom large-m CuTe kernels: parity at best, 6 jobs
  • 2 E12 weight-streaming builds at m=128: 1.54× and 1.20× slower
  • cuBLASLt search: gated 96 algorithms, picked none
  • Warp-specialized producer/consumer variants: passed correctness, ran 1.32-2.37× slower
  • Weight compression: no gain worth having

2 of the losses changed how I work. The rl4 router was faster by itself, but inside the layer it fought the pooler GEMM for the GPU and slowed verify-16, so the layer kept rl3. Winning alone and losing in context is a loss. And my local RTX A4500 timings didn’t predict the H200 at all, which cost me 2 checks to find out. After that the local card was for correctness only.

The measurement system

A win is a median that beats the baseline median on the same GPU in the same process, shows up again in a separate run, and passed correctness on fresh inputs first. Everything else got logged as noise.

  • 169 correctness cases: 9 judge tests, 30 scored shapes, 130 nearby shapes. Plus fragment validation, poisoned partials and replay checks. Tolerances come from the problem’s checks, never a threshold I picked
  • Capture and replay inside a CUDA graph, and a nearby-shape audit for regressions outside the scored set
  • Timing is warmup then median and p90, baseline and candidate back to back. Every row has shape, config and commit hash
  • To ship: 2 H200 boards, pooled ratio 0.985 or better, both halves faster
  • Scored runs go through a script that checks the source hash, enforces a daily cap and won’t submit a file without an explicit go-ahead for it

These are my own controls. They don’t stand in for the organizers’ reruns, and passing an official check doesn’t mean a run survives review.

Review before merge

The rules got written before the first kernel: 1 kernel interface so a candidate drops into the dispatch table as is, 1 numerics policy, 1 timing policy.

Every candidate also went through a review whose only job was to break it. It checked what prepare reads, whether timing drops when an input gets replayed, and whether anything moved out of the timed region. A candidate that won on 3 shapes and lost on 2 got merged for the 3.

Nothing got promoted because it looked fast. It had to clear the gates, and that’s why I trust what came out.

Serving: make the improvement useful

None of this matters until it’s tokens per GPU-hour on a real node, and I haven’t measured that yet. The serving track opens Nov 12. You patch SGLang at commit 297e54fd (the v0.5.23 release) and submit the diff, and each run gets a whole 8×H200 node for up to 90 minutes. 1 submission and 3 check runs a day. The board is private until the track ends, you only see your own scores.

The rules that shape what I can bring over from the kernel work:

  • Lossless. No lower precision, no approximations, no skipped work
  • The diff only touches source and JSON configs under python/sglang, nothing in python/sglang/srt/model_loader/, no renames or binaries. 400 KB max and no added line over 400 characters
  • At most 2 GB more GPU memory per GPU than stock
  • TTFT at most 2× SGLang’s at each load
  • Readable source, nothing compressed or encoded
  • It has to read like a PR a maintainer could accept. Special-casing the challenge workload or its load levels, breaking other models or GPUs, or a sprawling patch can get you disqualified

The lossless rule sorts my kernel work into 2 piles. The chain edits and the W4A16 dequant relayout were checked bitwise equal, so those are the ones worth porting. The router as a BF16 hi + lo pair is an approximation (2.7e-6 error in my checks, fine for the kernel track) and it stays out. The memory cap also matters, extra repacked weight copies aren’t free anymore.

Candidates, all untested at node level: better launch flags and defaults, projection kernels behind a stock fallback, communication/norm fusion, fused quantized-expert kernels. Each one has to show bitwise-equal outputs before it’s worth a check run. Dummy-weight tests catch crashes and interface errors and that’s it.

If I can’t explain the mechanism of a patch in a paragraph and show the timing, the baseline stays.

What this shows for inference performance work

the job what’s here
First-principles reasoning about where time and memory go Roofline and bandwidth numbers that moved the work from bytes to per-launch fixed cost
Profiling from launch overhead and memory layout up The dependent-chain experiment, launch and finish structure, weight relayout in prepare
Quantization W4A16 dequant relayout, MoE step 4-5% faster, 1.9209×
Prefill vs. decode Separate kernels and entries: decode layer 1.7938×, prefill layer 1.5191×
Benchmarking frameworks 169 cases, paired H200 timing, a written ship rule, a 0.4% move attributed
New model on new hardware, fast 816B MoE on H200, first entry 9 days after day-0 support, 5 boards by Nov 3
Upstream contributions Serving patches against SGLang v0.5.23, written to be reviewed like a PR. Nothing merged yet
Performance into cost savings Not shown yet. The serving track (opens Nov 12) is where I find out

Sources