Writing programs that run directly on graphics processing units (GPUs) is difficult and error-prone. AI models that help write code often produce incorrect or slow results because they lack training examples that show the step-by-step process of fixing and improving code.
The researchers created KernelMosaic, a large dataset of GPU programming tasks with complete solutions and records of each step taken. They used a powerful AI model guided by automation to build these solutions through repeated testing and correction. Then they trained a smaller, open-source AI model further on this dataset.
After this additional training, the model wrote correct code in 88% and 82% of cases on two benchmark sets, up from near zero, and improved on the hardest set as well. It also often produced code that ran faster than existing tools. This shows that training on iterative refinement traces makes AI much more effective at generating efficient GPU code.
