@inproceedings{f3af577064914265ace0b4dd19c595dc,
title = "High-Performance GPU-to-CPU Transpilation and Optimization via High-Level Parallel Constructs",
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 multi-core CPU and achieve a 58% 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×.",
keywords = "barrier synchronization, CUDA, MLIR, polygeist",
author = "Moses, {William S.} and Ivanov, {Ivan R.} and Jens Domke and Toshio Endo and Johannes Doerfert and Oleksandr Zinenko",
note = "Publisher Copyright: {\textcopyright} 2023 Owner/Author.; 28th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming, PPoPP 2023 ; Conference date: 25-02-2023 Through 01-03-2023",
year = "2023",
month = feb,
day = "25",
doi = "10.1145/3572848.3577475",
language = "English (US)",
series = "Proceedings of the ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPOPP",
publisher = "Association for Computing Machinery",
pages = "119--134",
booktitle = "PPoPP 2023 - Proceedings of the 28th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming",
address = "United States",
}