Introduction to GPU Programming
As mentioned in the hardware overview section, this chapter will be a deeper dive on using GPUs for computational workloads. While GPUs were originally developed for accelerating rendering workloads, their massively parallel architecture lends itself to accelerating scientific workloads.
We introduce both CUDA.jl for NVIDIA GPUs and AMDGPU.jl for AMD GPUs. The array-programming examples select the available device back-end, while custom kernels use KernelAbstractions.jl so that the same kernel source compiles on either platform.