my application repeatedly allocates and de-allocates large chunks of memory (up to 200MB, no easy way to avoid that, unfortunately). Part of the application also uses OpenGL. I run into the problem that cudaMallocs randomly (?) fail even though cuMemGetInfo reports enough free memory (e.g., a 200MB malloc fails even though 300MB are reported free). The failure rate depends on the delay between application launches (waiting between launches reduces failure rate) and on how often I repeate allocation/deallocation operations (later operations during an application launch fail more often).
I suspect GPU memory fragmentation is the culprit. Therefore my question: is there any programmatic way (CUDA command, OpenGL, other interface) to force a GPU soft-reset or to otherwise free all allocated GPU memory? The application will be the only program running, so I could afford to lose all allocated GPU resources (if the OS is not be affected). I am running Windows XP.
Any ideas? Let me know if you need further details.
Cheers, and thanks,