It seems that the new OpenCL runtime of the K2H platform does not deallocate __local memory after use. Consider two different kernels:
__kernel void foo(...)
{
__local char some_array[767 * 1024];
...
}
and
__kernel void bar(...)
{
__local char other_array[2 * 1024];
...
}
The memory is allocated from the 768K L2 area. After foo() has finished, the runtime could deallocate "some_array", so that bar() could reuse the memory. But this is not the way it is implemented; the application runs out of memory and aborts. Is there a fix or work-around for this (other than not allocating anything at all and just using memory starting from 0x00800000?)
Thanks, John Romein