6.1.12 · D1Parallelism & Multicore

Foundations — Heterogeneous computing concepts

2,703 words12 min readBack to topic

Before you can read the parent note, you need to own every word and symbol it throws at you. This page builds them one at a time, from nothing. Read top to bottom — each block only uses ideas already defined above it.


1. A "processor" and what it does

If you put many desks in one room, you have many cores. If all the desks are identical, that room is homogeneous. If some desks are big-and-clever and others are small-and-many, the room is heterogeneous — that word is literally Greek for "different kinds".

Figure s01 below draws exactly this contrast: on the left, one large blue desk = the CPU (a single powerful worker); on the right, a grid of small green desks = the GPU (many simple workers). As you read the next callout, look at the two blocks and notice that the blue block is one box while the green block is twenty-four — that size-vs-count trade-off is the whole picture.

Figure — Heterogeneous computing concepts

2. FLOP, FLOPS, and why the letter S matters

The parent note counts work in "FLOPs". Two nearly-identical words hide here — mixing them up ruins every formula.

Prefixes you will see (each is ×1000 of the last):

symbol word meaning
Giga (a billion)
Tera (a trillion)

So "10 TFLOPS" = ten trillion operations every second.


3. Time = Work ÷ Speed (the master equation)


4. Bandwidth , data size , and the "" tax

A GPU cannot touch data that sits in the CPU's memory. The data must be copied over a wire first. That wire is slow, and the copy costs time.

Same master equation, new names: time to move the box = box size ÷ pipe width = .

Figure s02 below makes the round trip concrete. The blue box (CPU memory) and green box (GPU memory) sit at the two ends of a grey pipe of width . The yellow arrow is the send leg (CPU→GPU) costing ; the red arrow underneath is the return leg (GPU→CPU) costing another . Follow both arrows and you literally count the two trips that add up to the tax written at the bottom.

Figure — Heterogeneous computing concepts

5. Arithmetic intensity — the make-or-break ratio

Now the punchline. Two chips race, but only the fast chip pays the transfer tax. When is paying it worth it?

Figure s03 below plots that ratio against problem size . The green curve (matrix × matrix) climbs forever because its intensity grows like ; the red curve (vector add) stays flat and low. The yellow dashed line is the break-even threshold from the transfer tax — you only "win" in the shaded green region above the line, which the green curve enters and the red curve never reaches. That single picture explains why some workloads belong on the GPU and others never do.

Figure — Heterogeneous computing concepts

6. Fractions and — splitting a program in two

Amdahl's Law needs one more idea: a program is part "must-be-sequential" and part "can-be-parallel".

Now we define the last symbol the ceiling needs — the normalized transfer overhead.

Figure s04 below shows the payoff. Each curve is the overall speedup as the GPU gets faster (moving right). Notice every curve flattens into a horizontal ceiling — the dotted line of the same colour — no matter how far right you go. A small serial fraction (green, ) has a high ceiling; a large one (red, ) is capped low. That flattening is Amdahl's Law.

Figure — Heterogeneous computing concepts

7. Performance-per-watt — why accelerators exist at all


Prerequisite map

Processor = one worker at a desk

Homogeneous vs heterogeneous

FLOP = one operation

Work W in FLOPs

FLOPS = speed

Master eqn T = W over F

Bytes and data size D

Bandwidth B

Transfer tax 2D over B

Normalized tax t xfer

One way transfer or overlap

Arithmetic intensity W over D

Break even inequality

Serial fraction fs and parallel fp

Amdahl speedup

Watt and perf per watt

Why accelerators exist

Heterogeneous Computing

Each foundation on the left feeds a formula in the middle, and all of them feed the parent topic on the right: Heterogeneous Computing. When you also want to express these splits in code, read Parallel Programming Models.


Equipment checklist

Cover the right-hand side and see if you can answer each before revealing it.

What is the difference between homogeneous and heterogeneous cores?
Homogeneous = all identical cores/instruction sets; heterogeneous = two or more different kinds of cores, each tuned for different work.
What is a FLOP versus FLOPS?
A FLOP is one floating-point operation (a count of work); FLOPS is FLOPs per second (a speed).
State the master equation linking work, speed and time.
— time equals work divided by processing rate; its units are FLOP ÷ (FLOP/s) = seconds.
Why does the round-trip transfer time have a factor of 2, and when is it only 1?
Data travels CPU→GPU and then GPU→CPU (two trips → ); if the answer never comes back (one-way), it is only .
What is overlapping and how does it reduce the effective tax?
Running the copy and the GPU compute at the same time so transfer hides behind compute; when compute is longer, the effective transfer tax drops toward zero.
Define arithmetic intensity and say what high vs low means.
(FLOPs per byte); high = lots of compute per byte moved (worth offloading), low = mostly data movement (not worth it).
Why is ?
They are the serial and parallel slices of one whole program, so their fractions sum to the whole (1).
What is and why can it sit next to ?
The transfer time divided by the original run time — a dimensionless fraction, so it matches the units of and .
What caps the speedup even with an infinitely fast GPU?
The fixed costs that don't shrink: the serial fraction plus normalized transfer overhead, giving .
What does performance-per-watt measure and why does it justify accelerators?
FLOPS per watt of electricity; specialized hardware gets far more compute per unit energy, which is the real budget in phones and data centres.