When I execute work-items with clEnqueueNDRangeKernel and then I wait with clFinish, the next time I call clEnqueueNDRangeKernel can I expect the local memory is that of previous computations?
The content of the shared memory is undefined when you launch a kernel. All kinds of things could have happened between the first kernel finishing and the new kernel starting.
dmeaiser is right. Content needs to brought to LDS before using it. As such you have LDS per compute unit and i dont think we can figure out which workgroup runs on what compute unit or in what order.
Thank you, meanwhile I understood that I didn't need that and that if local memory behaved like I described it wouldn't be "local" anymore but global.
Retrieving data ...