How do I use cudnn convolutions with cudnn 8.0?

Hello, I successfully installed CUDA 11.0 and cudnn 8.0.
I am trying to run a repo that uses the function: cudnnGetConvolutionForwardAlgorithm which looks deprecated. What can I substitute it with? Or do you suggest I downgrade my CUDA and cudnn versions? Thank you

Please refer “Table 3. API functions and data types that were removed” in below link, cudnnGetConvolutionForwardAlgorithm is removed in cuDNN 8.0
https://docs.nvidia.com/deeplearning/sdk/cudnn-api/index.html#release-800-preview

You can use cudnnGetConvolutionForwardAlgorithm_v7 https://docs.nvidia.com/deeplearning/sdk/cudnn-api/index.html#cudnnGetConvolutionForwardAlgorithm_v7

For an exhaustive search for the fastest algorithm, use cudnnFindConvolutionForwardAlgorithm()

Thanks

Hello, thank you for the prompt reply. I am a beginner with this library. Is there a simple way to change/cast the parameters to fit the _v7 function, given the “original” function’s parameters?

v7 api gives you multiple choices that you can pick from, sorted by estimated speed.

If you refer to API, most of the params remains same.
https://docs.nvidia.com/deeplearning/sdk/cudnn-archived/cudnn_765/cudnn-api/index.html#cudnnGetConvolutionForwardAlgorithm

The output of cudnnGetConvolutionForwardAlgorithm_v7 is “cudnnConvolutionFwdAlgoPerf_t” which includes the “cudnnConvolutionFwdAlgo_t” as subset along with additional info.

You can also refer to the mnist sample where we have updated to use this v7 api.

Thanks

Hi, I had a followup question about this. I am also using CUDA 11.0 and CuDNN 8.0.

I notice that cudnnGetForwardAlgorithm() allows you to pass in a cudnnConvolutionFwdPreference_t and a memory limit. Previously, I had been able to pass CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT and a workspace limit of 0 to select a convolution algorithm that required no workspace.

Is there a way to select a no-workspace conv algorithm with the v7 api ( cudnnGetForwardAlgorithm_v7() ) ?