Keep per-shape definitions and complete mask-free attention curation
Browse filesRestore per-shape definitions, workloads, tensor paths, configs, solutions
and figures while retaining curated workloads, imported contest GDN tasks,
SGLang wrappers and KDA configs.
Fix both per-shape FA4 baselines after removing the mask input. Make LTX
capture verify an all-visible mask before omitting it. Document the GDN
contracts and retained engine-interface adapters accurately.
Validation: native checks pass all 21 definitions, 1104 workloads and 5506
tensors; repository metadata and 14 capture cases pass; both FA4 baselines
pass all 20 dev workloads on B300 against the independent reference.
This view is limited to 50 files because it contains too many changes. See raw diff
- README.md +15 -17
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/0011fcf356b915718dc22610388ef6bb0a06e952e61cb610954122ea6d9b569d.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/0b9f435c086d799e64946d2339650d012947496eea8fddee2c9a74e08a32b80c.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/0e8a0eb1b0bbd588a87c0110b5b93be119538d4a458790c6de2449c22c941159.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/0ef04f05a00478a89c1b4b0188148efef283f0edd09d456eb27ec1b535c0a063.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/10421991d48239526ec8f05a46c718c16d90cacd498a0ffb4f4c60c1c3d61f3f.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/11a8b9d4110521467731516b88a4a1f59b0485d642355b10eafb8705f005277a.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/15b7d5bdf696f9737135f2b0fb9c070e7b7c314a47f94d42f2b7f2220b463f08.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/1848e8723c3271bb58b1899716b88fb309c1947013dff24de9d8697e52dffa45.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/1aa17838de8ff474520c0415b52de63cf7c284b2524dee34d2f518648193bcff.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/224e353933f43af734ec74834219cd0d532f8a4c2a5161f1bd6cb684e9f0c653.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/2587d48e43962811485244f272459d67d7e7ffd396f95c02125b9fd9457aa925.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/2853a80fc4317a86f06b98b502e7ab616e225fb12947dbfd1a21463a2a8bbac1.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/2a48c351e9371d5f66451dc30de4a50c73c4465d53738d94662926caf166bd4a.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/2ddd13c9a2e33a49f692aac184e5e81b5e4d31735f79e9f98222723461ce6905.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/3458abef18405c57cdf24fc03a2e5df6431a736fcaf61be3c80faa27f71c8cec.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/3c7c50a338fb849474ab1ac4d6e12b6892ae5c16050ad027fa3bb2dd41ea297c.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/3d48305d939f178cd8b60aae1986f9fd0004e2649a3b0900ebc4481683cf74bf.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/45bc577fdd6156c87de4860bb22460fa8a8f021f385f9baf8b47b572d5d2c3f9.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/52242c387e9b0142be33380829460bac47428c61cd3efeeacced4d883086cd0c.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/556b48d2e95940c9e20e93bd8cbcfa92e97c40b958bec2affc7e5c540af69a6a.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/578bf17c5693607e5cbffd8533249b100ee1a1b686c3b750009ab41f6dc8a110.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/58968e9db4efaafc3ee4bba457398afca703cd0aa049f476f437399dfddf4732.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/5c0f576a693acfced57412c7695e5a49841a899f035f24edc61c2d0696aee7a3.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/5f198676a629599e54864f76f9630326c23ab09bcdd94e89e26445da6898c418.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/5f7258afce97231dcfe4e69124dffde02e063b9c2a801460c13620e5e1d10b6c.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/613bf537e5c647929de38c09f005844ca81e16c16bde1a0a76a7f61d16018b1f.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/67e37cb856bf62111318b054e45b50aa09b3037acb24eb5ef56b9620cf6e3762.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/6e4dd7f63ee604011aba960400d128e5ed7b7bb21e8e6869be5ee2c10cf44be2.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/700d12ad328e6f79c703226ee14f6192ee4b82d1b9691995aa4c10beb31d86d8.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/81a96a69b9ff8b69ca337c8723fc291b117001bd7a52afa4e90ae0fc959f6345.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/862b917b34836b4cb5c914ebd438468ab52cde111f8fd09bc92099d58c6d67be.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/94b04f641e312fc292d4b3a9b930f4eeb6cf1318e34029e64abb117c8bc459a0.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/9ac5f664ce8eb9c2a335d65460ff23b7a24ccd094765fd9037d575839ce23fba.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/9d053c114f2b2a56879ada915a1e2eb6044885b06fefcda54ef0809e8e551c35.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/a42766eae27a05cd0cce5433d112b0a4de66a8aca2c115f1aa0c128d6963060c.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/a437b5a4c0b7c610e16d9828304d4ed04567fdf4469af390be3bd095aa716980.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/aa09b35816f4ec0199d1f339bc9b06750db3dc167f098a51101f6d94b83b1fea.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/b995b47f035c0878afab3db51944cc4a5336bc7f1be525a9b28427542b9d1a32.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/c2a2a2369fe08707c7349f0050ff7d8988da2ef92572fd0266bc4ef210e558bc.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/c73097f491d3f526d743389cd71d1c69f174db8d2d1030ab6d6fa3fd8a0c606e.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/c97bfb44e2775e0cdaac962bfdd2f877d4c99dbc2c9678f2128fe8ce562d2021.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/cec0f1e9b60d0690b3be938c39a944172aaa7dc4acd52041b0ad79454341b61a.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/d5c44dd34082f0533eeabce7e97d842f0f2d509b5430cf3925ebd7f973cf6dad.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/d6be6a755b2ab6726c360d5b1b24de346f6e4cf020be805371ab2c331a730970.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/dc9b20c2bc55f03a1dd7c18d929a141cc71ef4cbca2e2013c7ffa2642e1fa333.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/dd2c3c9e4563d68e0eceaf6b636447bd810f8ac4d34ea6332190501d8cdaa355.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/ddbc841406dfa1cf43db45375104bc10436d822b7bf5f79acd0f349547c6b5c4.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/e033a43092ceec91d029e402f4d191d8a3432a426647b24b1aac8134bc95ff0e.safetensors +0 -0
- blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/e036a483c4de8e0799050c512f59e8c173dc2d31dc95fcd0de9b8f11fa871557.safetensors +0 -0
README.md
CHANGED
|
@@ -9,11 +9,11 @@ tags:
|
|
| 9 |
---
|
| 10 |
# Inference Kernels
|
| 11 |
|
| 12 |
-
|
| 13 |
|
| 14 |
Every published tensor input references a complete `safetensors` snapshot. Python scalar arguments use scalar descriptors. There are no random-input descriptors or synthetic activation generators. `captures.jsonl` joins each workload UUID to its model revision, request, engine operation, input adaptations, actual outputs, and validation results.
|
| 15 |
|
| 16 |
-
**1,104 real workloads cover all
|
| 17 |
|
| 18 |
The dataset was regenerated from full pinned checkpoints through SGLang on NVIDIA B300 GPUs. Definitions, reference code, tolerances, and baseline solutions are unchanged, apart from the [curation](#curation) for kernels that real inference uses.
|
| 19 |
|
|
@@ -23,23 +23,23 @@ BF16, FP16, FP32, and FP64 mean 16-bit Brain Floating Point, IEEE half precision
|
|
| 23 |
|
| 24 |
| Family | Model | Fixed dimensions | Definitions | Workloads |
|
| 25 |
|---|---|---|---:|---:|
|
| 26 |
-
| Dense matrix multiplication | Qwen Image 2.1 Turbo | `(N,K)`: `(4096,4096)`, `(12288,4096)`, `(4096,12288)`; `M >= 4096` |
|
| 27 |
-
| Grouped expert matrix multiplication | DeepSeek V4.1 Flash | 384 experts; `(N,K)`: `(4608,5120)`, `(5120,2304)`; FP8 × FP4 |
|
| 28 |
| Mixed-format latent attention | DeepSeek V4.1 Flash | 64 heads × 512 dimensions; 128 FP8 window slots and 512 FP4 compressed slots | 1 | 42 |
|
| 29 |
-
| Sparse multi-head latent attention (MLA), prefill | DeepSeek V4.1 Flash | 64 query heads × 512 dimensions; 1 shared key/value head; BF16; 128
|
| 30 |
| Gated delta recurrence | Qwen3-Next (MLSys 2026 contest) | 4 query/key heads, 8 value heads (TP=4 shard), dimension 128; k-last state; prefill and decode | 2 | 154 |
|
| 31 |
-
| Noncausal dense attention | LTX-2.5 | 32 heads
|
| 32 |
| Qwen sparse attention | Qwen 3.8 Flash-Next | 24 query heads, 2 key/value heads, dimension 256; 512 four-token blocks | 1 | 192 |
|
| 33 |
| Prefix-cached block-causal attention | Qwen Image 2.1 Turbo | 32 heads × 128; empty-prefix and cached-prefix cases | 2 | 40 |
|
| 34 |
| Sparse index scoring and selection | Qwen 3.8 Flash-Next | 4 query heads × 128; Top-512 complete four-token blocks | 1 | 192 |
|
| 35 |
| Expert router | DeepSeek V4.1 Flash | Hidden dimension 5120, 384 experts, Top-6 selection | 1 | 50 |
|
| 36 |
-
| Three-dimensional neighborhood attention | LTX-2.5 diffusion decoder | Dimension 64; `(heads, window)`: `(32,3×7×7)`, `(16,3×7×7)`, `(8,3×5×5)`, `(4,11×11×11)`
|
| 37 |
|
| 38 |
-
**[Shape distribution histograms for all
|
| 39 |
|
| 40 |
Definitions describe complete logical operators. Captures preserve all model heads and experts; distributed shards must be gathered before publication. Backend padding, layout changes, and page remapping are recorded explicitly. Cache snapshots retain every referenced page, including its unused tail; unreachable allocator pages are omitted. Tensor strides are normalized to contiguous storage without changing values.
|
| 41 |
|
| 42 |
-
The gated delta definitions are the MLSys 2026 contest's:
|
| 43 |
|
| 44 |
Quantized byte carriers use `int8` because the trace schema lacks unsigned-byte and exponent-only scale types. The byte patterns remain unchanged. Grouped matrix multiplication uses logical scale layouts with one scale per 32 K elements. Mixed attention preserves the engine's physical pages: each page stores all payload rows followed by all scale rows. Both cache formats share the softmax denominator, including the zero-value attention sink.
|
| 45 |
|
|
@@ -104,7 +104,7 @@ The existing baseline implementations and B200 measurements come from the origin
|
|
| 104 |
|
| 105 |
| Kernels | Open-source implementation |
|
| 106 |
|---|---|
|
| 107 |
-
| Dense and grouped matrix multiplication | [DeepGEMM](https://github.com/deepseek-ai/DeepGEMM/tree/1fc9c66975ee322d628b3288534ca0e9ce12a64d) |
|
| 108 |
| Sparse MLA prefill and mixed-format MLA decode | [FlashMLA](https://github.com/deepseek-ai/FlashMLA/tree/0f11e178da1f67becb087a324b400854931ec3e3) |
|
| 109 |
| Dense, block-causal, and sparse grouped-query attention | [FlashAttention-4](https://github.com/Dao-AILab/flash-attention) 4.0.0b35, with runtime masks or sparse-input adapters |
|
| 110 |
| Gated delta recurrence | The MLSys 2026 contest's FlashInfer prefill and decode wrappers, unchanged |
|
|
@@ -130,6 +130,8 @@ The runner uses the native Trace builder, validates every output element against
|
|
| 130 |
|
| 131 |
Each SGLang-captured definition also has `solutions/<family>/sglang_<definition>.json`: SGLang's own implementation at the capture commit `684fea8a`, called the way the engine calls it, so that a kernel can be timed against what serving actually runs. The module docstring cites the engine call path. Run these solutions inside the capture image `lmsysorg/sglang@sha256:ddae0e399d3d94f7827f16183301cf8dac4cf0eae0ef25590b7dac5881d713d8`. Each module also exposes `prepare(*inputs)`, which does the host-side setup the engine does once (layouts, block masks, workspaces) and returns a zero-argument `launch`; `run(*inputs)` does both.
|
| 132 |
|
|
|
|
|
|
|
| 133 |
### KDA acceptance configs
|
| 134 |
|
| 135 |
`kda/<definition>.json` is how KDA (Kernel Design Agents) judges a candidate kernel on that definition. The definition's reference is the truth, and the SGLang baseline above is timed live on every workload, with only `launch` timed. The fields are:
|
|
@@ -139,16 +141,12 @@ Each SGLang-captured definition also has `solutions/<family>/sglang_<definition>
|
|
| 139 |
|
| 140 |
## Curation
|
| 141 |
|
| 142 |
-
This revision
|
| 143 |
- **Removed `dense_gemm_bf16_nt_n64_k4096` and `dense_gemm_bf16_nt_n4096_k64`.** These are the image output and input projections: memory-bound 8–45 µs GEMMs that run once per forward.
|
| 144 |
- **Removed `grouped_gemm_fp8_fp4_e384_n2304_k5120_g32`.** It was cut from the columns of the concatenated gate/up GEMM; no engine runs a separate gate or up GEMM.
|
| 145 |
-
- **Replaced the gated delta definitions.** `
|
| 146 |
- **The three remaining dense GEMMs keep only their `M >= 4096` rows.** The `M <= 32` rows were 11–27 µs launches.
|
| 147 |
- **The LTX dense attention definitions drop the dense `[B, H, Nq, Nk]` visibility mask.** It was all True on every captured call (up to 839 MB). On one GPU the engine passes no mask, or an all-visible prompt mask. Replay against the captured engine outputs still passes.
|
| 148 |
-
- **One definition per operator.** The per-shape definitions of an operator are merged into one, in which the shape constants are runtime axes: dense GEMM `N`/`K`, grouped GEMM `N`/`K` (with `K_packed`, `K_groups`), dense attention `D`, neighborhood `H`, and sparse MLA `TopK`. Block-causal attention keeps its empty-prefix definition (`Np = 0`), because FlashInfer Trace requires positive runtime axes; KDA judges the two as one task. The references were identical across shapes. The neighborhood window becomes three scalar inputs (`Kt`, `Ky`, `Kx`), because no tensor shape carries it.
|
| 149 |
-
- Tensors move to the merged definition's directory; identical snapshots collapse into one path each.
|
| 150 |
-
- Receipts take the merged definition and axes, and keep the definition they were captured under as `captured_definition`.
|
| 151 |
-
- The per-shape open-source solutions merge too: one DeepGEMM BF16 solution for every `(N, K)` (the CuTe DSL branch served only the removed `M <= 32` rows); one DeepGEMM grouped solution; FlashAttention 4 without a mask (FP16 for `D = 64`, as before); NATTEN with the window from the inputs; and one FlashMLA solution.
|
| 152 |
- **Receipts and tensors.** The receipts of removed workloads are dropped, along with every tensor that nothing references.
|
| 153 |
- **Scripts.**
|
| 154 |
- `check_workload_inputs.py` evaluates constraints that read inputs, such as `cu_seqlens[-1]`.
|
|
@@ -231,7 +229,7 @@ BF16 comparisons use `rtol=0.016, atol=0.005`; FP32 uses `rtol=1e-4, atol=2e-5`;
|
|
| 231 |
|
| 232 |
One complete router workload is excluded from the 279 DeepSeek raw captures: at two rows of a 4,096-row call, FP32 ranking ties produce different expert selections. The original FP32 reference and exact selected-set requirement remain unchanged. This call was also absent from the original dataset. No rows are removed from published tensors. All nine LTX requests pass and are included.
|
| 233 |
|
| 234 |
-
Tensor files are published directly as `blob/workloads/<definition>/<hash>.safetensors` through Git LFS. Every workload and capture record references tensors under its definition directory. Shared snapshots have identical LFS objects across directories: 5,
|
| 235 |
|
| 236 |
```bash
|
| 237 |
git clone https://huggingface.co/datasets/humanfia-lab/inference-kernels
|
|
|
|
| 9 |
---
|
| 10 |
# Inference Kernels
|
| 11 |
|
| 12 |
+
21 [FlashInfer Trace](https://github.com/flashinfer-ai/flashinfer-bench/tree/main/docs/flashinfer-trace) operator definitions, with self-contained PyTorch references, open-source baseline solutions, and workloads captured from actual inference: 19 through SGLang, and the 2 gated delta definitions from the [MLSys 2026 FlashInfer contest](https://huggingface.co/datasets/flashinfer-ai/mlsys26-contest/tree/5e832ce88dd1013032b22a0e942979d7d2769cc3). Model dimensions are constants. Runtime batch sizes, sequence lengths, page sizes, and image grids remain variable.
|
| 13 |
|
| 14 |
Every published tensor input references a complete `safetensors` snapshot. Python scalar arguments use scalar descriptors. There are no random-input descriptors or synthetic activation generators. `captures.jsonl` joins each workload UUID to its model revision, request, engine operation, input adaptations, actual outputs, and validation results.
|
| 15 |
|
| 16 |
+
**1,104 real workloads cover all 21 definitions:** 133 Qwen Image, 384 Qwen Flash-Next, 226 DeepSeek, 207 LTX, and 154 Qwen3-Next from the MLSys 2026 contest. The 950 SGLang captures pass complete-output replay; the contest publishes no engine outputs, so its workloads are checked by running the reference. The complete dataset is published at [humanfia-lab/inference-kernels](https://huggingface.co/datasets/humanfia-lab/inference-kernels), including definitions, workloads, capture records, baseline solutions, and tensors. The 5,506 tensor paths contain 5,124 unique snapshots of inputs, complete engine outputs, and auxiliary capture tensors. Fetch them with Git LFS before running workloads.
|
| 17 |
|
| 18 |
The dataset was regenerated from full pinned checkpoints through SGLang on NVIDIA B300 GPUs. Definitions, reference code, tolerances, and baseline solutions are unchanged, apart from the [curation](#curation) for kernels that real inference uses.
|
| 19 |
|
|
|
|
| 23 |
|
| 24 |
| Family | Model | Fixed dimensions | Definitions | Workloads |
|
| 25 |
|---|---|---|---:|---:|
|
| 26 |
+
| Dense matrix multiplication | Qwen Image 2.1 Turbo | `(N,K)`: `(4096,4096)`, `(12288,4096)`, `(4096,12288)`; `M >= 4096` | 3 | 93 |
|
| 27 |
+
| Grouped expert matrix multiplication | DeepSeek V4.1 Flash | 384 experts; `(N,K)`: `(4608,5120)`, `(5120,2304)`; FP8 × FP4 | 2 | 104 |
|
| 28 |
| Mixed-format latent attention | DeepSeek V4.1 Flash | 64 heads × 512 dimensions; 128 FP8 window slots and 512 FP4 compressed slots | 1 | 42 |
|
| 29 |
+
| Sparse multi-head latent attention (MLA), prefill | DeepSeek V4.1 Flash | 64 query heads × 512 dimensions; 1 shared key/value head; BF16; separate 128-slot and 640-slot definitions | 2 | 30 |
|
| 30 |
| Gated delta recurrence | Qwen3-Next (MLSys 2026 contest) | 4 query/key heads, 8 value heads (TP=4 shard), dimension 128; k-last state; prefill and decode | 2 | 154 |
|
| 31 |
+
| Noncausal dense attention | LTX-2.5 | Video: 32 heads × 128; audio: 32 heads × 64; no mask | 2 | 162 |
|
| 32 |
| Qwen sparse attention | Qwen 3.8 Flash-Next | 24 query heads, 2 key/value heads, dimension 256; 512 four-token blocks | 1 | 192 |
|
| 33 |
| Prefix-cached block-causal attention | Qwen Image 2.1 Turbo | 32 heads × 128; empty-prefix and cached-prefix cases | 2 | 40 |
|
| 34 |
| Sparse index scoring and selection | Qwen 3.8 Flash-Next | 4 query heads × 128; Top-512 complete four-token blocks | 1 | 192 |
|
| 35 |
| Expert router | DeepSeek V4.1 Flash | Hidden dimension 5120, 384 experts, Top-6 selection | 1 | 50 |
|
| 36 |
+
| Three-dimensional neighborhood attention | LTX-2.5 diffusion decoder | Dimension 64; `(heads, window)`: `(32,3×7×7)`, `(16,3×7×7)`, `(8,3×5×5)`, `(4,11×11×11)` | 4 | 45 |
|
| 37 |
|
| 38 |
+
**[Shape distribution histograms for all 21 kernels](docs/shape-distributions/README.md)** show how the 1,104 workloads are distributed across exact runtime shapes. Each bar counts captured workloads with the same complete combination of variable dimensions; fixed model dimensions are listed above the plot. These counts describe this dataset, not AgentX traffic frequencies. Regenerate the figures with `python scripts/plot_shape_distributions.py` (requires Matplotlib; no GPU or tensor files needed).
|
| 39 |
|
| 40 |
Definitions describe complete logical operators. Captures preserve all model heads and experts; distributed shards must be gathered before publication. Backend padding, layout changes, and page remapping are recorded explicitly. Cache snapshots retain every referenced page, including its unused tail; unreachable allocator pages are omitted. Tensor strides are normalized to contiguous storage without changing values.
|
| 41 |
|
| 42 |
+
The gated delta definitions are the MLSys 2026 contest's: Q/K/V with the gate inputs `A_log`, `a`, `dt_bias` and `b`, and the k-last state layout `[sequence, value head, value dimension, key dimension]`. Prefill takes variable-length sequences through `cu_seqlens`. These are unchanged Qwen3-Next TP=4 contest contracts, not a layout conversion of the removed Qwen Flash-Next captures. Their references do not perform Q/K L2 normalization, and they accept per-batch states rather than the original SGLang state pool and slot indices.
|
| 43 |
|
| 44 |
Quantized byte carriers use `int8` because the trace schema lacks unsigned-byte and exponent-only scale types. The byte patterns remain unchanged. Grouped matrix multiplication uses logical scale layouts with one scale per 32 K elements. Mixed attention preserves the engine's physical pages: each page stores all payload rows followed by all scale rows. Both cache formats share the softmax denominator, including the zero-value attention sink.
|
| 45 |
|
|
|
|
| 104 |
|
| 105 |
| Kernels | Open-source implementation |
|
| 106 |
|---|---|
|
| 107 |
+
| Dense and grouped matrix multiplication | [DeepGEMM](https://github.com/deepseek-ai/DeepGEMM/tree/1fc9c66975ee322d628b3288534ca0e9ce12a64d); selected small dense shapes use [FlashInfer](https://github.com/flashinfer-ai/flashinfer) 0.7.2 CuTe DSL |
|
| 108 |
| Sparse MLA prefill and mixed-format MLA decode | [FlashMLA](https://github.com/deepseek-ai/FlashMLA/tree/0f11e178da1f67becb087a324b400854931ec3e3) |
|
| 109 |
| Dense, block-causal, and sparse grouped-query attention | [FlashAttention-4](https://github.com/Dao-AILab/flash-attention) 4.0.0b35, with runtime masks or sparse-input adapters |
|
| 110 |
| Gated delta recurrence | The MLSys 2026 contest's FlashInfer prefill and decode wrappers, unchanged |
|
|
|
|
| 130 |
|
| 131 |
Each SGLang-captured definition also has `solutions/<family>/sglang_<definition>.json`: SGLang's own implementation at the capture commit `684fea8a`, called the way the engine calls it, so that a kernel can be timed against what serving actually runs. The module docstring cites the engine call path. Run these solutions inside the capture image `lmsysorg/sglang@sha256:ddae0e399d3d94f7827f16183301cf8dac4cf0eae0ef25590b7dac5881d713d8`. Each module also exposes `prepare(*inputs)`, which does the host-side setup the engine does once (layouts, block masks, workspaces) and returns a zero-argument `launch`; `run(*inputs)` does both.
|
| 132 |
|
| 133 |
+
The SGLang solutions adapt the dataset's independent operator interfaces to the pinned engine implementations. Those adapters include padding, layouts, per-rank calls, metadata and output ordering where needed; their module docstrings describe the boundary. A passing standalone workload does not establish that a candidate can replace an engine call without integration work.
|
| 134 |
+
|
| 135 |
### KDA acceptance configs
|
| 136 |
|
| 137 |
`kda/<definition>.json` is how KDA (Kernel Design Agents) judges a candidate kernel on that definition. The definition's reference is the truth, and the SGLang baseline above is timed live on every workload, with only `launch` timed. The fields are:
|
|
|
|
| 141 |
|
| 142 |
## Curation
|
| 143 |
|
| 144 |
+
This revision curates inference operator tasks for KDA (Kernel Design Agents). Per-shape definitions, workload files and solution names stay separate; model dimensions remain constant axes. Captured interface adaptations are retained explicitly.
|
| 145 |
- **Removed `dense_gemm_bf16_nt_n64_k4096` and `dense_gemm_bf16_nt_n4096_k64`.** These are the image output and input projections: memory-bound 8–45 µs GEMMs that run once per forward.
|
| 146 |
- **Removed `grouped_gemm_fp8_fp4_e384_n2304_k5120_g32`.** It was cut from the columns of the concatenated gate/up GEMM; no engine runs a separate gate or up GEMM.
|
| 147 |
+
- **Replaced the gated delta definitions.** `gated_delta_rule_prefill_h48_dk128_dv128` pre-repeated 16 Q/K heads to 48; the old decode kept 16 raw Q/K heads and included normalization and gating. Both captures extracted states from the engine pool and transposed them to `[B, H, K, V]`. They are replaced by the [MLSys 2026 FlashInfer contest](https://huggingface.co/datasets/flashinfer-ai/mlsys26-contest/tree/5e832ce88dd1013032b22a0e942979d7d2769cc3) definitions `gdn_{decode,prefill}_qk4_v8_d128_k_last`, with their workloads and FlashInfer baselines unchanged. Each input tensor is stored in its own content-addressed file. Each receipt records the source workload, plus a check that the reference returns finite outputs of the declared shapes.
|
| 148 |
- **The three remaining dense GEMMs keep only their `M >= 4096` rows.** The `M <= 32` rows were 11–27 µs launches.
|
| 149 |
- **The LTX dense attention definitions drop the dense `[B, H, Nq, Nk]` visibility mask.** It was all True on every captured call (up to 839 MB). On one GPU the engine passes no mask, or an all-visible prompt mask. Replay against the captured engine outputs still passes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
- **Receipts and tensors.** The receipts of removed workloads are dropped, along with every tensor that nothing references.
|
| 151 |
- **Scripts.**
|
| 152 |
- `check_workload_inputs.py` evaluates constraints that read inputs, such as `cu_seqlens[-1]`.
|
|
|
|
| 229 |
|
| 230 |
One complete router workload is excluded from the 279 DeepSeek raw captures: at two rows of a 4,096-row call, FP32 ranking ties produce different expert selections. The original FP32 reference and exact selected-set requirement remain unchanged. This call was also absent from the original dataset. No rows are removed from published tensors. All nine LTX requests pass and are included.
|
| 231 |
|
| 232 |
+
Tensor files are published directly as `blob/workloads/<definition>/<hash>.safetensors` through Git LFS. Every workload and capture record references tensors under its definition directory. Shared snapshots have identical LFS objects across directories: 5,506 paths contain 5,124 unique snapshots totaling 146.34 GB (146.44 GB when materialized at every path).
|
| 233 |
|
| 234 |
```bash
|
| 235 |
git clone https://huggingface.co/datasets/humanfia-lab/inference-kernels
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/0011fcf356b915718dc22610388ef6bb0a06e952e61cb610954122ea6d9b569d.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/0b9f435c086d799e64946d2339650d012947496eea8fddee2c9a74e08a32b80c.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/0e8a0eb1b0bbd588a87c0110b5b93be119538d4a458790c6de2449c22c941159.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/0ef04f05a00478a89c1b4b0188148efef283f0edd09d456eb27ec1b535c0a063.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/10421991d48239526ec8f05a46c718c16d90cacd498a0ffb4f4c60c1c3d61f3f.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/11a8b9d4110521467731516b88a4a1f59b0485d642355b10eafb8705f005277a.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/15b7d5bdf696f9737135f2b0fb9c070e7b7c314a47f94d42f2b7f2220b463f08.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/1848e8723c3271bb58b1899716b88fb309c1947013dff24de9d8697e52dffa45.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/1aa17838de8ff474520c0415b52de63cf7c284b2524dee34d2f518648193bcff.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/224e353933f43af734ec74834219cd0d532f8a4c2a5161f1bd6cb684e9f0c653.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/2587d48e43962811485244f272459d67d7e7ffd396f95c02125b9fd9457aa925.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/2853a80fc4317a86f06b98b502e7ab616e225fb12947dbfd1a21463a2a8bbac1.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/2a48c351e9371d5f66451dc30de4a50c73c4465d53738d94662926caf166bd4a.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/2ddd13c9a2e33a49f692aac184e5e81b5e4d31735f79e9f98222723461ce6905.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/3458abef18405c57cdf24fc03a2e5df6431a736fcaf61be3c80faa27f71c8cec.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/3c7c50a338fb849474ab1ac4d6e12b6892ae5c16050ad027fa3bb2dd41ea297c.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/3d48305d939f178cd8b60aae1986f9fd0004e2649a3b0900ebc4481683cf74bf.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/45bc577fdd6156c87de4860bb22460fa8a8f021f385f9baf8b47b572d5d2c3f9.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/52242c387e9b0142be33380829460bac47428c61cd3efeeacced4d883086cd0c.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/556b48d2e95940c9e20e93bd8cbcfa92e97c40b958bec2affc7e5c540af69a6a.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/578bf17c5693607e5cbffd8533249b100ee1a1b686c3b750009ab41f6dc8a110.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/58968e9db4efaafc3ee4bba457398afca703cd0aa049f476f437399dfddf4732.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/5c0f576a693acfced57412c7695e5a49841a899f035f24edc61c2d0696aee7a3.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/5f198676a629599e54864f76f9630326c23ab09bcdd94e89e26445da6898c418.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/5f7258afce97231dcfe4e69124dffde02e063b9c2a801460c13620e5e1d10b6c.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/613bf537e5c647929de38c09f005844ca81e16c16bde1a0a76a7f61d16018b1f.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/67e37cb856bf62111318b054e45b50aa09b3037acb24eb5ef56b9620cf6e3762.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/6e4dd7f63ee604011aba960400d128e5ed7b7bb21e8e6869be5ee2c10cf44be2.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/700d12ad328e6f79c703226ee14f6192ee4b82d1b9691995aa4c10beb31d86d8.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/81a96a69b9ff8b69ca337c8723fc291b117001bd7a52afa4e90ae0fc959f6345.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/862b917b34836b4cb5c914ebd438468ab52cde111f8fd09bc92099d58c6d67be.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/94b04f641e312fc292d4b3a9b930f4eeb6cf1318e34029e64abb117c8bc459a0.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/9ac5f664ce8eb9c2a335d65460ff23b7a24ccd094765fd9037d575839ce23fba.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/9d053c114f2b2a56879ada915a1e2eb6044885b06fefcda54ef0809e8e551c35.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/a42766eae27a05cd0cce5433d112b0a4de66a8aca2c115f1aa0c128d6963060c.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/a437b5a4c0b7c610e16d9828304d4ed04567fdf4469af390be3bd095aa716980.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/aa09b35816f4ec0199d1f339bc9b06750db3dc167f098a51101f6d94b83b1fea.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/b995b47f035c0878afab3db51944cc4a5336bc7f1be525a9b28427542b9d1a32.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/c2a2a2369fe08707c7349f0050ff7d8988da2ef92572fd0266bc4ef210e558bc.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/c73097f491d3f526d743389cd71d1c69f174db8d2d1030ab6d6fa3fd8a0c606e.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/c97bfb44e2775e0cdaac962bfdd2f877d4c99dbc2c9678f2128fe8ce562d2021.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/cec0f1e9b60d0690b3be938c39a944172aaa7dc4acd52041b0ad79454341b61a.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/d5c44dd34082f0533eeabce7e97d842f0f2d509b5430cf3925ebd7f973cf6dad.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/d6be6a755b2ab6726c360d5b1b24de346f6e4cf020be805371ab2c331a730970.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/dc9b20c2bc55f03a1dd7c18d929a141cc71ef4cbca2e2013c7ffa2642e1fa333.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/dd2c3c9e4563d68e0eceaf6b636447bd810f8ac4d34ea6332190501d8cdaa355.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/ddbc841406dfa1cf43db45375104bc10436d822b7bf5f79acd0f349547c6b5c4.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/e033a43092ceec91d029e402f4d191d8a3432a426647b24b1aac8134bc95ff0e.safetensors
RENAMED
|
File without changes
|
blob/workloads/{dense_gemm_bf16_nt → dense_gemm_bf16_nt_n12288_k4096}/e036a483c4de8e0799050c512f59e8c173dc2d31dc95fcd0de9b8f11fa871557.safetensors
RENAMED
|
File without changes
|