Is there any way to ensure that a shared array persists between calls of the same kernel? If so, in witch conditions it is guaranteed?
In my program, i was always saving a shared array (512 bytes) into global memory before the block finishes, and i read it back when the next block start. Today, i have removed this step and the algorithm keeps running correctly, proving that the shared array did persist between kernel lauches (persistence happens only between blocks with same Id, of course). I got 3% speedup.
My GPU has 4 MP’s and I launch 8 blocks in each kernel invocations. I just wanna know if there is any way to garantee that the shared memory persist (ex.: Block Count <= 2 x MP’s).
The Programming Guide states that “The global, constant, and texture memory spaces are persistent across kernel launches by the same application.”. Nothing is told about shared memory.
The topic http://forums.nvidia.com/index.php?showtop…rt=#entry509815 says that “shared memory only has the lifetime of a single block”.
Any help is appreciated.
Thanks in advance.