CUDNN undocumented exception

Hi!

cudnnGetConvolutionBackwardFilterAlgorithm returns with CUDNN_STATUS_NOT_SUPPORTED for me, which is an undocumented exception, in both https://docs.nvidia.com/deeplearning/sdk/cudnn-developer-guide/index.html#cudnnGetConvolutionBackwardFilterAlgorithm and http://snurran.sics.se/hops/cudnn/CUDNN_Library.pdf.

The CUDNN handle is valid, as it works in other parts of the code.
xDesc was set with: cudnnSetTensor4dDescriptor(*xDescriptor, CUDNN_TENSOR_NHWC, CUDNN_DATA_FLOAT, 1, 3, 375, 1242)
dyDesc was set with: cudnnSetTensor4dDescriptor(*yDescriptor, CUDNN_TENSOR_NHWC, CUDNN_DATA_FLOAT, 1, 3, 375, 1242)
convDesc was set with: cudnnSetConvolution2dDescriptor(*convolutionDescriptor, 1, 1, 1, 1, 1, 1, CUDNN_CROSS_CORRELATION, CUDNN_DATA_FLOAT)
dwDesc was set with: cudnnSetFilter4dDescriptor(*kernelDescriptor, CUDNN_DATA_FLOAT, CUDNN_TENSOR_NCHW, 3, 3, 3, 3)
preference is: CUDNN_CONVOLUTION_BWD_FILTER_PREFER_FASTEST
memoryLimitInBytes is: 0

What could be the problem (also, why doesn’t the documentation have this exception)?

Cheers,
David

I just figured it out: the kernel needs to be in NHWC.

The documentation should mention it I think.