torch/cunn — pull request #17 by jonathantompson (2014-06-27 16:47:33+00:00)
Title: added a max call for SM 2.0 restrictions.

We have been using SM 3.5 as our CUDA compile target. As such, we had no problem allocating a massive block size:

http://en.wikipedia.org/wiki/CUDA

Technical specifications	Compute capability (version)
Maximum x-, y-, or z-dimension of a grid of thread blocks	65535 <= 2.x,	2^31-1 >= 3.0

It seems the new cunn is still stuck on 2.0. Is there a reason why we haven't updated the target yet? I assume it is for backwards compatibility, but I wonder if it isn't time to modify CMake with the updated cuda target.

In any case, this pull request fixes SpatialUpSamplingNearest when large inputs are used (the unit test didn't catch this case).