GPU Programming
What is the main purpose of using multiple CUDA streams?
- ATo increase cooling airflow through the GPU
- BTo overlap data transfers with kernel execution and shorten total time
- CTo improve video streaming quality
Show answer and explanation
Answer: B. To overlap data transfers with kernel execution and shorten total time
A stream is an ordered queue of work issued to the GPU, such as transfers and kernel launches. Work within a stream runs in order, but work in different streams can proceed concurrently. By splitting the data and transferring the second part while computing on the first, transfer and computation largely overlap, shortening the total time.
- A. It has nothing to do with cooling.
- B. Correct. Transfer time can be hidden.
- C. It is unrelated to video streaming.