Share OpenCL buffers between processes

Suggestion for a next release: a way to share OpenCL buffers between processes, that is for instance:

  • allocate a buffer with clCreateBuffer with a memory region on the GPU

  • send the resulting cl_mem object to another process

  • use the cl_mem object from the second process to access the same memory region in the GPU.

Stéphane Letz

Memory objects are associated with an OpenCL context which is created by a thread running in a process. Therefore, the specification does not provide a way to share CL buffers between processes.