Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is cudaFree() asynchronous?

Tags:

cuda

gpu

My question is just as the title. Actually, I am looking for a way to free device memory asynchronously.

Thanks!

like image 439
Blue_Black Avatar asked Sep 22 '12 00:09

Blue_Black


1 Answers

cudaFree() is synchronous. If you really want it to be asynchronous, you can create your own CPU thread, give it a worker queue, and register cudaFree requests from your primary thread.

That said, asynchronous frees seem like an odd request. Perhaps you could explain why you'd like it to be asynchronous. Do you want the free to occur immediately after a CUDA event is triggered?

like image 124
Mr Fooz Avatar answered Sep 28 '22 08:09

Mr Fooz