How to care registers?

Hi,

My kernel takes 50 register so its occupancy becomes 0.25( when I checked occupancy calculator). I want to reduce my register uses.

In general what should take care to reduce register uses in any kernel?

People say declaring local variables as volatile helps… Check out,.

I declare my local varible as volatile but still I got the same register count.

Did you use the excel occupancu calculator or the one from the visual profiler?
How do you know it’s 50, did you check the PTX output (wrong), or the visual profiler?

N.

I have checked it on visual profiler.

Must be one inefficient kernel then… maybe you could try to split it up into some smaller kernels, or use shared memory to store intermediate results.

N.