GPU Programming
In general, how do GPU caches compare with CPU caches?
- AGPUs have no caches at all
- BGPUs have L1 and L2 caches, but with so many concurrent threads the cache capacity per thread is far smaller
- CGPU caches are many times larger per thread than CPU caches
Show answer and explanation
Answer: B. GPUs have L1 and L2 caches, but with so many concurrent threads the cache capacity per thread is far smaller
GPUs have an L1 cache per SM and an L2 cache shared across the chip, but with tens of thousands of threads running simultaneously, the capacity available per thread is orders of magnitude smaller than for a CPU thread. Rather than relying on caches to reduce latency, GPUs hide latency by switching among many warps and depend on coalescing and shared memory to use memory well.
- A. They do have L1 and L2 caches.
- B. Correct. That is why coalescing and shared memory matter.
- C. With so many threads, the per-thread share is small.