BVLC/caffe — pull request #1291 by shelhamer (2014-10-16 00:32:52+00:00)
Title: Share convolution buffers to reduce memory usage

Share the columnation buffer for im2col / col2im transformations across all Caffe convolution layers. The memory usage is now equal to the maximum buffer size instead of the sum over all layers. In particular this is useful for many-layered architectures like the VGG ILSVRC14 19 layer model.

Advice and Cautions:

- This is worth it for fully-convolutional models where Caffe convolution is faster than cuDNN.
- No parallelism. Only a single net can do forward / backward at a time. As the buffer is shared by all layers within and across nets, no convolution can be done in parallel. (A fix for parallel nets is to make the buffer a member of net. DAG parallelism is still out in that case, but isn't currently parallelized anyway.)
- This has no effect on cuDNN convolution, but that consumes less memory anyway.

**Do not merge.**