Multi-GPU Code Generation for Out-of-Core Problems
摘要
We propose a light-weight solution for generating code that can use multiple GPUs from purely declarative program specifications. Building on code generation for a single GPU, we show how CUDA’s unified memory can be leveraged to use multiple GPUs to collaboratively compute data-parallel tasks, and to handle computations on data that does not fit any of the GPU’s memories. We describe the key ideas and implement them in SaC. We provide initial performance evaluations on two different GPU architectures for three different benchmarks: matrix multiplication, N-body simulation, and stencil computations. If allocation costs can be amortized, these experiments show parallel efficiencies between \(80\%\) and \(100\%\) on up to four GPUs when using an explicitly memory-orchestrated CUDA version as baseline.