Central processing unit (CPU)
The central processing unit (CPU) is a computer's general-purpose processor, which fetches and carries out program instructions; in AI systems it coordinates the work while GPUs and other accelerators do most of the heavy maths.
The CPU runs a program by repeating one cycle. It fetches the next instruction from memory, decodes it into signals that set up its circuits, and executes it, using an arithmetic logic unit for calculations and registers to hold the numbers it is working on. Small, fast caches keep copies of recently used data close by, because fetching from main memory is slow. Modern CPUs contain several cores, each a processor in its own right, all paced by a clock.
The term central processing unit was in use by 1955. The design behind almost all CPUs, with instructions and data held in the same memory, goes back to John von Neumann's 1945 report on the EDVAC computer. Intel's 4004 of 1971 was the first commercially available microprocessor, a CPU on a single chip.
CPUs are built for flexibility: complex programs full of branches and decisions, run on a handful of powerful cores. Neural networks need the opposite, huge numbers of simple multiplications done at once. A 2020 report from Georgetown's Center for Security and Emerging Technology found AI chips tens or even thousands of times faster and more efficient than CPUs for training and running models, and concluded that CPUs were becoming less useful for advanced AI.
That does not make the CPU obsolete in AI. Every AI server still has CPUs that run the operating system, load and prepare data, and hand work to the accelerators, and Nvidia lists CPUs among the core parts of its AI data centre designs. Google's TPU documentation recommends CPUs for quick prototyping that needs maximum flexibility. In laptops, Intel's definition of an AI PC is a CPU, a GPU and a neural processing unit working together.
A CPU has a few powerful cores built to run varied, branching programs quickly one step at a time. A GPU has a very large number of simpler cores built to do the same calculation on lots of data at once. That parallelism is why GPUs, not CPUs, do most AI training and inference. Yes. Any AI model can run on a CPU, and small models run acceptably. Large models are much slower and use far more energy per calculation on a CPU than on an AI accelerator, which is why data centres rely on GPUs and similar chips. It runs the operating system and the software that manages the job: loading data, preparing it, scheduling work and passing it to the GPUs or other accelerators, which do the bulk of the arithmetic. A core is a complete processing unit within a CPU chip, able to run its own stream of instructions. Multi-core CPUs can run several programs or parts of a program at the same time, though still far fewer at once than a GPU.Common questions
What is the difference between a CPU and a GPU?
Can AI run on a CPU?
What does the CPU do in an AI server?
What is a CPU core?
Search for "CPU vs GPU for machine learning", "instruction cycle" or "CPU cache hierarchy" for the basics. Computer architecture textbooks and encyclopedia articles that cite them explain how CPUs work; chipmakers' documentation covers specific products. Be careful with benchmark claims that a CPU runs AI well, and check which model size and settings were tested.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.