event (firstDotCall) leak at xdot.c
Closed this issue · 7 comments
Cause "out of memory" errors with intel opencl drivers.
Here's the forum thread:
https://software.intel.com/en-us/forums/opencl/topic/701907
And bugfix:
ache7@959372f
Maybe it's better to initialize firstDotCall to NULL and release firstDotCall event before freeSolutionSeq(&seq). Differs if first makeSolutionSeq or executeSolutionSeq failed.
Also, when I search for "eventWaitList, &first" in sources - there is more functions with unreleased events, all these events come to "step->event = events + j;" in makeSolutionSeq, so can be freed automatically somewhere in freeSolutionSeq -> freeSolutionStep -> releaseStepImgs, but I don't see clReleaseEvent() calls. Someone must check this, I don't know code well enough.
Hi @ache7
I have made a new branch in my fork that fixes the many events you mention in this thread. It passes my unit tests.
If you have time, would you mind testing in your environment? If not, I'll merge my branch as it's already passing my tests.
Sorry, I don't use library directly, only through other libraries (from cltorch), so can't test it thoroughly. Seems that neural nets use only xdot() from functions with event leaks.
Thanks for replying; I'll close your PR and merge in my fixes. I think it should square you away.