SynKer: Synthesize, Kernelize, Reinforce - Teaching GPU Kernel Generation to Small Language Models
Abstract
Combining test-time scaling with verifier execution feedback has demonstrated glimpses of frontier language models being able to generate GPU kernels. However, small language models still lack the capability to robustly produce compilable backend-specific code. We argue that this is largely due to a lack of diverse training environments and accompanying validated kernel datasets, representative of the target domain. In order to overcome this limitation, we introduce SynKer, a general recipe for improving language model kernel generation capabilities via synthetic task and solution generation: By evolving and translating natural-language task descriptions, we generate a large-scale set of diverse target operations. We then leverage evolutionary test-time search to generate an end-to-end validated kernel dataset across target backends. Finally, we use the resulting dataset to post-train 8B, 14B, and 32B open-source models with supervised fine-tuning and reinforcement learning. The resulting set of task environments contains 2365 validated and configurable synthetic tasks and a kernel archive consisting of approximately 100k kernels across three backends. We demonstrate that increased task diversity improves held-out BackendBench transfer performance after post-training. By open-sourcing the resulting tasks, kernel dataset, and checkpoints, we hope to accelerate the development of more capable kernel generation capabilities.