cuDNN: Problems finding conv forward algorithm

cuDNN v8.2, CUDA 11.3, Windows, Driver 466.27

All tensors NCHW formatted.
Input dimensions: (2, 3, 4, 4)
Kernel dimensions: (5, 3, 3, 3)
Padding: 1, 1
Stride: 1, 1
Dilation: 1, 1

I have tried to look for the fastest algorithm in this case:

  1. cudnnGetConvolutionForwardAlgorithm_v7
    The API suggests the fastest algorithm is CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM which fails with CUDNN_STATUS_BAD_PARAM when it comes to actual forward convolution.

    This algorithm works fine when padding is set to (0, 0).

  2. cudnnFindConvolutionForwardAlgorithm returns CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_GEMM (which works!) but I’ve also seen it return CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD which fails.

I haven’t noticed any problems with cudnnGetConvolutionBackwardXXXXAlgorithm_v7 calls, but I guess it’s a good idea to change them to their analogs without the “_v7” suffix.

Hi @fierval ,
Can you please help us with the error logs you are getting.


Here it is:


I believe I know what the problem was, nothing to do with cuDNN. It was “one of those” bugs that you can look for forever and never find. Basically, a namespace I brought in overrode a function from the global namespace and wreaked all kinds of havoc.