Where does the kernel resides?

Hi guys, does anybody knows where does the kernel actually resides?, I know that the kernel parameters reside in shared memory, as well as the constants threadsIdx, blockIdx, etc… but were does the kernel instruccions reside??

It looks that there is a limit in the size of the kernel (2 million PTX instructions), (CUDA Programming Guide 2.2, pag 101), has anybody reached this limit??

Thanks!

Kernel code resides in global memory. There’s a small instruction cache per SM, I believe.