I had the same problem.
I have Win8, Matlab2015a, CUDA6.5, CUDNN 4rc, and visual studio 2013.
There is a #if condition to handle interface changes between CUDNN4 and older versions.
In order to do so, they use #if inside CHECK() which don't compile for some reason.
CHECK(cudnnAddTensor(handle,
#if (CUDNN_VERSION < 4000)
CUDNN_ADD_SAME_C,
#endif
&alpha,
biasesDesc, biases.getMemory() + biasesGrpOffset,
&beta,
outputDesc, output.getMemory() + outputGrpOffset)) ;
use:
#if (CUDNN_VERSION < 4000)
CHECK(cudnnAddTensor(handle,
CUDNN_ADD_SAME_C,
&alpha,
biasesDesc, biases.getMemory() + biasesGrpOffset,
&beta,
outputDesc, output.getMemory() + outputGrpOffset)) ;
#else
CHECK(cudnnAddTensor(handle,
&alpha,
biasesDesc, biases.getMemory() + biasesGrpOffset,
&beta,
outputDesc, output.getMemory() + outputGrpOffset)) ;
#endif
I also had to add #include <algorithm> for std::max().
I hope this helps.