Part I · How it works
5. How a GPU works
- 5.1What a GPU does differentlyA CPU has a few powerful cores, built to run one thread fast, branches and all. A GPU has thousands of simple ones, built to run the same instructions on huge amounts of data at once.
- 5.2GPU drivers: the kernel, Mesa and NVIDIAA GPU driver has two halves: a kernel driver (DRM) that owns the device and its memory, and a user-space library that turns OpenGL or Vulkan calls into GPU commands.
- 5.3How a picture reaches the screen: KMS, Wayland and X11The kernel sets up the screen itself (KMS: kernel mode setting): resolution, refresh rate, which output shows which image.
- 5.4Computing on the GPU, and when your program can't see itCompute frameworks talk to the GPU through a vendor stack: CUDA for NVIDIA, ROCm (HIP) for AMD, oneAPI for Intel. Vulkan and OpenCL work across vendors.