Add four baseline Solutions (FA3, FLA, SGLang Triton, SDPA) and their traces
Adds four hand-written library wrappers under baseline, together with the
traces that measure them. All four Definitions already exist; this contributes
implementations and measurements only.
What is added
| Solution | Definition | Backend |
|---|---|---|
fla_gdn_decode_v1 |
gdn_decode_qk4_v8_d128_k_last |
flash-linear-attention |
sdpa_paged_decode_v1 |
gqa_paged_decode_h32_kv8_d128_ps1 |
PyTorch SDPA |
fa3_gqa_prefill_v1 |
gqa_paged_prefill_causal_h16_kv1_d128_ps64 |
Flash Attention 3 |
sglang_mla_decode_v1 |
mla_paged_decode_h16_ckv512_kpe64_ps1 |
vendored SGLang Triton kernel |
Each of these four Definitions previously had exactly one Solution, so there was
nothing to compare against; each now has two independent backends.
Notes on individual Solutions
fa3_gqa_prefill_v1 — FA3's flash_attn_with_kvcache expects a different KV
layout than the Trace provides, so the Solution bridges the two: it rebuilds the
flat paged layout (kv_indices + kv_indptr + kv_last_page_len) into the 2Dpage_table [batch, max_pages] and cache_seqlens [batch] FA3 wants, passes the
packed query through cu_seqlens_q since Q is stored ragged as[total_q, num_qo_heads, head_dim], applies the causal mask, and converts the
natural-log LSE FA3 returns to base 2 to match the FlashInfer convention the
Definition's reference uses.
sglang_mla_decode_v1 — vendors SGLang's Triton MLA decode kernel as a
second source file, sglang_decode.py, with its Apache 2.0 header preserved. It
imports triton only; the sglang package is not required.
sdpa_paged_decode_v1 — a plaintorch.nn.functional.scaled_dot_product_attention implementation, included as a
portable reference point rather than a fast path. Its measurements reflect that:
it is slower than the Definition's reference on part of the workload range.
Traces
One record per workload, all PASSED. Three of the four Trace files already
existed; our records are appended and every existing row is preserved unchanged,
including the six RUNTIME_ERROR rows flashinfer_wrapper_a3c91f already had.
| Trace | Added | Hardware | Speedup vs. reference | Max abs. error |
|---|---|---|---|---|
gdn/gdn_decode_qk4_v8_d128_k_last |
5 (new file) | H100 NVL | 12.24× – 12.82× (median 12.40×) | 3.3e-4 |
gqa_paged/gqa_paged_decode_h32_kv8_d128_ps1 |
48 (48 → 96) | H100 PCIe | 0.78× – 2.41× (median 1.23×) | 7.8e-3 |
gqa_paged/gqa_paged_prefill_causal_h16_kv1_d128_ps64 |
20 (20 → 40) | H100 80GB HBM3 | 1.55× – 14.69× (median 1.97×) | 3.9e-3 |
mla_paged/mla_paged_decode_h16_ckv512_kpe64_ps1 |
47 (47 → 94) | B200 | 16.78× – 130.90× (median 44.21×) | 1.6e-2 |
The SDPA range includes values below 1×: on the shorter workloads it does not
beat the reference. Reported as measured rather than filtered.
Environments differ per Solution because each was measured on the stack its
backend needs — CUDA 13.0 / torch 2.11 for the Triton and FLA kernels, CUDA 12.6
/ torch 2.5 for the FA3 build. Each record carries its own environment block.
Dependency declarations
Each spec.dependencies was derived from what main.py actually imports:
sglang_mla_decode_v1declarestriton, notsglang— the SGLang kernel is
vendored into the Solution, so the package itself is never imported.fa3_gqa_prefill_v1declaresflash_attn_interface, the top-level module the
FA3 hopper build installs (py_modules=["flash_attn_interface", ...]); there
is noflash_attn_3Python package to name. As the first FA3 Solution here
there was no token to follow — happy to change it if you prefer another
spelling.sglang_mla_decode_v1previously declared H100 only while its trace was
measured on B200; H200 and B200 were added so the Solution and its evidence
agree.
Not included
Two setup/run split Solutions were held back. They declare a top-levelsetup(...) and need the setup-hook runnable contract from flashinfer-bench
PR #427, which is not merged; against current flashinfer-bench they fail to
build, so publishing them now would add Solutions that produce a COMPILE_ERROR
for every consumer.