Is cudaFree () asynchronous?

My question is the same as the title. In fact, I'm looking for a way to free up device memory asynchronously.

Thanks!

+7
source share
2 answers

cudaFree () is not asynchronous. A synchronization call is called internally when cudaFree () is called from Host.

I did not understand what is actually needed for asynchronous freeing of memory.

+7
source

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

However, asynchronous frees seem like an odd request. Perhaps you could explain why you want it to be asynchronous. Do you want the release to happen immediately after the CUDA event fires?

+5
source

All Articles