You are not logged in.

#1 2012-03-24 20:03:39

yl3dy
Member
Registered: 2011-07-27
Posts: 19

PyOpenCL - leaking memory at each kernel execution

I found a frustrating problem in pyopencl - after each kernel execution host memory consumption increases by approx 1.5 MB. Taking  into account program workflow (modelling some amount of iterations on card, finishing kernel, reading data via enqueue_copy, writing it to file, then starting kernel again), I run out of my 4 GB of RAM after some thousands of such calls.

In a previous project which was on C++ I solved this problem this way. An event object was dynamically created and passed to enqueueNDRangeKernel(). After reading data from GPU event object was deleted. But in Python it's impossible to use this method.

Also it's worth to notice that the memory leak occures when using both CPU or GPU. I'm using Intel CPU and nVidia GPU.

What can be done to fix the problem?

Offline

Board footer

Powered by FluxBB