Datasets:
advisory_flags listlengths 0 3 | candidate_sha256 stringlengths 64 64 | dataset_group_id stringlengths 64 64 | ending stringclasses 4
values | family_id stringlengths 64 64 | final_files unknown | fresh_recheck_required bool 2
classes | messages listlengths 7 207 | policy stringclasses 1
value | provenance dict | qualification dict | review_flags listlengths 0 0 | schema_version int64 2 2 | semantic_review stringclasses 1
value | split stringclasses 1
value | summary_required bool 1
class | task_id stringlengths 33 42 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[] | 052edec27535f91bcd40d7f54c273e43df0fbbf7afb950071f9f6573bd4de2da | 22124b4d4854f6fc4ed4eb3ff0c886ebb73df2a416475501613dd62fca04c6f7 | original_assistant_finish | 9963280167852e199517d73d434ec891a6ded826c6d34d816d13342aa2fad175 | {"candidate.cu":"#include <iostream>\n#include <cuda_runtime.h>\n\n// Define the number of non-zero (...TRUNCATED) | false | [{"content":"Translate the following complete HIP program to complete CUDA C++. Preserve the program(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":true,"observation_repairs":[],"validation":{"kind":"(...TRUNCATED) | {"acceleration_evidence":null,"correctness":"pass","evaluation_sha256":"c16ca50c63c0039e1ec3afc67954(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_cf399c76316d0ca2842518d1 |
[] | 97b7b07ef798953348b7c421eb31697ab87e21c26e7273886a793b402ae0202d | 807d8bc91c584324cbe4fcfc7e73746a23c53ce44eb1b1afe3c69ea22f1e243d | original_assistant_finish | 0f83a1b2b48bd87571c8766f3809201024a6134ea2f5fa7d8a96329a765b8e25 | {"candidate.py":"import os\n\nimport torch\nfrom torch import nn\nfrom torch.utils.cpp_extension imp(...TRUNCATED) | false | [{"content":"Implement an optimized CUDA replacement for the reference PyTorch program. Preserve its(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":true,"observation_repairs":[],"validation":{"kind":"(...TRUNCATED) | {"acceleration_evidence":null,"correctness":"pass","evaluation_sha256":"e3cab25cc326b6c71925624120d9(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_3b6d5b45f08a7652039776e1 |
[] | dd797793a7f71bbae7595589feada69adf1ccd4ae947d1d35685e12fbbadadd0 | 93a96acbe165de6ee82f10392a94aafea4e78e6c9c3e0a1165031b55a64e72a7 | original_archived_ending | fbd5e55e1765b253984ff381ec80d64a2f83afe71a6cfb248bc3815c8264097f | {"candidate.py":"import torch\nimport torch.nn as nn\nfrom torch.utils.cpp_extension import load_inl(...TRUNCATED) | false | [{"content":"Implement an optimized CUDA replacement for the reference PyTorch program. Preserve its(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":false,"observation_repairs":[],"validation":{"kind":(...TRUNCATED) | {"acceleration_evidence":null,"correctness":"pass","evaluation_sha256":"a3e8d28b0eeaf7013e2240a51f57(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_a9fac4e4b97c37e573d9fc5d |
[] | e7502eb6b5e5baf41d0890146351e84aa7620a830dff8592c1b009f9a064064c | dd6328b38f7a7e4e6c79596cc0f623205728af2f3108ad754f0d95d1279fa355 | original_assistant_finish | 6b6f22b979ceb59c6f5e455d17eb19c52f98a1ffa509b2239f928c1d3e490c26 | {"candidate.cu":"#include <iostream>\n#include <cuda_runtime.h>\n\n// Kernel to perform 128D stencil(...TRUNCATED) | false | [{"content":"Translate the following complete HIP program to complete CUDA C++. Preserve the program(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":true,"observation_repairs":[],"validation":{"kind":"(...TRUNCATED) | {"acceleration_evidence":null,"correctness":"pass","evaluation_sha256":"2ad6d8bf87824440a80fdd4be72b(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_49fd8e75cb0fecde22d05ca2 |
["named_candidate_environment_configuration","normal_build_or_runtime_configuration","possible_evalu(...TRUNCATED) | 2d72cf56d35b531c11629c9c6f4e642ede2f338a58f93401918badb61886af2e | fead42896c00f4212d03f34a12ba1a7bd3eb31877b5cc4dade62b846f2d6ca4b | validated_tool_observation | 8cec7a21713931cbd3b64d1a505f3cfc45c3d8c943477771913e6d281223ddf6 | {"candidate.py":"\"\"\"Optimized CUDA replacement for the reference ``Model``.\n\nThe reference prog(...TRUNCATED) | true | [{"content":"Implement an optimized CUDA replacement for the reference PyTorch program. Preserve its(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":false,"observation_repairs":[{"message_id":"msg_0bcc(...TRUNCATED) | {"acceleration_evidence":{"kind":"stable_paired_timing","original_timing_trusted":true,"original_tru(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_0e052d02b0a4e947c6b62977 |
[] | 0d1d3c11418011e42046d0a4521dcd995151d8849895db1705f4a810c0cf907e | 47c972ea8bd4c531fc55bd95a5eb19fd015de8f1418c28ec0d8717af7897b0a8 | original_archived_ending | 00240c5c225fec2d9309f50c7a5f08726b9c30b7a4fae2217f79aaf8d2122570 | {"candidate.py":"import os\n\nimport torch\nimport torch.nn as nn\n\nos.environ.setdefault(\"TORCH_C(...TRUNCATED) | false | [{"content":"Implement an optimized CUDA replacement for the reference PyTorch program. Preserve its(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":false,"observation_repairs":[{"message_id":"msg_0bb6(...TRUNCATED) | {"acceleration_evidence":null,"correctness":"pass","evaluation_sha256":"a478445b177c5cb04d305ee97f22(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_a18e34c2f9cbd83aab6a0990 |
[] | 6f67433008bcc5f86b4de6689867fb802f57ee3b30a25ccdf3e53415760e4e69 | f518e809b7d2fcc90c38bfa9d82ceacd779a0899302acd0b421e56e1c3ff9c85 | original_archived_ending | c9e47affa77e1aa983592e359d45ce1600d71d5043355f1be5f74169d753f7d3 | {"candidate.py":"import os\n\nimport torch\nfrom torch.utils.cpp_extension import load_inline\n\nos.(...TRUNCATED) | false | [{"content":"Implement an optimized CUDA replacement for the reference PyTorch program. Preserve its(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":false,"observation_repairs":[],"validation":{"kind":(...TRUNCATED) | {"acceleration_evidence":null,"correctness":"pass","evaluation_sha256":"19344bb0f418d419eb9cadd1b99e(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_137af66158881361b6b1c5e2 |
[] | 38e9eb7a3fabedd67ab386631180b6f4c4f4859e65bbc455f58e32359042866e | 40f5db393bbfdc02f9028dbb0d7298fb3edad0ef8e9b07baaaf5cb134de244aa | original_assistant_finish | b9871afe09ba50f6dbea223d038a4e53030a400d5d6e5cff357db60051b68f39 | {"candidate.py":"# Optimized CUDA implementation of the reference program:\n#\n# for i in range(3)(...TRUNCATED) | false | [{"content":"Implement an optimized CUDA implementation of the reference computation.\n\nExpose clas(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":true,"observation_repairs":[],"validation":{"kind":"(...TRUNCATED) | {"acceleration_evidence":null,"correctness":"pass","evaluation_sha256":"8a42daa5dc7be679ffa6735d090c(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_59f20b0ec7e0990f3de45ee8 |
[] | f84f97c9699f97b97ce6e28ab1f803e6ba55db1f0bf6f9cf3b875647a7a35c2d | 231c7d93b08e2dac9c6ed2a47308c78b698a9ff2819a19fe78349a26b1600760 | original_archived_ending | 64619e68f855fb5c8a5f45d3ef73b06b474a808d2035a049b40541496661c372 | {"candidate.py":"\"\"\"Optimized CUDA replacement for the reference LinearEstimator program.\n\nRefe(...TRUNCATED) | false | [{"content":"Implement an optimized CUDA replacement for the reference PyTorch program. Preserve its(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":false,"observation_repairs":[],"validation":{"kind":(...TRUNCATED) | {"acceleration_evidence":null,"correctness":"pass","evaluation_sha256":"15f0e1928e2b4f09594b6d6fbb4e(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_fb0886c297d91109cc8e9c54 |
[] | 65998c8b30e6d4dad03f189fbf7419d63d2094789332c3676bb7f2dd01dea9da | 211dac75dc381662df453b58430ff82456211e8b828f92e517915dbad535d2d0 | validated_tool_observation | 3c4a1e1e108de44806f191785ba3e75d4a3437339b40779c50a2ac4dc4eb1d30 | {"candidate.py":"import torch\nimport torch.nn as nn\nfrom torch.utils.cpp_extension import load_inl(...TRUNCATED) | false | [{"content":"Implement an optimized CUDA replacement for the reference PyTorch program. Preserve its(...TRUNCATED) | accepted-test-suite-pass-uniform-agentic-sft-v2 | {"source_status":"passed","original_completion":false,"observation_repairs":[{"message_id":"msg_0bb6(...TRUNCATED) | {"acceleration_evidence":{"kind":"stable_paired_timing","original_timing_trusted":true,"original_tru(...TRUNCATED) | [] | 2 | accepted_recorded_test_suite_pass | train | false | cuda_prompt_6354bdfd55138cd0c318915e |
KernelMosaic
KernelMosaic pairs CUDA kernel implementation tasks with selected solutions and the agent trajectories that produced them. A trajectory can include source edits, compilation, correctness checks, profiling and revisions. The task specifications cover natural language, PyTorch reference programs, CUDA code, mathematical specifications and combinations of these formats. Paper
Dataset
| Split | Task–trajectory pairs |
|---|---|
| Train | 13,815 |
| Validation | 751 |
| Total | 14,566 |
Each row represents one task and one trajectory. The train and validation splits are disjoint by task ID, task family and dataset group. The dataset draws on 41 sources. Source attribution
Record fields
| Field | Contents |
|---|---|
task_id, family_id, dataset_group_id, split |
Stable IDs and split membership |
messages |
Ordered messages with role, content, reasoning, tool calls, tool call IDs and loss weights |
final_files, candidate_sha256 |
Selected source files keyed by filename and a canonical hash of that file map |
qualification |
Historical correctness verdict and, where recorded, speedup and PyTorch-reference metadata |
provenance, ending, fresh_recheck_required |
Original outcome and trajectory ending, with a per-row flag for a fresh evaluation |
See the schema for the remaining fields. Join
attribution.jsonl.gz on task_id for source identifiers,
revision information, license labels and credit.
Loading the data
The shards are gzip-compressed JSON Lines. Reading them as JSON preserves nested
tool data and the variable filenames in final_files.
import gzip
import json
from huggingface_hub import HfApi, hf_hub_download
repo_id = "Miaow-Lab/KernelMosaic"
# Pin the current Hub revision so enumeration and downloads use the same snapshot.
api = HfApi()
revision = api.dataset_info(repo_id).sha
def iter_split(split):
if split not in {"train", "validation"}:
raise ValueError(f"Unknown split: {split}")
prefix = f"data/{split}-"
filenames = api.list_repo_files(repo_id, repo_type="dataset", revision=revision)
for filename in sorted(filenames):
if filename.startswith(prefix) and filename.endswith(".jsonl.gz"):
path = hf_hub_download(repo_id, filename, repo_type="dataset", revision=revision)
with gzip.open(path, "rt", encoding="utf-8") as shard:
for line in shard:
yield json.loads(line)
example = next(iter_split("train"))
print(example["task_id"], len(example["messages"]))
For supervised fine-tuning, use loss_weight to supervise assistant messages
while keeping user messages and tool observations as context. Keep assistant
tool calls paired with their responses when splitting a long trajectory into
training windows. The paper describes the decision-window construction used
in the reported 32K-context training run.
Curation and verification
The collection pipeline selected and adapted tasks from the listed sources and generated trajectories using Qwen3.8-Flash. Selected implementations passed the historical checks attached to their tasks. The tests have different coverage across task families. The time measurements are hardware- and environment-specific. A speedup was recorded for 8,598 rows.
This snapshot redacts internal paths and identifiers. Paths in tool traces are
historical placeholders that require mapping for replay. In 62 rows, redaction
changed string constants in the final source files. Those rows have recomputed
candidate hashes and fresh_recheck_required set to true. Their original
correctness and performance records describe the pre-redaction candidate.
KernelBench overlap
The exact-reference audit compared the 250 KernelBench v0.1 L1–L3 tasks against 9,985 dataset rows with parseable Python reference programs. It found zero identical whole-program references after removing comments, docstrings and formatting. The audit also identified shared computational templates with different workloads, including L1 #48 (mean reduction), L2 #2 (transposed convolution fusion) and L3 #17 (SqueezeNet Fire). These findings describe the programs and task pairs reviewed. KernelBench revision
Attribution and terms
Consult ATTRIBUTION.md for source-specific terms, credits and remaining provenance questions. The per-task attribution index provides the applicable source for each row. The licenses directory contains the collected upstream license and notice texts.
Citation
@article{xi2026kernelmosaic,
title = {KernelMosaic: An Open Dataset and Agentic Framework for CUDA Kernel Generation},
author = {Xi, Ningyuan and Lai, Yuhang and Miao, Ning},
journal = {arXiv preprint arXiv:2611.14604},
year = {2026},
url = {https://arxiv.org/abs/2611.14604}
}
- Downloads last month
- -