CPU vs GPU vs NPU: Key Differences Explained
A CPU is a general-purpose processor that can run anything, using a small number of complex cores to finish a single task quickly. A GPU processes large amounts of data in parallel with many compute units and is used for a wide range of parallel computing, including graphics and AI training. An NPU is dedicated circuitry specialized for the matrix multiply-accumulate operations that make up most of the computation in neural networks; by arraying many low-precision units such as INT8 and reusing data in on-chip memory, it performs inference with very high power efficiency. In return, it handles poorly any operations it does not support.
| Aspect | CPU | GPU | NPU |
|---|---|---|---|
| Design philosophy | General-purpose, low latency. Finish a single task as fast as possible | High throughput. Handle large amounts of parallel computation together | Specialized for neural network operations (mainly inference), maximizing performance per watt |
| Compute unit organization | A few to a few hundred complex cores, each with SIMD units | Thousands of simple compute units; many also have matrix units | A large array of multiply-accumulate units (such as a systolic array), plus vector units for activation functions and the like |
| Control | Branch prediction and speculative (out-of-order) execution per instruction | Switches among many threads to hide memory latency | Most follow a data flow determined in advance by the compiler, with little per-instruction control |
| Strengths | Branch-heavy code, operating systems, application logic | Graphics, AI training and inference, scientific computing | AI inference centered on convolutions and matrix multiplication |
| Memory | Large caches and main memory such as DDR | High-bandwidth memory such as GDDR and HBM | Reuses weights and intermediate data in on-chip SRAM buffers. When built into an SoC, shares main memory with the CPU |
| Main data types | Almost anything, centered on FP64, FP32 and integers | Mainly FP32, FP16 and BF16. Also FP8 and others for training | Mainly low precision such as INT8, INT4 and FP16 |
| Performance metrics | Clock frequency, core count, IPC | FLOPS (TFLOPS, etc.) | TOPS (usually a theoretical peak counted in INT8) |
| Power efficiency for AI inference | Low | High | Highest. Can be an order of magnitude or more higher than a CPU |
| Flexibility | Highest. Runs any program | High. Broadly usable for parallelizable workloads | Low. Unsupported operations fall back to the CPU or GPU |
| Programming | General-purpose programming languages and compilers | Kernels written in a GPU parallel programming model | Trained models are converted and run by AI compilers and inference runtimes. Rarely programmed directly |
| Where it is found | Every kind of computer | Discrete cards, or built into SoCs | Often built into smartphone and PC SoCs. Dedicated chips for data centers also exist |
Figures are typical orders of magnitude and vary by process generation and product.