No history yet

Introduction to GPUs

What is a GPU?

A Graphics Processing Unit, or GPU, is a specialized processor designed to handle many tasks at once. Think of your computer's main processor, the CPU, as a master chef in a kitchen. This chef is brilliant and can handle any complex recipe you throw at them, but they work on one step at a time, sequentially. A GPU, on the other hand, is like an army of kitchen assistants. Each assistant isn't as versatile as the master chef, but if you need to chop 1,000 onions, they can all work at the same time and finish the job much faster.

Lesson image

Initially, GPUs were created for one main purpose: rendering graphics. Every pixel on your screen needs to be calculated and drawn, from the colors in a photograph to the 3D world of a video game. This involves a massive number of relatively simple, repetitive calculations. A GPU's architecture is perfect for this, as it can perform all these similar calculations simultaneously.

GPU

noun

A specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device.

Built for Parallel Processing

The core strength of a GPU lies in its architecture, which is built for parallel processing. It contains thousands of smaller, more efficient cores designed to handle multiple tasks simultaneously. This is a fundamental difference from a CPU, which typically has a few very powerful cores optimized for handling tasks one after another, or serially.

A CPU focuses on low latency for one or a few tasks. A GPU focuses on high throughput for thousands of tasks.

This architectural difference is why a CPU is great for general computing—like running your operating system or a web browser—where tasks are varied and often depend on the previous step. A GPU excels when a large task can be broken down into many smaller, identical, and independent sub-tasks.

The Evolution of GPUs

Early GPUs operated on what's called a fixed-function pipeline. This meant the hardware was built with a specific, unchangeable set of graphics operations. It was highly efficient for the tasks it was designed for, but it was also inflexible. If a new graphics technique emerged, you'd need new hardware to support it.

Lesson image

The major breakthrough was the development of programmable shaders. Shaders are small programs that run on the GPU to control how surfaces appear—things like lighting, color, and texture. Making them programmable meant developers were no longer locked into the manufacturer's fixed set of effects. They could write their own code to create custom visual effects, which dramatically increased realism and artistic freedom in games and graphics.

This shift from a fixed pipeline to a programmable one was monumental. It turned the GPU from a specialized, single-purpose tool into a flexible and powerful parallel computing engine. This new programmability opened the door for the GPU to be used for tasks far beyond graphics, a field now known as General-Purpose GPU (GPGPU) computing.

Quiz Questions 1/5

Which statement best describes the primary difference between how a CPU and a GPU handle tasks?

Quiz Questions 2/5

Early GPUs used a hardware design with a specific, unchangeable set of graphics operations. What was this design called?

GPUs have become a fundamental component of modern computing, not just for stunning visuals in games but for powering advances in science, data analysis, and artificial intelligence.