I need to process some data for a long time in OpenCL, and due to time limitation (the driver automatically restarts) I start the kernel many times with different parameters. Each time it has to process the same data, which is about 50 Mb, so I want to copy it only once. I’ve read many articles and tutorials about OpenCL, but have no idea about how to do this, to keep the data between execution.
If it’s important, I use C# binding for OpenCL called OpenCLTemplate.
Any data that you store in a global memory buffer will persist on the GPU. You don’t need to do anything special.