DCAIOct 19, 2025

Tutoring LLM into a Better CUDA Optimizer

arXiv:2510.16933v1h-index: 10Euro-Par
Originality Incremental advance
AI Analysis

This work addresses the problem of automating CUDA code optimization for developers, but it is incremental as it builds on existing LLM capabilities with tutoring.

The paper investigated whether large language models (LLMs) can generate optimized CUDA code for predefined tasks and found that while LLMs are skilled coders, they require tutoring with detailed hints to achieve expert-level optimizations.

Recent leaps in large language models (LLMs) caused a revolution in programming tools (like GitHub Copilot) that can help with code generation, debugging, and even performance optimization. In this paper, we focus on the capabilities of the most recent reasoning models to generate optimized CUDA code for predefined, well-known tasks. Our objective is to determine which types of code optimizations and parallel patterns the LLMs can perform by themselves and whether they can be improved by tutoring (providing more detailed hints and guidelines in the prompt). The generated solutions were evaluated both automatically (for correctness and speedup) and manually (code reviews) to provide a more detailed perspective. We also tried an interactive approach where the LLM can fix its previous mistakes within a session. The results indicate that LLMs are quite skilled coders; however, they require tutoring to reach optimized solutions provided by parallel computing experts.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes