Datasets:
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: TypeError
Message: Couldn't cast array of type
struct<M: int64, N: int64, H: int64, Hk: int64, D: int64>
to
{'M': Value('int64'), 'N': Value('int64')}
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1827, in _prepare_split_single
for key, table in generator:
^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 613, in wrapped
for item in generator(*args, **kwargs):
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2312, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1861, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2158, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
TypeError: Couldn't cast array of type
struct<M: int64, N: int64, H: int64, Hk: int64, D: int64>
to
{'M': Value('int64'), 'N': Value('int64')}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1694, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1880, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
episode_id string | op string | impl string | desc string | signature string | gpu string | arch string | dtype string | shape dict | objective string | baseline_ms float64 | best dict | attempts dict | num_steps int64 | steps list |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cuda_rmsnorm-a100-80g-M=2048,N=4096-fp16-s16406459 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | fp16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.087301 | {
"step": 13,
"time_ms": 0.020898,
"speedup": 4.177
} | {
"kept": 6,
"reverted": 25,
"errors": 0,
"rebench": 0
} | 31 | [
{
"tag": "v0_scalar",
"action": "scalar two-pass, shared-mem atomic reduce",
"kind": "baseline",
"params": {},
"code": "\n// baseline: one block per row, scalar loads, two passes over global memory\n__global__ void rmsnorm_v0(const half* __restrict__ x,\n const half* __... |
cuda_rmsnorm-a100-80g-M=2048,N=4096-fp16-s16414378 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | fp16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.087329 | {
"step": 14,
"time_ms": 0.02081,
"speedup": 4.196
} | {
"kept": 6,
"reverted": 26,
"errors": 1,
"rebench": 2
} | 33 | [
{
"tag": "v0_scalar",
"action": "scalar two-pass, shared-mem atomic reduce",
"kind": "baseline",
"params": {},
"code": "\n// baseline: one block per row, scalar loads, two passes over global memory\n__global__ void rmsnorm_v0(const half* __restrict__ x,\n const half* __... |
cuda_rmsnorm-a100-80g-M=2048,N=4096-fp16-s16422297 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | fp16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.084062 | {
"step": 14,
"time_ms": 0.021175,
"speedup": 3.97
} | {
"kept": 6,
"reverted": 26,
"errors": 1,
"rebench": 2
} | 33 | [{"tag":"v0_scalar","action":"scalar two-pass, shared-mem atomic reduce","kind":"baseline","params":(...TRUNCATED) |
cuda_rmsnorm-a100-80g-M=2048,N=4096-fp16-s16430216 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | fp16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.087286 | {
"step": 8,
"time_ms": 0.02157,
"speedup": 4.047
} | {
"kept": 5,
"reverted": 25,
"errors": 1,
"rebench": 0
} | 31 | [{"tag":"v0_scalar","action":"scalar two-pass, shared-mem atomic reduce","kind":"baseline","params":(...TRUNCATED) |
cuda_rmsnorm-a100-80g-M=2048,N=4096-fp16-s16438135 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | fp16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.087822 | {
"step": 17,
"time_ms": 0.021341,
"speedup": 4.115
} | {
"kept": 7,
"reverted": 27,
"errors": 0,
"rebench": 3
} | 34 | [{"tag":"v0_scalar","action":"scalar two-pass, shared-mem atomic reduce","kind":"baseline","params":(...TRUNCATED) |
cuda_rmsnorm-a100-80g-M=2048,N=4096-fp16-s16446054 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | fp16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.08707 | {
"step": 3,
"time_ms": 0.022155,
"speedup": 3.93
} | {
"kept": 4,
"reverted": 20,
"errors": 0,
"rebench": 2
} | 24 | [{"tag":"v0_scalar","action":"scalar two-pass, shared-mem atomic reduce","kind":"baseline","params":(...TRUNCATED) |
cuda_rmsnorm-a100-80g-M=2048,N=4096-bf16-s5558987 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | bf16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.08381 | {
"step": 14,
"time_ms": 0.020939,
"speedup": 4.003
} | {
"kept": 6,
"reverted": 28,
"errors": 0,
"rebench": 3
} | 34 | [{"tag":"v0_scalar","action":"scalar two-pass, shared-mem atomic reduce","kind":"baseline","params":(...TRUNCATED) |
cuda_rmsnorm-a100-80g-M=2048,N=4096-bf16-s5566906 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | bf16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.088531 | {
"step": 14,
"time_ms": 0.020851,
"speedup": 4.246
} | {
"kept": 6,
"reverted": 29,
"errors": 0,
"rebench": 4
} | 35 | [{"tag":"v0_scalar","action":"scalar two-pass, shared-mem atomic reduce","kind":"baseline","params":(...TRUNCATED) |
cuda_rmsnorm-a100-80g-M=2048,N=4096-bf16-s5574825 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | bf16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.087611 | {
"step": 14,
"time_ms": 0.021114,
"speedup": 4.149
} | {
"kept": 6,
"reverted": 26,
"errors": 0,
"rebench": 1
} | 32 | [{"tag":"v0_scalar","action":"scalar two-pass, shared-mem atomic reduce","kind":"baseline","params":(...TRUNCATED) |
cuda_rmsnorm-a100-80g-M=2048,N=4096-bf16-s5582744 | rmsnorm | cuda | RMSNorm over last dim, one row per sample | rmsnorm(x[M,N]:fp16, w[N]:fp16, eps) -> y[M,N]:fp16 | a100-80g | sm_80 | bf16 | {
"M": 2048,
"N": 4096
} | minimize latency_ms | 0.085783 | {
"step": 17,
"time_ms": 0.021389,
"speedup": 4.011
} | {
"kept": 8,
"reverted": 25,
"errors": 0,
"rebench": 0
} | 33 | [{"tag":"v0_scalar","action":"scalar two-pass, shared-mem atomic reduce","kind":"baseline","params":(...TRUNCATED) |
KernelStrain
Long-horizon GPU kernel optimization trajectories for training small models to iterate on CUDA and Triton kernels.
KernelStrain is a large synthetic dataset of kernel-optimization episodes: given a kernel task (shapes, dtype, GPU target, baseline code + timing), a model proposes successive complete kernel candidates, observes simulated benchmark / correctness / compile feedback, and keeps improving over many steps — structural rewrites, parameter sweeps, joint configs, rebenchmarks, and endgame fine-tuning.
Built to teach a small model the loop of kernel work: propose → measure → regress → revert → recover → repeat, for tens of steps per task.
⚠️ All benchmark numbers are produced by an analytic roofline-style simulator — no kernel in this dataset was ever compiled or executed. Timings are plausible, not measured. Kernel source is realistic-looking but unverified; use it for training dynamics, not as production code.
At a glance
| Episodes | 11,514 |
| SFT step rows | ~282k |
| Multiturn conversations | 11,514 |
| Holdout tasks | 185 (descriptions only, no solutions) |
| Op modules | 57 (45 distinct ops × CUDA/Triton impls) |
| Avg steps / episode | ~24.5 |
| Step statuses | ~94% ok, ~2.6% wrong-result, ~3.3% compile-error |
| GPU targets | A100 (sm_80), H100 (sm_90), RTX 4090, MI300X (gfx942) |
Coverage
Kernels spanning AI inference and training:
- Attention: flash prefill, paged decode, MLA decode (latent KV), sliding-window, cross-attention, tree attention (speculative decoding), flash attention backward
- Norms: RMSNorm, LayerNorm, fused add+RMSNorm, LayerNorm backward
- Activations/fusions: SwiGLU fwd/bwd, bias+GELU, dropout (Philox)
- Matmul: fp16 GEMM/GEMV, int4/int8 GEMM, fp8 GEMM, blockwise-scaled fp8 GEMM (DeepGEMM-style), grouped GEMM
- Training: AdamW, Adafactor, grad clipping, cross-entropy fwd/bwd, embedding fwd/bwd, reductions, prefix scan
- Quant: fp8 tensor quant, int8 KV-cache quant
- Sampling: top-k, nucleus (top-p) — sort, histogram-refine, and CDF-pick strategies
- SSM/conv: Mamba selective scan (CUDA + Triton), causal Conv1D
- MoE: scatter, grouped GEMM, combine
- Misc: RoPE, transpose, KV-cache append, embedding gather
Optimization patterns exercised: vectorized loads (uint4/float4/half2), shared-memory staging, cp.async pipelines, TMA, warp shuffles, online softmax, split-K/split-KV with combine kernels, persistent kernels, tensor-core mma/wgmma, atomics, multi-kernel decompositions, occupancy/tile tuning — plus realistic failures: arch-gated compile errors (sm_90-only wgmma, no fp8 on A100, PTX on ROCm), shared-memory overflows, and wrong-result regressions that get reverted.
Files
| file | format | contents |
|---|---|---|
episodes.jsonl |
jsonl | Raw episodes — every step with full source, params, status, timing, smem, keep/revert decisions |
sft_multiturn.jsonl |
chat | Multi-turn conversations; assistant turns contain complete kernel code only (no reasoning traces) |
sft_steps.jsonl |
chat | One row per transition: task + history + current-best → next candidate |
tasks_holdout.jsonl |
jsonl | Held-out task prompts without solutions (~8% of combos) |
stats.json |
json | Generation statistics |
Feedback messages report best-so-far only — no future information leaks into context.
Usage
from datasets import load_dataset
# step-level SFT rows
ds = load_dataset("Akahsizrr/kernelstrain", "sft_steps", split="train")
# full multiturn episodes
mt = load_dataset("Akahsizrr/kernelstrain", "sft_multiturn", split="train")
Generation
Pure-stdlib simulator: time = max(memory_time, compute_time) + launch_overhead, with GPU-specific peaks, tunable efficiency scaling, arch/smem gates, and Gaussian rebench noise. Deterministic from seed. Source: the kernelstrain generator.
Caveats
- Perf numbers are analytic-model-plausible, not measured — the simulator can occasionally rank variants differently than real hardware would.
- Kernel code is unverified; some templates may contain bugs that a real compiler would catch.
- Assistant outputs are intentionally code-only; there are no reasoning/CoT traces by design.
License
MIT
- Downloads last month
- 40