Asynchronous GPU calculations
4 次查看(过去 30 天)
显示 更早的评论
In the latest release, GPU calls execute asynchronously to the CPU. But do also GPU calls themselves run asynchronously? I.e. does multiple calls using e.g. feval(CUDA_kernel, ...) execute at the same time, or does the GPU wait for subsequent calls to finish? Does one need to impose wait() between feval to guarantee that the calls execute in order on the GPU? Experimental tests indicate that wait() is not needed, but it would be nice with a proper guarantee.
0 个评论
采纳的回答
Edric Ellis
2012-4-17
The asynchronous nature of the kernel invocations should be completely transparent in terms of functionality (if it isn't, then that would be a bug), the "wait()" is required only when attempting to get timings for portions of code.
2 个评论
Jill Reese
2012-4-17
Yes, this code will be executed properly. And gather does wait for the variable it is transferring to be completely evaluated before the transfer starts.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 GPU Computing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!