liveBook · Manning

GPGPU

As explained in Grokking GPU Programming

GPU programming is the practice of writing software that executes computational work on graphics processing units.

GPGPU means using a graphics processing unit (GPU) for general-purpose computation. CUDA made this practical with familiar C-like syntax, without disguising computations as graphics operations. GPUs suit work that repeats simple operations across large amounts of data; CPUs are better suited to tasks where one fast core handles complex logic. section 1.6

Matrix multiplication

Multiplying two 4,096×4,096 matrices illustrates a strong GPU fit: estimates put a modern GPU’s time well below a modern multi-core CPU’s. But copying data to and from the GPU and launching work can reduce or erase the benefit for a one-off operation. section 1.6

Table 1.2 Contrasting CPU and GPU design philosophies.
 
CPU (Master Chef)
GPU (Thousand Cooks)
Cores
6–24 on typical desktops
Thousands of simple processing units
Design Goal
Low Latency (Finish each task fast)
High Throughput (Finish many tasks at once)
Analogy
A chef preparing a complex 7-course meal
1,000 workers rolling 1,000 burritos at once
Best For
OS, Web Servers, Complex Logic, and any single-threaded task where one fast core wins
Matrix Math, Image Processing, AI, and many more parallel patterns you’ll discover in this book

Compare CPU and GPU design goals using the chef and many-workers analogy. section 1.6

How Grokking GPU Programming covers it

How deep it goes
Motivates GPU programming with CUDA history, a matrix-multiplication comparison, and overhead caveats, but gives no implementation steps.
Examples
Compares 4,096×4,096 matrix multiplication on a multi-core Xeon and an A100, including tensor-core performance.
What you can do after
Understand why GPUs suit highly parallel work and how transfer and launch costs can reduce gains.
How it connects
Connects CUDA, CPU computing, parallel programming, matrix multiplication, and AI training.

Also explained in

Compare how 6 books explain GPGPU →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking GPU Programming. The section links point to the parts of the book it draws on.