Graphics processing units (GPUs) were designed to draw images, but they have become the engine of modern artificial intelligence. Understanding why helps engineers build faster systems and helps organisations plan their infrastructure.
CPU and GPU: different strengths
A CPU has a small number of powerful cores, built to run varied tasks one after another very quickly. A GPU has thousands of simpler cores that run the same operation on many pieces of data at once. Training a neural network is mostly large matrix calculations, which suit the GPU's parallel design.
Programming for parallelism
Frameworks such as PyTorch hide much of the detail, but engineers who understand memory, threads and kernels, for example through CUDA, can make the same hardware run many times faster.
Planning the infrastructure
- Match the hardware to the workload: training, fine-tuning and inference have different needs
- Consider cloud GPUs for bursts of demand and on-premises clusters for steady use
- Plan for power, cooling and networking, which often limit a GPU cluster more than the chips themselves
Measure, then optimise
Profile workloads before buying more hardware. Data loading, memory transfers and poorly batched jobs often waste more capacity than they use.