GPU Programming
Which describes memory coalescing on a GPU?
- ACombining two GPUs' memories into one to double capacity
- BCompressing memory data to increase capacity
- CWhen adjacent threads in a warp read adjacent addresses, the reads are combined into a few memory accesses
Show answer and explanation
Answer: C. When adjacent threads in a warp read adjacent addresses, the reads are combined into a few memory accesses
GPU memory is read and written in chunks such as 32 or 128 bytes. If the 32 threads of a warp each read 4 consecutive bytes, the 128 bytes together are fetched in one or a few accesses. With scattered addresses, each thread needs a separate chunk and unused data is carried along, cutting effective bandwidth to a fraction.
- A. It is not about merging capacity.
- B. It is unrelated to compression.
- C. Correct. It is fundamental to using bandwidth effectively.