Arguments of __global__ function is on __local__?

Hi, all,

sorry, for the stupid question… Let I have a kernel:

void global kernel(int N, int M, float *A)
{ … }

are all N, M, A variables local, and very slow, or they definitelly stay on registers?

Thank you!

Sincerely

Ilghiz

Arguments are stored in shared memory. Since all threads typically access the same argument at the same time, it should be broadcast and thus have no bank conflicts.

MisterAnderson42 is right. Check the .ptx file. Kernel arguments should be accessed using ld.param which is shared mem space. The .cubin file lists the reserved space in smem = … If you see lmem != 0 here, some other kernel variables have been moved to local memory because you are out of registers.

Peter

Dear MisterAnderson42 and Peter,

thank you for your kind and helpful answer. Later I will look for .cubin and .ptx more often, thay have important informations.

Sincerely

Ilghiz