You can’t have shared memory of size 1000x1000.
It is limited to 16KB per block. (However you can operate on a 1000x1000 sized global memory array using shared memory :smile: )
Shared memory had block scope only. Which means data written in to shared memory by one block will not be available for the next block.
If you are trying to use/learn shared memory for the first time, I will recommend you to read the following presentation from Mark Harris.