Will cudaStreamWaitEvent block the host?

1.2k views Asked by At

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?

1

There are 1 answers

0
Robert Crovella On BEST ANSWER

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.