torch/cunn — pull request #30 by nicholas-leonard (2014-10-06 01:19:38+00:00)
Title: SpatialMaxPooling can handle (dW != kW) or (dH ~= kH)

This PR allows SpatialMaxPooling to handle cases where the pooling strides don't equal the commensurate kernel sizes. It includes an additional unit test. It keeps using the previous `update_gradInput` kernel when strides and kernel sizes are equal. Otherwise, it uses a kernel that makes use of CUDA's `atomicadd` function.