-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Release is not freeing memory on Device after compile #53
Comments
If compilation is the only thing that is done, there shouldn't be anything left after Also, just a note, |
In this case it is openCL. However, I think I have similar memory issues in CUDA.
Basically I watch the output of nvidia-smi and memory usage while I go through debug steps through my code.
This is exactly what I expected, but this did not happen. So i explictly called it at the del destructor. It was then that I noticed that memory is not cleared when a compile is called. Note that the clearing of memory is much cleaner once we just instance a |
That's strange, I cannot reproduce it on Linux, Tesla P100, pyopencl 2018.2.5. Did you try the same test with just plain PyOpenCL? I cannot imagine what can be retained after |
Let me give it a try with plain pyOpenCL and get back. I do agree that this issue I am seeing is very weird. Perhaps I too will try to reproduce in a different settings. |
This may mean that there's a cyclic reference somewhere, either in Reikna or PyOpenCL. Did you try doing |
Nope I did not, I was assuming this would just collect unused memory attached to RAM, would it help with memory on GPU too? I will give this a try too. |
It may collect Python objects which hold handles to GPU memory. |
A quick run of following code:
You would notice that the memory on device is cleared for non-compiled thread, but not for the compiled one
The text was updated successfully, but these errors were encountered: