I've downloaded Cloo, and modified the sample of VectorAdd adding a simple for loop in commands.Execute and changing the last parameter to null…
The thing is, used memory grows and grows. As far as i can tell, this is happening with latest ATI drivers, Intel opencl drivers for CPU, and, apparently, not with NVIDIA drivers (a friends computer).
Can anybody help me? Is it not possible to use Cloo with ATI gpu's or Intel OpenCL?
Thanks a lot in advance.
Ok, It seems that, luckily, i have finally got a workaroung (crappy, and not elegant) that makes it work.
So instead of using the compiled library, i have added the 0.9.1 Cloo project, to my project, and following the tip given in this post http://permalink.gmane.org/gmane.comp.python.opencl/1116 I have added the following lines
In the cloo project, ComputeCommandQueue.cs, i have added a static int variable, that will do the job of a counter
static int _counterOfExecutions = 0;
The, in Execute method I use this counter so, with each execution, I uncrement it, and when it reaches, for instance, 100, reset to 0 and then call this.Finish(). This, seems to free some extra resource created each time the method is executed.
Hope it helps.
Log in to post a comment.