How Big a Job Must Be Before Sending It to the GPU Pays for the Journey
Last timeHiding the Wait Instead of Avoiding It
A GPU has its own memory, reached over a link slower than either memory. The journey sets a job size below which the device loses however fast it computes.
Two memories
Lesson three ended with a processor keeping the part of a job that will not divide and handing the rest to a GPU. Handing over is not free, and this lesson works out what it costs.
A GPU is a separate device with its own memory. NVIDIA's CUDA Programming Guide (2026 edition) says so plainly: the host processor has its own attached memory and every GPU in the system has its own. The device's workers can only compute on what is in the device's memory. So a job handed over makes a round trip.
The speed of the link
How fast is a crossing? The link in most machines is PCI Express, built from lanes. The numbers here are for one named device, the NVIDIA A100, whose data sheet (June 2021) lists its link as generation 4.
A generation 4 lane signals at 16 gigabits a second, twice generation 3, and 128 of every 130 bits carry data. That is 15.75 gigabits, or 1.97 gigabytes, a second. A device normally gets sixteen lanes, so the ceiling is 31.5 gigabytes a second in each direction. The data sheet prints 64 GB/s, which is what the two directions come to when added.
That is a ceiling. For the previous generation, whose ceiling by the same sum is 15.75, NVIDIA's CUDA C++ Best Practices Guide (2026 edition) quotes roughly 12 gigabytes a second in practice. Now compare the device's own memory, which the same data sheet puts at 1,555 gigabytes a second. The link is about fifty times slower than what lies at the end of it.
The break-even size
To see what that does to a job, here is a model with round numbers. They are illustrations chosen to be easy to follow, not measurements. Sizes are in megabytes and times in milliseconds.
The lesson stops here
6 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents