Fermi Question: How do I tell the nvcc compiler that I am using 48 K of shared memory?

Hi All,

I am trying to run a program on a Fermi card, configured at runtime with 48 K of shared memory and 16 KB of L1 (I plan to use the cuda runtime function to modify the shared memory/L1 cache size parameters.)

Now, I wrote a program anticipating 48 KB of shared memory (the shared memory footprint was more than 16 KB). Now nvcc complains that I am using excessive memory. How do I inform the compiler that I plan to use 48 KB instead of 16 KB of shared memory?

Thanks!
Rajesh

I read the manual again- The default is 48 KB of shared memory and 16 KB of L1. So, the problem is with my code.

-regards,
Rajesh

Are you passing -arch sm_20 ?

I am using the default Makefile/common.mk from the nvidia SDK. I think it uses arch_20. I will check.

Thanks for letting me know about the flag!

-rajesh

Bad idea, that makefile is incomprehensible.
I strongly suggest that you write your own.