Specify conv algorithm in backend API

When I read the source code of PyTorch, I noticed they used CuDNN backend API as

cudnnBackendExecute(handle, plan.get_raw_desc(), variantPack.get_raw_desc());

I wonder, is it possible to use cudnnBackendSetAttribute to choose a specific conv algorithm in this case? Like CUDNN_CONVOLUTION_FWD_ALGO_FFT for instance.

Hi @xhaoke ,
I believe you may get better assistance for the query on Pytorch Forum.

Thank You.

Thank you for your response.

I have a query concerning the cuDNN backend API. Irrespective of how PyTorch interfaces with it, I’m curious to know if it’s feasible to retrieve or specify the convolution algorithm directly within the backend API, similar to the capabilities available in the cuDNN frontend API. My inquiry is strictly related to cuDNN functionalities.

I checked the log of cuDNN backend API and get no information which conv algorithm it executes. Is it possible to at least know which conv algorithm cuDNN was using?

i! convDesc: type=CUDNN_BACKEND_CONVOLUTION_DESCRIPTOR:
i! computeType: type=cudnnDataType_t; val=CUDNN_DATA_FLOAT (0);
i! mode: type=cudnnConvolutionMode_t; val=CUDNN_CROSS_CORRELATION (1);
i! nbDims: type=int; val=2;
i! upperPadA: type=int; val=[1,1];
i! lowerPadA: type=int; val=[1,1];
i! strideA: type=int; val=[1,1];
i! dilationA: type=int; val=[1,1];