GPU computing means running the data-parallel parts of a program on a processor built to keep thousands of threads in flight at once, while the CPU keeps the serial parts. A GPU wins on throughput because it gives up single-thread speed to get there: it puts its transistors into arithmetic rather than into caches and flow control. The speed of a GPU kernel alone does not decide how much faster a real workload runs. Four things do: how much of the work is actually parallel, how much data has to cross the bus between host and device, how well the kernels’ memory accesses line up with the hardware, and, once you add a second GPU, how much fixed overhead refuses to split.
How Is GPU Parallelism Different from CPU Parallelism?
A CPU is designed to run one sequence of operations (a thread) as fast as possible and can run a few tens of threads in parallel, while a GPU is designed to run thousands of threads in parallel at lower single-thread speed. NVIDIA’s CUDA documentation puts the difference down to transistor allocation: GPUs devote more of the chip to data processing units, CPUs more to data caching and flow control.
That allocation changes how each processor deals with slow memory. A CPU tries to avoid memory latency with large caches and branch prediction; a GPU hides latency by switching to other threads that have work ready, which only works when there are enough threads to switch between. One way to put it: CPUs suit task parallelism and sequential code, and GPUs suit data parallelism with high arithmetic intensity.
CPUs are parallel processors too, though. Lee et al.’s retrospective on their 2010 paper notes that modern GPUs need thousands of threads to stay occupied, while modern CPUs also benefit from hundreds. The real difference is one of scale and design point, which is also why a spec-sheet comparison of what a CUDA core count means next to a CPU core count misleads more often than it informs.
NVIDIA’s Hot Chips presentation in 2007 described a GPU with 12,288 hardware-managed concurrent threads and 128 thread processor cores at 1.35 GHz, for 518 GFLOPS peak. NVIDIA had introduced CUDA in 2006 so that any computational workload could use that throughput without going through graphics APIs. Which hardware and driver features make a given card usable this way is covered in our piece on what makes a GPU CUDA-capable.
Inside a GPU Computing Architecture: Grids, Blocks, Warps and Memory
The programming model breaks the problem into layers. A grid is split into independent blocks, and each block into threads. The hardware hands blocks to whichever streaming multiprocessors (SMs) are free, and because blocks do not talk to each other, one program scales across GPUs with any number of cores. The code that each thread runs is a kernel, launched from the CPU, which acts as host to the GPU coprocessor and its separate memory. Our explainer on CUDA kernels and the thread hierarchy goes deeper into launch configuration.
Memory is tiered, and the latency gaps between tiers are large. The CUTHERMO study (2025) gives these approximate figures for recent NVIDIA GPUs: registers in about 1 cycle, shared memory and L1 in about 25 cycles, L2 in about 200, and global memory at about 350 cycles on a TLB hit or 1,000 on a miss. Shared memory is on-chip and split into banks that can be accessed at the same time, so its bandwidth is far higher than global memory’s, as long as threads hit different banks.
Each warp’s execution context stays on-chip for the warp’s whole life, so switching between warps costs nothing. That zero-cost switch is what turns thousands of resident threads into hidden latency: while one warp waits on global memory, the scheduler issues instructions from another.
How SIMT Runs Threads in Warps and Why Occupancy Matters
SIMT (single instruction, multiple threads) is the GPU’s core execution model: a group of threads runs the same instruction on different data. On NVIDIA hardware that group is the warp, a set of 32 parallel threads executing one instruction together. In the 2007 design each SM ran up to 768 concurrent threads as 24 warps of 32.
SIMT looks like SIMD, but the programming contract is different. NVIDIA’s guide explains that SIMD vector machines expose the vector width to software, whereas SIMT instructions describe what a single thread does, including how it branches. So you write ordinary scalar code for one thread, and the hardware groups threads into warps. The catch is that the threads of a warp still execute a SIMD instruction together.
At every issue slot, a warp scheduler picks a warp whose threads are ready and issues that warp’s next instruction. Utilisation therefore depends directly on how many warps are resident, which is why register pressure matters: in NVIDIA’s own compute capability 6.x example, one extra register per thread drops a kernel from 32 resident warps per SM to 16.
Why Does Branching Hurt GPU Performance?
Branching hurts when threads in the same warp take different paths. The Hot Chips description says it plainly: a warp diverges and reconverges when its threads branch independently, and it runs best when all its threads execute together. In a divergent warp the hardware runs each path in turn, masking off the threads not on that path, so for the duration of the branch the warp does the work of every path it contains.
The cost is per warp, not per branch. If all 32 threads in a warp take the same side of an if, the warp does not diverge, even if neighbouring warps take the other side.
That is why “avoid branches” is a rule of thumb, not a law. It only makes sense in the context of a specific kernel, and that context comes from profiling, not from general advice. NVIDIA’s own guide says the same about optimisation in general: which strategy pays off depends on what limits that part of the application, and tuning instructions in a kernel bound by memory accesses will not give any significant gain.
What Decides How Much Speedup a Workload Gets on the GPU
The speedup a kernel shows in isolation overstates the real gain. The end-to-end number comes after you add transfer time and serial time.
Parallel Fraction and the Serial Remainder
A 2024 EDBT study of GPU-accelerated workflows measured a 5.69x GPU speedup over CPU for one task when only the parallel fraction of its code was counted, falling to 1.24x once CPU-GPU communication and the serial fraction were included. The authors’ rule is that a GPU is worth using when the parallel fraction’s processing time is large enough to outweigh both the CPU-GPU transfer time and the serial fraction’s time. This is Amdahl’s law with a transfer term added: whatever stays serial, plus whatever moves across the bus, caps the gain however fast the kernel gets.
Data Transfer Across PCIe
Gregg and Hazelwood (ISPASS 2011) benchmarked a broad set of GPU kernels on several platforms and found that including memory transfer times could make a kernel take between 2 and 50 times longer than the GPU processing time alone. They also showed that the faster the GPU, the more transfer overhead matters, because its kernels finish in a smaller share of the total time. In one case the slower GeForce 330M finished a sparse matrix-vector application before the GTX 480, simply because it had higher CPU-GPU bandwidth. At the other end, Monte Carlo moved only 32 KB to the device however many sample paths it computed, so transfer overhead hardly mattered.
NVIDIA’s programming guide gives matching advice. Keep intermediate data on the device even if some kernels there do not expose enough parallelism to run at full efficiency, and batch many small transfers into one large one. Copies can overlap with kernel execution on devices that support it, provided the host memory is page-locked.
Worked Example: A GPU Sort with Its Transfer Counted
Using Gregg and Hazelwood’s measured figures: sorting 32 MB of keys on a GTX 480 took 175 ms to move the data to the GPU and 67 ms to sort it. Counting only the sort gives 67 ms. Counting the whole job gives 175 + 67 = 242 ms, and 242 / 67 ≈ 3.6, so the end-to-end time was 3.6 times the GPU-only time. Any CPU-versus-GPU speedup built on the 67 ms figure overstates the gain by that factor, unless the keys were already on the device because an earlier kernel produced them.
Memory Access Patterns and Coalescing
Inside the GPU, the next lever is how a warp’s threads touch global memory. Device memory is read in aligned 32-, 64- or 128-byte transactions, and the hardware combines a warp’s accesses into as few transactions as the address pattern allows; scattered addresses mean more transactions and wasted bytes. The CUTHERMO paper shows a strided pattern in which seven of every eight words in each fetched sector go unused, wasting 7/8 of the memory transactions. In its matrix-multiply case, reassigning thread indices so that a warp reads contiguous memory produced speedups of 7.21x on an RTX A4500 and 6.83x on an RTX 4090, even though the L1 hit rate went slightly down.
Earlier work reports similarly large effects. Stratton et al. report that tiling a stencil benchmark cut global memory traffic from 5 words to 1.25 words per thread per iteration and gave about a 3x improvement, and that a data layout change for coalescing gave an order-of-magnitude speedup on the LBM benchmark. They also found, though, that many of the performance cliffs avoided by optimisation become less steep with successive architecture generations, so these optimisations matter less on newer hardware.
Fair Baselines
Headline speedups deserve suspicion. A 2012 survey lists reported GPU gains such as 245x to 415x for MRI processing. CPU myth” paper argues that most of the CPU’s gap can be recovered with the same algorithm-architecture co-design effort that the GPU version received. Their test is that every performance claim should be checked against the hardware’s own roofline (memory bandwidth and FLOPs), which rules out unoptimised baselines automatically.
What Workloads Benefit Most from GPU Acceleration?
Workloads benefit most when they break into many independent pieces doing the same computation, with plenty of arithmetic per byte moved and data that can stay on the device. One 2012 analysis states that if a problem cannot be broken into at least a thousand threads, CUDA gives no overall advantage, and that for most serial algorithms CUDA is not that useful.
The study that showed 5.69x falling to 1.24x also measures the low end. Its element-wise add_func task has two orders of magnitude less computation than its matrix-multiply task, so communication outweighed the parallel work at every block size and the GPU ran slower than the CPU, while matrix multiply reached up to 21x. K-means with 10 clusters gained no more than 1.5x, because the parallel fraction was shorter than both the serial fraction and the transfers. With all tasks distributed and processed in parallel, the GPU runs ended up slower overall than the CPUs, at -1.20x.
| Workload trait | Effect on GPU speedup | Evidence |
|---|---|---|
| Problem splits into thousands of independent threads | Below about a thousand threads, no overall advantage | 2012 CUDA analysis |
| High arithmetic intensity (many operations per byte) | Computation outweighs transfer; matrix multiply reached up to 21x | EDBT 2024 |
| Low arithmetic intensity (element-wise add) | Transfer outweighs compute; GPU slower than CPU | EDBT 2024 |
| Large serial fraction | Caps end-to-end gain (5.69x kernel became 1.24x) | EDBT 2024 |
| Little data moved relative to compute (Monte Carlo) | Transfer overhead negligible | Gregg and Hazelwood 2011 |
| Memory transfer dominating a fast kernel (SAXPY benchmark) | For SAXPY, kernel plus transfer averaged 43x the kernel time | Gregg and Hazelwood 2011 |
| Strided memory access (CUTHERMO’s stride-7 example) | 7/8 of memory transactions wasted | CUTHERMO 2025 |
| Warp-divergent, data-dependent control flow | Warp diverges; best efficiency only when its threads execute together | Hot Chips 2007 |
Whether one particular piece of code should move to the GPU at all is a narrower question, covered in our analysis of when CUDA offload beats a CPU implementation.
Why Doesn’t Adding a Second GPU Double Performance?
A second GPU speeds up only the part of the job that splits; fixed per-job work, including device coordination, does not shrink. The measured evidence below comes from rendering, not general compute, so read it as a demonstration of the mechanism rather than a forecast for your workload. A 2026 dual RTX 5090 benchmark found that throughput tests (V-Ray, Octane) scaled close to 2.00x, while engines timed by wall-clock render time scaled lower, from 1.31x to 1.59x for Cycles and 1.68x for Redshift. The difference was fixed overhead: scene parsing, acceleration-structure builds, kernel compilation and warm-up, device coordination and the final resolve, none of which splits across cards.
The same benchmark gives a two-point estimate. If a job takes T1 seconds on one card and T2 on two, and only the splittable part gets faster, the fixed part is roughly 2 × T2 − T1. A faster card shrinks the splittable part but not the fixed part, so the faster the single-card run already is, the less a second card adds in proportion. This mirrors Gregg and Hazelwood’s finding that faster GPUs feel transfer overhead more: speed up the parallel part and whatever is left over takes a bigger share.
Topology adds a second limit. Li et al. (TPDS 2019) evaluated PCIe, NVLink, NVLink-SLI and NVSwitch systems and found four NUMA effects in GPU-to-GPU communication, three caused by NVLink topology and routing and one by a PCIe chipset design issue, so which GPUs in a node you pair can noticeably change communication efficiency and overall application performance. Since no compute-specific multi-GPU scaling figures are available here, we would measure the one-GPU and two-GPU runs of the actual workload before assuming any ratio.
CUDA, OpenCL or SYCL for General-Purpose GPU Programming
CUDA is NVIDIA’s platform for the parallel compute engine in NVIDIA GPUs. OpenCL defines data parallelism as one program applied concurrently to each point in an abstract index domain, with global, work-group-local and per-work-item private memory regions. SYCL is an open industry standard for C++ on heterogeneous systems, built as a generic programming model that can sit on backends other than OpenCL.
In TechnoLynx’s view, performance is not what tells them apart. Vendor-specific APIs are not inherently faster than standard ones; the same code performs essentially the same, and a vendor API’s advantage is access to lower-level features that take real commitment to use and are not always worth it. Our guide to GPU compute API choice between CUDA, OpenCL and SYCL walks through how to choose between them.
Finding Which Limit Binds First
Every section above describes a different ceiling: serial time, the PCIe link, warp divergence, uncoalesced memory, fixed multi-GPU overhead. The useful question is not whether GPUs are faster than CPUs but which of these limits applies to your kernel at its real data size, measured with the transfers included. The CUDA guide’s own advice is to keep optimisation effort pointed at the measured limiter. Diagnosing that limiter on production code, and then removing it, is what TechnoLynx’s GPU Performance Engineering work deals with.