It's easy to force nvcc to use at most 9 registers, but then it'll just spill more into lmem -- there's no way to prevent it from spilling to lmem except changing the algorithm so it demands fewer registers.

But I like your thinking, so I put together another set of experiments--some new, some old--and I got a little carried away so I made a <a href="http://www.accelereyes.com/blog/2010/03/04/median-filtering/" rel="nofollow">new post</a>.

Thanks for the suggestion!
  -jm