A CPU controls the overall task and handles sequential or decision-heavy operations, while a GPU performs repetitive calculations that can run in parallel. Together, they transfer data, dispatch instructions, synchronize execution, and combine results.
This is heterogeneous computing: processors with different architectures handle the work for which they are best suited.
| Stage | CPU and GPU roles |
|---|---|
| Divide the task | The CPU runs the program and identifies work suitable for parallel processing. |
| Transfer data | The CPU places inputs in GPU-accessible memory. A discrete GPU may receive data from RAM across a system bus. |
| Dispatch work | The CPU launches a GPU kernel, a function applied to many data elements. |
| Execute in parallel | The GPU's many smaller processing units perform similar operations simultaneously, such as processing pixels or applying one calculation to an array. |
| Synchronize | The CPU waits only when it needs the output, then continues with the result. |
The CPU is effective at control flow, branching, and low-latency sequential processing because its powerful cores use sophisticated caches and control systems. The GPU provides high throughput by processing many independent data elements concurrently.
However, GPU use does not automatically make every task faster. Data-transfer time, synchronization, and work that cannot be parallelized can create a bottleneck. A small or highly sequential task may run faster entirely on the CPU.
A common misconception is that the GPU replaces the CPU during intensive processing. In fact, the CPU normally coordinates execution, while the GPU acts as a specialized parallel processor.
For an IB A1.1 explain question, state each processor's role and present the causal sequence: the CPU divides and dispatches work, data is transferred, the GPU processes it in parallel, and the processors synchronize. Add a limitation, such as transfer overhead or limited parallelism, for a complete HL response.