The FFT benchmark leaks some of the resources allocated. On NVIDIA, this quickly exhausts the GPU memory when running the benchmark a few times with a large dataset. NVIDIA's OpenCL implementation doesn't seem to really release memory objects unless everything else has been released (see http://bloerg.net/2013/01/15/opencl-resource-management.html). This commit seems to plug the leaks. Please apply.
The FFT benchmark leaks some of the resources allocated. On NVIDIA, this quickly exhausts the GPU memory when running the benchmark a few times with a large dataset. NVIDIA's OpenCL implementation doesn't seem to really release memory objects unless everything else has been released (see http://bloerg.net/2013/01/15/opencl-resource-management.html). This commit seems to plug the leaks. Please apply.