I need to find reference or description regarding workspace that is provided to cudnnConvolutionForward
, cudnnConvolutionBackwardData
, cudnnConvolutionBackwardFilter
familiy of functions.
Can I reuse the workspace for next calls/layers assuming that different layers aren't executed in parallel on the GPU?
I'm looking into caffe's implementation of cudnn_conv_layer.cpp and instance of layer allocates its own and separate space for each of 3 functions. Which seems to be wasteful since logically I should be able to reuse the memory for multiple layers/functions.
However I can't find a reference that allows or disallows this explicitly and Caffe keeps separate workspace for each and every layer and I suspect that in total it may "waste" a lot of memory.