High-Performance GPU-to-CPU Transpilation and Optimization via High-Level Parallel Constructs
William S. Moses, Ivan R. Ivanov, Jens Domke, Toshio Endo, Johannes Doerfert, Oleksandr Zinenko
Abstract
While parallelism remains the main source of performance, architectural implementations and programming models change with each new hardware generation, often leading to costly application re-engineering. Most tools for performance portability require manual and costly application porting to yet another programming model.
We propose an alternative approach that automatically translates programs written in one programming model (CUDA), into another (CPU threads) based on Polygeist/MLIR. Our approach includes a representation of parallel constructs that allows conventional compiler transformations to apply transparently and without modification and enables parallelism-specific optimizations. We evaluate our framework by transpiling and optimizing the CUDA Rodinia benchmark suite for a multicore CPU and achieve a 76% geomean speedup over handwritten OpenMP code. Further, we show how CUDA kernels from PyTorch can efficiently run and scale on the CPU-only Supercomputer Fugaku without user intervention. Our PyTorch compatibility layer making use of transpiled CUDA PyTorch kernels outperforms the PyTorch CPU native backend by 2.7×.
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 da06b9df-4cc3-46c7-b592-3e47c5b22ebeCited by top-tier papers5
- Unleashing CPU Potential for Executing GPU Programs Through Compiler/Runtime OptimizationsRuobing Han, Jisheng Zhao, Hyesoon KimMICRO 2024 · 4 citations
- Directed Testing in MLIR: Unleashing Its Potential by Overcoming the Limitations of Random FuzzingWeiyuan Tong, Zixu Wang, Zhanyong Tang, Jianbin Fang et al.FSE 2025 · 1 citation
- Interleaved Learning and Exploration: A Self-Adaptive Fuzz Testing Framework for MLIRZeyu Sun, Jingjing Liang, Weiyi Wang, Chenyao Suo et al.ASE 2025 · 1 citation
- Strided Difference Bound MatricesArjun Pitchanathan, Albert Cohen, Oleksandr Zinenko, Tobias GrosserCAV 2024
- Scaling GPU-to-CPU Migration for Efficient Distributed Execution on CPU ClustersRuobing Han, Hyesoon KimPPoPP 2026
Builds on3
- Co-design for A64FX manycore processor and "Fugaku"Mitsuhisa Sato, Yutaka Ishikawa, Hirofumi Tomita, Yuetsu Kodama et al.SC 2020 · 112 citations
- Reverse-mode automatic differentiation and optimization of GPU kernels via enzymeWilliam S. Moses, Valentin Churavy, Ludger Paehler, Jan Hückelheim et al.SC 2021 · 50 citations
- Specifying and testing GPU workgroup progress modelsTyler Sorensen, Lucas F. Salvador, Harmit Raval, Hugues Evrard et al.OOPSLA 2021 · 11 citations
Related papers
- GraCE: Unlocking CUDA Graphs with Compiler Support for ML WorkloadsAbhishek Ghosh, Ajay Nayak, Ashish Panwar, Arkaprava BasuOSDI 2026
- Dynamically Fusing Python HPC KernelsNader Al Awar, Muhammad Hannan Naeem, James Almgren-Bell, George Biros et al.ISSTA 2025
- PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph CompilationJason Ansel, Edward Z. Yang, Horace He, Natalia Gimelshein et al.ASPLOS 2024 · 693 citations
- BabelTower: Learning to Auto-parallelized Program TranslationYuanbo Wen, Qi Guo, Qiang Fu, Xiaqing Li et al.ICML 2022 · 27 citations
- PerfDojo: Automated ML Library Generation for Heterogeneous ArchitecturesAndrei Ivanov, Siyuan Shen, Gioele Gottardo, Marcin Chrapek et al.SC 2025 · 2 citations
