Nvidia Introduces CuDNN, a CUDA-based Library for Deep Neural Networks
infoq.com
infoq.com
In general, the question which is the fastest public implementation of spatial convolution is so heavily dependent on the kernel parameters (and even then, there are often knobs you can twiddle for a given implementation that can lead to substantial speedups), how much GPU memory you want to spend (GEMM and FFT based methods), so the best approach is probably just to benchmark a bunch of implementations for your network and just choose the best.
Then again these figures are also kind of meaningless, as the specifics of the experiments were not specified. There are a lot of parameters that affect the performance of different implementations in various ways: the number of input feature maps, the number of filters, filter width/height, input width/height. The FFT-approach tends to do well for large filter sizes and lots of input feature maps, for example.
I've played around with cudnn a bit using Theano. The Theano bindings are a work in progress, but so far they've already wrapped the convolution. Compared to conv_gemm (Theano's version of Caffe's GEMM convolution approach), it seems to be sometimes faster, sometimes slower. Soumith Chintala maintains a GitHub repository with benchmarks of various convolution implementations: https://github.com/soumith/convnet-benchmarks His results aren't that spectacular either.
In my own experiments cuDNN did pretty well for very small filter sizes (i.e. 3x3), often beating even the memory-hungry FFT approach). This is great because the top two scoring entries in the 2014 ImageNet competition made use of lots of convolutional layers with small filters.
Of course the main benefit of cuDNN is that it will become faster over time, and that it will always be adapted to the latest NVIDIA GPUs without requiring code changes (provided that they keep maintaining it).
And IMO this opens up the window for future GPUs to do even better. That said, when 9 TFLOPs is ~$1,100 (2 x GTX 980), I'm not too worried about memory usage in the long term.
Although, I guess the cutoff might have to be a bit higher than 8.23. Maybe the neuron activations would never exceed that range, but some intermediate computations could.
Supposedly the new Maxwell GPUs have some new instructions for working with half-precision floats ( https://developer.nvidia.com/sites/default/files/akamai/open... ). I wonder how complete this implementation is, because half-precision might be sufficient to train a convnet, and this would result in a significant speedup.
You also cant clip them and get away with it, you have to either renormalize the layers to do half-precision (and live with the extra cost) or stick to full-precision. I was doing fun stuff early this year that did fixed-precision nets (8-bit/16-bit). Things get very interesting :)
http://en.wikipedia.org/wiki/Half-precision_floating-point_f...
That's plenty IMO for most inputs and weights. Where it gets tricky is in accumulation. You could constrain the weights for each unit I guess, but this is the sort of work best done under the hood rather than by the data scientist IMO. I'd personally choose 32-bit accumulation just because it would drastically simplify code development.
I've also worked with fixed precision elsewhere. It's awesome if you understand the dynamic range of your application. It's a migraine headache if you don't.
IMO What remains to be seen is what one could do with FP16 data mixed with FP32 accumulation. My signal processing friends think a pure FP16 network is just asking for trouble and are of the opinion that a minimum of 20 bits is needed for stable accumulation and 24 is more than enough. That's not far off from Teradeep's 8-bit data plus 16-bit accumulators for image data.
That said, IOS 8 exposes WebGL, no?
http://www.theregister.co.uk/2014/09/17/after_20_years_apple...
I say this because you could write a neural network engine entirely in WebGL given it's mostly SGEMM, convolutions, and RMW kernels.