Quick question about parameters Are they loaded up into registers?

Hey guys

if I have an int that is stored on the host, and call the kernel:

int x;


global static void kernel(int x)
int z = x;

How does this work, since x is indeed on the host - unless CUDA caches it somewhere. And if so, is it cached in global memory (meaning really slow access), or since it has a very small footprint maybe its cached as a register or a local?

Parameters are stored in shared memory. 256 bytes is the limit.

So, “x” is actually being copied into shared memory portion allocated for the block by the block scheduler. (this portion is NOT visible to kernel as a shared memory area… its just a parameter)