Code generation simplified by clear computational models for gpu kernels

The Art of Closed-Formula Defaults: Search-Free Code Generation for Tensor Operators

Mathematical Software

Summary

Generating efficient code for GPUs, which are computer chips used in tasks like AI, is tricky because the optimization problems can be complicated. The authors found that clearly defining the rules and structure of the computations makes it easier to generate optimized GPU code without needing expensive searching methods. They built a step-by-step tool that starts with describing math operations and ends with GPU instructions, making the whole process more straightforward and faster.

What this means in practice

  • For gpu software engineers: Generate efficient GPU code for tensor operations without costly search processes, speeding up optimization and deployment in inference workloads.
  • For computer graphics developers: Use clear computational models to produce optimized GPU instructions for graphic computations, improving rendering performance without complex tuning.

Authors

Paolo D'Alberto, Ashish Sirasao

Abstract

Agentic search and automated optimization of GPU kernels are powerful tools for large language model inference. Their effectiveness, however, depends not on the sophistication of the search itself, but on the clarity of the optimization problem being solved. We provide an application-first approach that drives a hierarchical code generation tool from operator specifi cation down to GPU instructions, and show that a clearly defined computational model makes the optimization problem tractable.