where does the parameters of kernels store?

For example, global void mykernel(float a, int *p) {…}; where does a and p store in? registers or shared memory? Thanks!

in registers ( as far as my kernels are concerned)…

I believe it is shared memory:



From the 2.1 Programming guide section 4.2.3 Execution Configuration Restrictions


Your right JPH4599, Mybad.

its strange though, I always counted my registers including these arguments and the count turned out to be correct. I guess I have to recheck my kernel… :">

arguments are never stored in registers at kernel launch time.

If you look at the code generated for some applications, there are several ld.param PTX instructions which define ‘param’ as an address space. This could be mapped to anything at runtime (it looks like the current implementation maps it to shared memory), but this could be easily changed in the future.

Thanks all. If they are in shared memory, I’m just curious if this kind of kernel works.

global void mykernel(float *A, int lda, float *B, int ldb)


A += lda;

B += ldb;

//read A[0] B[0]



in shared memory. Programer guide had mentioned that, and you can see the usage of shared memory with compile option --ptx or output details to cubin file