pytorch中_cudnn_convolution_full_forward的定义在哪里

where is the definition of _cudnn_convolution_full_forward in pytorch

正如标题所说,我想找到_cudnn_convolution_full_forward的定义,但我搜索了所有项目 在 pytorch 中失败了。而且我找不到关于此功能的文档。

谁能帮帮我?

这里定义了所有的cudnn卷积函数: https://github.com/pytorch/pytorch/blob/1848cad10802db9fa0aa066d9de195958120d863/aten/src/ATen/native/cudnn/Conv.cpp

最新版本的pytorch已经没有这个功能了。最接近的是 cudnn_convolution_forward。在 0.1.12 版本中,函数在同一个文件中: https://github.com/pytorch/pytorch/blob/v0.1.12/torch/csrc/cudnn/Conv.cpp

我建议不要使用 unpublic api(以 _ 开头的方法)并改用 public 方法,但您可能已经知道.

换句话说,你应该使用

torch.backends.cudnn.enabled = True

然后是 conv2dconv3d,具体取决于您的用途。