GPU Programming
Which characteristic best describes work that GPUs process quickly?
- AA single chain of sequential computation where each step uses the previous result
- BApplying the same, mutually independent computation to each element of a large data set
- CA small amount of data with a great many conditional branches
Show answer and explanation
Answer: B. Applying the same, mutually independent computation to each element of a large data set
GPUs assign the same work to thousands of threads running in parallel, so they excel at tasks where many elements can be computed independently (data parallelism), such as per-pixel image processing, matrix multiplication and vector operations. Sequential computation that depends on prior results, or branchy work on little data, offers little parallelism and often runs faster on a CPU.
- A. Sequential work cannot be parallelized, so a CPU is better.
- B. Correct. It suits data-parallel work.
- C. Many branches reduce GPU efficiency.