A comparison of OpenCL, CUDA, and HIP as compilation targets for a functional array(…)
summary
Compares code generated by the Futhark compiler for Futhark across OpenCL, CUDA, and HIP on an NVIDIA A100 and AMD MI100 using 48 benchmarks and finds performance ratios from 0.42x–1.72x between back ends. Root causes are concrete: OpenCL default compiler flags allow reduced floating‑point accuracy, the decoupled lookback scan works well on NVIDIA but fails under OpenCL forcing slower algorithms, OpenCL hides hardware limits like 256 thread blocks and lacks no FP atomics in OpenCL, plus API overhead and register allocation differences also explain gaps.
AI-written summary · about
chapters (24)
- 0:00GPU compilation targets
- 1:03How GPUs work
- 3:32CUDA vs OpenCL vs HIP
- 6:40API comparison challenges
- 8:46F language parallelism
- 11:33GPU backends in F compiler
- 15:24Performance comparison methodology
- 17:08Benchmark results
- 18:32Performance differences
- 19:12Floating point precision
- 21:04Scan algorithms limits
- 22:47Thread blocks shared memory
- 25:55OpenCL block size limits
- 26:37Cache and API queries
- 28:24API overhead small workloads
- 30:12Bounds checking optimizations
- 31:55Register allocation compute
- 33:42Floating point atomics
- 34:24Solutions and improvements
- 36:09Conclusions and recommendation
- 38:10Q&A: Abstraction layer
- 39:18Q&A: Speed of light
- 40:40Q&A: Memory models
- 42:09Q&A: Tensor cores
related talks
01h 00mBringing Clang and C++ to GPUs: An Open-Source, CUDA-Compatible GPU C++ Compiler
05mHeterogeneous System Architecture - Why Should You Care?
18mCompiling Strassen-like Matrix Multiplication Algorithms to Fast CUDA Kernels
30mData-Parallel Flattening by Expansion
19mImprovement and enhancement of LLVM for HPC
24mCorrectness Meets Performance: From Agda to Futhark
41mThe Cloud Native Compiler: JIT-as-a-Service
47mOpen AND High Performance Computing
