Is there a way to set the maximum #of reg?

I want to limit the #reg per thread to increase the occupancy.
Is there a way to set this upper limit in nvcc?

Thanks.

You can use nvcc -maxrregcount command-line switch.

Disclaimer: Limiting the number of registers often leads to use of local memory which will very likely kill performance (more than low occupancy)