where kernel parameters are stored? where data stored if register spill happens


I have a couple of questions. Can some one please answer these.

  1. where do the kernel parameters stored? What are the limitations on the kernel parameters? (I need for fermi, kepler and maxwell).

  2. if register spilling happens where do they stored? (I need for fermi, kepler and maxwell).


Kernel arguments are passed in a particular bank of constant memory, for the architectures enumerated. Size limitation I don’t know off hand, but it is probably listed in the CUDA documentation. Have you checked it? You could also run an experiment using kernels with an increasing number of arguments.

When registers get spilled, their data is stored to local memory, which is a thread-local mapping of a portion of global memory. This applies to all the architectures enumerated.

From http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#function-parameters

E.2.5.3. Function Parameters

global function parameters are passed to the device via constant memory and are limited to 4 KB.

device and global functions cannot have a variable number of arguments.

Compute Capability 1.x devices passed parameters which were preloaded into shared memory. The limit was 256 bytes.