# Specify conv algorithm in backend API

**URL:** <https://forums.developer.nvidia.com/t/specify-conv-algorithm-in-backend-api/270593>\
**Category:** cuDNN\
**Tags:** cudnn\
**Created:** [October 25, 2023, 5:26am UTC](https://forums.developer.nvidia.com/t/specify-conv-algorithm-in-backend-api/270593 "2023-10-25T05:26:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xhaoke](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xhaoke](https://forums.developer.nvidia.com/u/xhaoke)\
**Post date:** [October 25, 2023, 5:26am UTC](https://forums.developer.nvidia.com/t/specify-conv-algorithm-in-backend-api/270593/1 "2023-10-25T05:26:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AakankshaS](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aakankshas/32/14047_2.png) [@AakankshaS](https://forums.developer.nvidia.com/u/AakankshaS)\
**Post date:** [October 25, 2023, 8:22am UTC](https://forums.developer.nvidia.com/t/specify-conv-algorithm-in-backend-api/270593/2 "2023-10-25T08:22:55Z")

</div>

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

Thank You.

---

<div class="post-metadata">

**Author:** ![xhaoke](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xhaoke](https://forums.developer.nvidia.com/u/xhaoke)\
**Post date:** [October 26, 2023, 5:29am UTC](https://forums.developer.nvidia.com/t/specify-conv-algorithm-in-backend-api/270593/3 "2023-10-26T05:29:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xhaoke](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xhaoke](https://forums.developer.nvidia.com/u/xhaoke)\
**Post date:** [October 26, 2023, 6:25am UTC](https://forums.developer.nvidia.com/t/specify-conv-algorithm-in-backend-api/270593/5 "2023-10-26T06:25:48Z")

</div>

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];
