GPUs and Parallel Work: Why Thousands of Small Tasks Matter
📑 On this page
- CPU and GPU design goals
- Why graphics is parallel
- Shaders are GPU programs
- GPU cores are not directly comparable to CPU cores
- GPU memory
- A concrete example: coloring pixels
- From graphics to scientific computing
- Why GPUs help machine learning
- Latency versus throughput
- Cooling, power, and sustained performance
- Common misunderstandings
- "A GPU is simply a CPU with more cores"
- "Every calculation is faster on a GPU"
- "More VRAM always makes the GPU faster"
- "AI runs only on GPUs"
- Knowledge check
- The one idea to remember
A modern image contains millions of pixels, and a three-dimensional scene may contain millions of vertices and triangles. Producing dozens or hundreds of frames each second requires an enormous amount of repeated mathematics.
Graphics processors were designed around that opportunity.
A GPU contains many processing units optimized to apply similar operations across large collections of data in parallel.
This makes it powerful for graphics and for non-graphics workloads with the same computational shape.
CPU and GPU design goals
A CPU is built for flexible, low-latency execution:
- Complicated control flow
- Operating-system work
- Sequential dependencies
- Varied instructions
- Fast response for a small number of threads
A GPU dedicates more of its hardware to throughput:
- Many arithmetic units
- Large numbers of lightweight threads
- Wide parallel operations
- High memory bandwidth
The comparison is not "smart processor versus simple processor." Each is optimized for a different workload structure.
Imagine moving a library:
- A few expert librarians can solve unusual problems and coordinate the move.
- Hundreds of workers can carry similarly sized boxes simultaneously.
The CPU resembles the coordinators; the GPU resembles the large parallel workforce.
Why graphics is parallel
Many graphics calculations can happen independently.
For a scene, the GPU may:
- Transform vertices into screen positions.
- Determine which triangles cover which pixels.
- Calculate material and lighting values.
- Sample textures.
- Blend final colors into an image.
The calculation for one vertex or pixel often resembles calculations for thousands of others. That repeated structure maps well to groups of GPU threads.
Modern rendering also includes shadowing, ray tracing, post-processing, upscaling, and many other stages, but parallel numerical work remains central.
Shaders are GPU programs
A shader is a program executed across graphics data.
Common shader stages include:
- Vertex shaders that transform geometry
- Fragment or pixel shaders that calculate surface output
- Compute shaders for general parallel operations
A shader may be invoked millions of times with different inputs. The GPU schedules invocations in groups.
Threads within a group often execute the same instruction together on different data. If threads take very different branches, some hardware sits idle while each path is processed. This is called divergence.
GPUs therefore perform best when threads follow similar control flow and access memory coherently.
GPU cores are not directly comparable to CPU cores
Marketing may describe thousands of GPU "cores." These are much smaller and differently organized than general-purpose CPU cores.
One CPU core can independently handle complex instruction flow, large caches, branch prediction, and operating-system threads. A GPU arithmetic unit participates in a wider parallel execution structure.
Comparing core counts across CPU and GPU architectures is meaningless.
Even comparing two GPU families by core count alone can mislead because architecture, frequency, memory, instruction capability, and utilization differ.
Use workload-specific benchmarks.
GPU memory
Discrete graphics cards commonly have dedicated video memory, or VRAM.
VRAM holds:
- Frame buffers
- Textures
- Geometry
- Shader data
- Intermediate render targets
- Compute tensors or arrays
Graphics workloads need high bandwidth because many parallel units consume data simultaneously.
If a game exceeds available VRAM, it may move data over PCIe between system memory and GPU memory. That link is far slower than local VRAM, causing stutter or reduced performance.
Integrated GPUs usually share system RAM with the CPU. This reduces cost and power but also shares capacity and bandwidth.
A concrete example: coloring pixels
Suppose a 4K frame has:
3840 × 2160 = 8,294,400 pixelsAt 60 frames per second, the display receives nearly 498 million pixel positions each second. Real rendering may calculate each location several times through multiple passes.
Many pixels can be processed independently using similar shader instructions. A GPU distributes that work across its parallel units.
A CPU could produce graphics, and early systems often relied more heavily on it. But dedicating wide parallel hardware lets the CPU focus on game logic, input, physics coordination, audio, networking, and operating-system tasks.
From graphics to scientific computing
Researchers noticed that graphics hardware could apply the same mathematical operation to large data arrays efficiently.
General-purpose GPU computing now supports:
- Weather and fluid simulations
- Molecular modeling
- Image and video processing
- Financial calculations
- Cryptographic research
- Machine learning
Programming platforms expose GPU computation without requiring the output to be an image.
The application transfers or prepares data, launches a computational kernel, and retrieves results. Data-transfer overhead matters; a small task may finish faster on the CPU than spending time moving it to the GPU.
Why GPUs help machine learning
Neural-network training and inference perform extensive matrix and tensor operations. These involve many repeated multiply-and-add calculations.
GPUs can process large groups of those calculations simultaneously. Modern accelerators also include specialized matrix units using numerical formats suited to machine learning.
Performance depends on:
- Model size
- Batch size
- Numerical precision
- Memory capacity and bandwidth
- Software libraries
- Data movement
A powerful GPU with insufficient memory cannot hold a large model or training batch. Multiple GPUs require communication, which can become a bottleneck.
Latency versus throughput
A CPU may complete one complicated task with low latency. A GPU often achieves high throughput by collecting enough parallel work to fill the machine.
For a tiny calculation, GPU launch and transfer overhead can dominate. For millions of similar calculations, the GPU's throughput wins.
This is why applications use both:
- The CPU prepares work and handles control.
- The GPU processes large parallel sections.
- Results return or proceed to display.
The fastest design assigns work according to each processor's strengths.
Cooling, power, and sustained performance
High-end GPUs consume substantial electrical power and release it as heat.
Performance can be limited by:
- Power target
- Temperature
- Cooler design
- Case airflow
- Voltage
- Workload type
Two cards with the same GPU chip may sustain different clocks because of cooling and power configurations.
Portable devices balance graphics performance against battery life, heat, and noise. They may use both integrated and discrete graphics, activating the larger GPU only for demanding work.
Common misunderstandings
"A GPU is simply a CPU with more cores"
GPU execution units are organized for wide parallel throughput and are not equivalent to general-purpose CPU cores.
"Every calculation is faster on a GPU"
Small, sequential, branch-heavy, or transfer-dominated tasks may be better on a CPU.
"More VRAM always makes the GPU faster"
Capacity prevents data from spilling and enables larger workloads, but unused extra memory does not increase computation speed.
"AI runs only on GPUs"
AI can run on CPUs and specialized accelerators. GPUs are popular because many AI operations map well to their parallel hardware and software ecosystem.
Knowledge check
1. Why do pixels map well to GPU processing?
Millions of pixels often require similar calculations that can be executed independently or in large parallel groups.
2. Why should CPU and GPU core counts not be compared directly?
Their cores have very different capabilities, organization, control hardware, and intended workloads.
3. When can VRAM capacity become a performance problem?
When active graphics or compute data does not fit and must be moved repeatedly across a slower connection to system memory.
4. Why might a tiny task be slower on a GPU?
Preparing, launching, and transferring the task can cost more time than the small computation saves.
The one idea to remember
GPUs trade some general-purpose flexibility for enormous parallel throughput.
They excel when a problem can be expressed as many similar calculations over large data sets, which connects graphics, simulation, media processing, and modern AI.
Next, we will separate physical connectors from communication protocols and explain why identical-looking ports can behave differently.