I understand that cudaEventSynchronize will block the host until the event has been triggered. However, what about cudaStreamWaitEvent? Will cudaStreamWaitEvent block only the specified stream whereas the host will proceed, or the host will be blocked as well?
Will cudaStreamWaitEvent block the host?
1.2k views Asked by Hailiang Zhang At
1
It only blocks the specified stream processing, at the point at which the WaitEvent was inserted into the stream queue. The host processing will continue. You can use cudaStreamSynchronize() to force the host to wait on completion of the processing in a particular stream.