OutOfMemoryException in CudafyByExample

Aug 19, 2015 at 12:50 PM
Can't find any thread on this one....

Like many others I am struggling to get Cuda to work, so I switched to OpenCL. Works fine except or running into an out of memory exception on the grapics card.

I noticed everywhere GPGPU was instantiated by a call to CudafyHost.GetDevice, it was never disposed even though it implements IDisposable. Neither were Form instances for the ripples and Julia fractals.

After making sure all disposables were disposed my out of memory exceptions were gone. I put locally instantiated variables into a using construct, I converted classes containing field instances into IDisposable implementations and disposed the fields in their respective Dispose methods.

Hope others running into this problem are helped with it.

kind regards, benzhi