Bringing Clang and C++ to GPUs: An Open-Source, CUDA-Compatible GPU C++ Compiler
summary
Clang now compiles CUDA C++ into a CUDA‑compatible toolchain emitting PTX that the driver turns into SASS, and the talk demonstrates concrete GPU code: a full‑reduction kernel where each warp=32 SIMD lanes thread sums four strided elements with ldg loads, uses shuffle down intrinsics to do horizontal adds, writes per‑block results into shared memory and finishes with atomic adds. Hardware/ISA tradeoffs appear: register use vs occupancy, PTX assembler reconvergence for divergent branches, and LLVM passes (64→32 divide, load‑store widening) give real 2x speedups.
AI-written summary · about
chapters (7)
- 0:00Introduction and thesis
- 1:04GPU hardware model overview
- 10:45Thread hierarchy in GPUs
- 24:02Writing a reduction kernel in CUDA
- 41:19Why CUDA is a low-level language
- 43:04Compiling CUDA with Clang and LLVM
- 50:10Q&A session
related talks
18mCompiling Strassen-like Matrix Multiplication Algorithms to Fast CUDA Kernels
18mGPU Program Support on RISC-V GPU
01h 00m"Designing (New) C++ Hardware”
16mLightning Talk: Triton Compiler
30mGenerating High Performance Code for Irregular Data Structures using Dependent Types
33mImproving the Effectiveness and Generality of GCC Auto-Vectorization
15mGraCE: Unlocking CUDA Graphs with Compiler Support for ML Workloads
24mMapping Sparse Applications to Accelerated Computing Systems
