GPU Vendor Overview
Each manufacturer has differing architectures and programming models to support their GPUs. The most popular of these is NVIDIA and the CUDA programming model, which is NVIDIA’s proprietary platform for programming and using their GPUs. AMD has ROCm, which is a software stack for programming on their GPUs. Intel has also been developing oneAPI, which they intend to be useful across different hardware applications.
The main difference between CUDA and the other software stacks is that CUDA is proprietary, unlike the open source ROCm and oneAPI. There is also the OpenCL project, and its more modern successor SYCL (which oneAPI is built on), which aim to provide an API for programming across many devices, including GPUs from different manufacturers and even CPUs. Apple’s GPUs are programmed with their own Metal API.
Julia has a back-end package for each of these vendors - CUDA.jl for NVIDIA, AMDGPU.jl for AMD, oneAPI.jl for Intel and Metal.jl for Apple - and they deliberately share a common interface. On top of these sits KernelAbstractions.jl, which lets you write a single kernel that can be compiled for any of these back-ends (and for the CPU), at the cost of giving up some vendor-specific features.
CUDA remains an important part of this course because many modern HPC clusters provide NVIDIA GPUs and CUDA.jl exposes a mature set of vendor libraries. We also cover AMDGPU.jl for systems running ROCm. The common array-programming examples work with either device-array type, and our custom kernels use KernelAbstractions.jl so that one source implementation targets both back-ends.
Vendor-specific libraries and profiling tools still differ, so code that depends on them should remain in the corresponding CUDA or AMDGPU section.