GPU Programming
Which describes CUDA unified memory?
- AMemory usable from both CPU and GPU through the same pointer, with data migrating automatically as needed
- BThe CPU and GPU physically merged into one chip
- CGPU memory made entirely read-only
Show answer and explanation
Answer: A. Memory usable from both CPU and GPU through the same pointer, with data migrating automatically as needed
With unified memory, an allocation can be accessed from both CPU and GPU through the same pointer, and data migrates page by page to whichever side accesses it. Programs become simpler, and data larger than GPU memory is easier to handle. Each migration involves page faults and transfers, though, so for performance, programs issue hints to prefetch data in advance.
- A. Correct. It reduces the need to write copies by hand.
- B. It is not about merging chips.
- C. It is readable and writable.