GPU Programming
What is the main way a GPU hides long memory latency (hundreds of cycles)?
- AIt gives each thread a cache many times larger than a CPU's
- BWhile one warp waits for memory, it switches to other ready warps to keep the execution units busy
- CIt guesses data values instead of waiting for memory
Show answer and explanation
Answer: B. While one warp waits for memory, it switches to other ready warps to keep the execution units busy
A CPU reduces one thread's waiting with large caches and complex circuitry, whereas a GPU keeps many warps resident, sets aside those waiting for memory and issues instructions from other warps that are ready. Because all registers stay on chip, switching costs nothing. With enough warps, the execution units stay busy throughout memory latency.
- A. Cache per thread is actually small.
- B. Correct. Many threads fill the waiting time.
- C. It does not compute with guessed values.