File size: 3,835 Bytes
d04d6fc 1276a5c 7454677 1276a5c 7454677 eccb5b4 7454677 1276a5c 7d093e6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | ---
pretty_name: KernelBench-M
language:
- en
tags:
- mutation-testing
- cuda
- gpu-kernels
- benchmark-auditing
- code-generation
size_categories:
- 10K<n<100K
---
# KernelBench-M
The measurement artifact for *Measuring the Checker: Mutation Analysis for
GPU-Kernel Benchmark Oracles*: the mutation operators, the verified CUDA
substrates they mutate, the kill witnesses, and the pipeline that produced
every number in the paper.
## Layout
```
rules/ 124 mutation rules, six families (mutator.py loads all of them)
substrates/ 208 gate-verified CUDA implementations, one per KernelBench
problem: the mutation targets. Never used as oracle.
witnesses/ per-problem kill records: for every mutant, its rule, family,
mutated site, whether the official protocol kills it, and — when
it survives — a suite that does
pipeline/ the measurement code (screening, kill matrix, audit, set cover)
summary.json per-problem mutant / witnessed / official-kill counts
validation/ errata, validation evidence, and quarantined historical records
```
The substrate count above describes the original release. InstanceNorm's
repaired source has passed H100 re-admission; its active witness and summary
records now describe the repaired source and expanded regression suites.
Supporting records: `mechanism_curves.json` (Fig. 2b–c), `holdout.json`
(dev/test split), `ladder_summary.json` (knowledge ladder),
`gate_report.json` (substrate admission), `invalid_suites.json` (suites
rejected for crossing the validity ceiling).
## What a substrate is, and is not
KernelBench ships PyTorch references whose GPU execution bottoms out in closed
cuDNN/cuBLAS binaries, so there is no source to mutate. A *substrate* is a
correct CUDA implementation of the same computation, used **only** as a
mutation target. The oracle stays the benchmark's own PyTorch reference. Each
substrate is admitted by `pipeline/gate_candidates.py`, which compares it
against that reference on every suite before it may enter the pool
(`gate_report.json` records admissions and rejections).
## Witness format
```json
"softmax:barrier-drop:3": {
"rule": "barrier-drop", "family": "sync",
"site": "__syncthreads();",
"cls": "high_value",
"killed_by_official": false,
"witness": "T2_misaligned_batch"
}
```
`cls` is `killed_by_T0` (the official inputs detect it), `high_value` (survives
the official inputs, a targeted input detects it), or `no_witness` (nothing we
have detects it — an equivalence or oracle-blindness candidate, excluded from
every denominator in the paper).
## Reproducing
Requires an NVIDIA GPU with CUDA 12.x and PyTorch. From `pipeline/`:
```bash
python screen_mutants.py # generate, filter, and screen mutants
python full_matrix.py # kill matrix over all suites
python audit_matrix.py # score competing protocols (§5)
python analyze_cover.py # set-cover suite synthesis (§6)
python analyze_holdout.py # dev/test holdout (§6)
```
Each stage writes append-only JSONL journals and resumes from them, so a
crashed or preempted run can simply be restarted. `SHARD_ID`/`SHARD_N` split
problems across GPUs; `STEAL=1` lets an idle worker pick up unclaimed problems.
## Caveats
Mutation score is adequacy relative to this fault model, not absolute
correctness: these operators cannot express faults living in structures the
substrates do not contain (tensor-core paths, double-buffered pipelines), nor
multi-site interactions. The artifact supports comparative claims between
protocols and existence claims about specific faults. It cannot certify that a
kernel passing these suites is correct.
## Acknowledgments
Thanks to Jayden Vasquez for reporting the InstanceNorm numerical issue and providing a reproducer and initial fix.
|