6.1.12 · D5Parallelism & Multicore
Question bank — Heterogeneous computing concepts
Before we start, three words appear over and over — let us pin them down in plain language so no reveal below uses them cold:
Every symbol used in the reveals below is defined once here, so nothing appears cold:
Linked prerequisites you may want open: Amdahl's Law and Scalability, Roofline Performance Model, Memory Hierarchy and Caching, Parallel Programming Models, SIMD and Vector Processing, DMA and I/O Controllers, Power and Energy Optimization.
True or false — justify
A GPU is simply "a faster CPU"
False — it is higher throughput but higher latency per task; a single GPU thread is slower than a CPU thread, and it only wins when thousands of threads run the same operation at once.
Adding a GPU always speeds up a program
False — if the parallel fraction is tiny or the data-transfer cost exceeds the compute saved, the heterogeneous version can be slower than the CPU alone (below the break-even work defined in the glossary above).
Heterogeneous means "more than one core"
False — that is just multicore. Heterogeneous means cores of different types (different instruction sets, memory models, or strengths), e.g. CPU + GPU + NPU.
Eight identical CPU cores form a heterogeneous system
False — identical cores running the same instruction set are homogeneous; heterogeneity requires asymmetric strengths, not just multiple units.
If , overall speedup is infinite
False — Amdahl caps it at ; the serial fraction and transfer tax are fixed costs the GPU can never touch.
Matrix–matrix multiply is a great GPU workload
True — it does work on data, so arithmetic intensity grows with ; plenty of math per byte keeps the cores fed.
Vector addition is a great GPU workload
False — work on data means ~1 FLOP/byte; it is memory-bound, so transfer and bandwidth dominate and the GPU sits idle waiting for data.
Unified memory removes the data-movement cost entirely
False — it removes the explicit copy step in code, but the bytes still physically travel across the interconnect; it hides the cost, it does not delete it.
FPGAs are slower than CPUs because they run at lower clock speeds
False — an FPGA can be far faster per watt and per operation for its target datapath, because it builds a custom pipeline instead of fetching/decoding general instructions; clock speed alone is misleading.
A pipelined model's total time is the sum of all stage times per item
False — after the pipeline fills, throughput is set by the slowest stage, so total time , not .
Spot the error
"CPUs have thousands of cores so they win at parallel work."
Swapped. GPUs have the thousands of simple cores; CPUs have few powerful cores tuned for latency and control flow.
"We should send tiny tasks to the GPU to save the CPU's time."
Wrong direction — tiny tasks have low work , so transfer overhead dominates and you lose. Offload only when work is large relative to data moved.
"; ignore the copies."
Ignores the two transfers. , and those copies often dominate for low-intensity kernels.
"Arithmetic intensity is measured in FLOPS."
No — FLOPS is a rate (ops per second). Intensity is FLOP per byte, a ratio of work to data moved; it decides if you are compute- or memory-bound.
"Amdahl says raise the serial fraction to go faster."
Backwards — speedup improves as shrinks. A large serial fraction is the ceiling that caps everything.
"Bigger caches make the GPU the throughput king."
The GPU wins through many cores + huge bandwidth, not big caches. Its caches per core are small; the CPU is the one with large caches for latency.
"A pipeline with a slow write stage is fixed by adding a faster GPU."
No — the bottleneck is the max-time stage (the write). Speeding a non-bottleneck stage barely helps; balance or overlap the slow stage.
Why questions
Why do CPUs use branch prediction and out-of-order execution while GPUs mostly don't?
CPUs chase low latency for irregular control flow, so they spend transistors hiding stalls; GPUs hide latency instead by switching among thousands of threads, so they spend those transistors on more ALUs.
Why is explicit data movement called "the bottleneck" of heterogeneous systems?
Each processor has its own memory, so data must be copied across a limited-bandwidth link; when compute per byte is low, this copy time swamps the compute time.
Why does the transfer term have a factor of 2 in ?
Data goes CPU→GPU and back GPU→CPU, so the size crosses the link twice.
Why are specialized accelerators (TPU, crypto units) so energy-efficient?
They hardwire one operation so there is no instruction fetch/decode/schedule overhead — every transistor does useful work for that one task, giving 10–100× better energy per op (Power and Energy Optimization).
Why can a pipelined model beat an offload model for streaming many items?
Pipelining overlaps read, transfer, compute, and write across different items, so you pay full latency only once and then run at the slowest-stage rate; offload does each item's stages serially.
Why does high memory bandwidth matter more for GPUs than large caches?
GPUs stream through huge, regular datasets once, so feeding all cores fast beats reusing a small working set; caches help reuse, bandwidth helps streaming.
Why does the Roofline model care about arithmetic intensity?
Because intensity places a kernel on the roof: low intensity hits the bandwidth-limited slope (memory-bound), high intensity hits the flat peak-FLOPS ceiling (compute-bound) — see Roofline Performance Model.
Edge cases
What happens at arithmetic intensity ≈ 0 (no compute, pure copy)?
The kernel is entirely transfer; heterogeneous execution is strictly slower because you copy data for no computational benefit. Keep it on the CPU.
What if (GPU no faster) in the break-even formula ?
The denominator , so required work — no amount of work justifies the transfer when the GPU gives no speed advantage.
What if the parallel fraction ?
All work is serial; , so the GPU only adds transfer overhead and cannot help.
What if but ?
Even a perfectly parallel program is capped at — the transfer tax alone sets the ceiling, motivating unified memory or overlapping copies with compute.
In a pipeline, what limits speedup as ?
It approaches — the slowest stage caps throughput no matter how many items you stream.
What does data size (data already resident on the GPU) imply?
The transfer term vanishes, so any parallel speedup helps; this is why keeping data on-device across kernels (avoiding round trips) is a key optimization.
Recall One-line summary to carry away
Heterogeneous wins only when parallel work is large, arithmetic intensity is high, serial fraction is small, and transfers are hidden — miss any one and the accelerator becomes dead weight.