memory management how to reset all the GPU memory ?


If i foret to delete some data from my gpu memory, then i canot use the gpu anymore. So i used to restart my computer … but is there any better (and more convenient) way to do so ?


All of the memory you allocate on the GPU is freed after the program exits, even if you don’t call cudaFree(). There is no need to reset your computer.

Can you explain in more detail the problem you are seeing?

I hope this does hold true also for the programs that crash rather than exit (almost) cleanly?

Yes, as long as the operating system gets to clean up the mess