An elastic GPU pool splits between validation and profiling. At each iteration boundary, queue pressure determines the next split.
Better kernels.
Before the
thinking ends.
Turn the waiting inside AI reasoning into useful work. SpecGen generates, validates, and profiles GPU kernels while the model is still thinking.
The bottleneck is the wait.
A kernel optimizer thinks, generates code, then asks the GPU to test it. Most of the time, the testing hardware is waiting. What if useful candidates arrived sooner?
Don’t wait for the final thought.
Follow one idea as it becomes a candidate, a measurement, and a reason to stop early.
Start with a kernel.
A small GPU program. A clear correctness target. The model begins exploring how to make it faster.
Inside real optimization runs.
Four KernelBench tasks, two optimization systems. Explore measured progress, captured reasoning, and the trade-off between time, tokens, and kernel quality.
* FP8The report identifies the 21.94× and 23.02× square-matmul kernels as e4m3 FP8. Its best excluding FP8 is 15.87×. Per-candidate precision is not available for the full trace.
Square matrix multiplication
level1/1_Square_matrix_multiplication_
At this cutoff, the kernel speed ratio is 3.75× and the token cost ratio is 4.41×. More candidates also consume more tokens.
A good idea needs a good system.
SpecController creates the opportunity. ElasticScheduler makes sure it can reach the hardware.
Validation favors the latest arrivals, with longer reasoning prefixes. Profiling serves the oldest validated candidate first.
Shared reasoning prefixes reuse KV state. Spare memory on validation and profiling GPUs can hold remote prefix caches.
Less waiting. More discovery.
System efficiency and kernel quality are different outcomes. SpecGen improves both.
Faster optimization
End-to-end speedup over three baseline systems
More profiling feedback
Relative increase in usable profiling feedback
GPU resource busy time
Validation / profiling resource utilization
Better final kernels
Relative improvement over baseline kernel performance
H200 experiments with GLM-5.1 and DeepSeek-V4-Pro. Ranges span the paper’s baseline comparisons; see §8 for workloads, budgets, and aggregation.
Give the GPU something to do.
Validation / profiling resource busy time · Table 4
The whole idea, in one minute.
English narration, with English and Chinese captions.
Go deeper.
Accepted at PPoPP 2027
SpecGen: Accelerating Agentic Kernel Optimization with Speculative Generation
BibTeX
@article{guo2026specgen,
title={SpecGen: Accelerating Agentic Kernel Optimization with Speculative Generation},
author={Guo, Jihu and Lu, Sitian and Ma, Tenghui and Gao, Wei and Ye, Zhisheng and Zhang, Xingcheng and Lin, Dahua},
journal={arXiv preprint arXiv:2606.17518},
year={2026},
note={Accepted at PPoPP 2027}
}