Modeling and analyzing evaluation cost of CUDA kernels
Stefan K. Muller, Jan Hoffmann
Abstract
General-purpose programming on GPUs (GPGPU) is becoming increasingly in vogue as applications such as machine learning and scientific computing demand high throughput in vector-parallel applications. NVIDIA's CUDA toolkit seeks to make GPGPU programming accessible by allowing programmers to write GPU functions, called kernels, in a small extension of C/C++. However, due to CUDA's complex execution model, the performance characteristics of CUDA kernels are difficult to predict, especially for novice programmers. This paper introduces a novel quantitative program logic for CUDA kernels, which allows programmers to reason about both functional correctness and resource usage of CUDA kernels, paying particular attention to a set of common but CUDA-specific performance bottlenecks. The logic is proved sound with respect to a novel operational cost semantics for CUDA kernels. The semantics, logic and soundness proofs are formalized in Coq. An inference algorithm based on LP solving automatically synthesizes symbolic resource bounds by generating derivations in the logic. This algorithm is the basis of RaCuda, an end-to-end resource-analysis tool for kernels, which has been implemented using an existing resource-analysis tool for imperative programs. An experimental evaluation on a suite of CUDA benchmarks shows that the analysis is effective in aiding the detection of performance bugs in CUDA kernels.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext de896325-1c2a-4d7d-a822-eb638ecdb53bCited by top-tier papers6
- Checking Data-Race Freedom of GPU Kernels, CompositionallyTiago Cogumbreiro, Julien Lange, Dennis Liew Zhen Rong, Hannah ZicarelliCAV 2021 · 17 citations
- Sound and Partially-Complete Static Analysis of Data-Races in GPU ProgramsDennis Liew, Tiago Cogumbreiro, Julien LangeOOPSLA 2024 · 10 citations
- TrackFM: Far-out Compiler Support for a Far Memory WorldBrian R. Tauro, Brian Suchy, Simone Campanoni, Peter A. Dinda et al.ASPLOS 2024 · 6 citations
- A Modular Static Cost Analysis for GPU Warp-Level ParallelismGregory Blike, Hannah Zicarelli, Udaya Sathiyamoorthy, Julien Lange et al.POPL 2026 · 1 citation
- Modular GPU Programming with Typed PerspectivesManya Bansal, Daniel Sainati, Joseph W. Cutler, Saman P. Amarasinghe et al.PLDI 2026
Builds on1
Related papers
- Kuiper: Correct and Efficient GPU Programming with Dependent Types and Separation LogicGuido Martínez, Bastian Köpcke, Jonás Fiala, Gabriel Ebner et al.PLDI 2026 · 2 citations
- iGUARD: In-GPU Advanced Race DetectionAditya K. Kamath, Arkaprava BasuSOSP 2021 · 11 citations
- Descend: A Safe GPU Systems Programming LanguageBastian Köpcke, Sergei Gorlatch, Michel SteuwerPLDI 2024 · 7 citations
- SuperCollider: Scalable and Effective Data Race Detection for CUDAMark Stephenson, Sana Damani, Mohamed Tarek Ibn Ziad, Anis Ladram et al.PLDI 2026
- Understanding Performance Problems in CUDA ProgramsYuyang Bi, Junming Cao, You Lu, Bihuan Chen et al.FSE 2026
