arXiv:2604.01489cs.LGcs.AI2026-04被引 7

用大模型自动生成高性能GPU代码,比现有方法快1.71倍

CuTeGen: An LLM-Based Agentic Framework for Generation and Optimization of High-Performance GPU Kernels using CuTe

  • 基于CuTe抽象层,通过生成-测试-优化循环自动调优GPU内核
  • 在209个任务上平均比PyTorch快1.71倍,优于前代基线CudaForge
  • 适合需要高效GPU计算的深度学习开发者和系统研究人员

高性能GPU内核对现代机器学习系统至关重要,但其开发仍依赖人工与专家经验。近期研究尝试使用大语言模型自动化生成内核,但生成结果在标准基准测试中仍不及精心调优的参考实现。本文提出CuTeGen,一个基于大模型的智能体框架,将内核开发视为在CuTe抽象层上的结构化生成-测试-优化流程。两个设计亮点:一是针对CuTe而非原始CUDA,既暴露关键性能结构(如分块、数据移动),又保持迭代优化的稳定性;二是延迟性能分析,在内核高层结构稳定后再提供底层反馈。在KernelBench Level-1和Level-2的209个任务上,CuTeGen相比PyTorch平均加速1.71倍,且在相近生成成本下优于先前的智能体基线CudaForge(0.89×)。代码已开源。

原文摘要 · Abstract (English)

High-performance GPU kernels are critical to modern machine learning systems, yet developing them remains a manual, expert-driven process. Recent work has explored using LLMs to automate kernel generation, but generated kernels still fall short of carefully tuned references on standardized benchmarks. We present CuTeGen, an agentic GPU kernel synthesis framework that treats kernel development as a structured generate-test-refine workflow over the CuTe abstraction layer. Two design choices distinguish CuTeGen from prior work: targeting CuTe rather than raw CUDA, which exposes performance-critical structures such as tiling and data movement while remaining stable enough for iterative refinement, and a delayed profiling schedule that withholds low-level performance feedback until the kernel's high-level structure has stabilized. On the 209 tasks of KernelBench Level-1 and Level-2, CuTeGen achieves an average speedup of 1.71$\times$ over PyTorch and outperforms the prior agentic baseline CudaForge (0.89$\times$) at comparable per-task generation cost. Code available at https://github.com/taratt/cutegen.git

GPU优化大模型自动代码生成CuTe

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。