参考:https://zhuanlan.zhihu.com/p/37050387
我的环境:
VS2013 + cuda_9.0.176_win10.exe + cudnn-9.0-windows10-x64-v7.6.4.38.zip +
https://github.com/Microsoft/caffe
cudnn.hpp(114): error : too few arguments in function call
解决方法:
修改cudnn.hpp以下函数:
template <typename Dtype>
inline void setConvolutionDesc(cudnnConvolutionDescriptor_t* conv,
cudnnTensorDescriptor_t bottom, cudnnFilterDescriptor_t filter,
int pad_h, int pad_w, int stride_h, int stride_w) {
CUDNN_CHECK(cudnnSetConvolution2dDescriptor(*conv,
pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
}
改成:
template <typename Dtype>
inline void setConvolutionDesc(cudnnConvolutionDescriptor_t* conv,
cudnnTensorDescriptor_t bottom, cudnnFilterDescriptor_t filter,
int pad_h, int pad_w, int stride_h, int stride_w) {
#if CUDNN_VERSION_MIN(6, 0, 0)
CUDNN_CHECK(cudnnSetConvolution2dDescriptor(*conv,
pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION,
dataType<Dtype>::type));
#else
CUDNN_CHECK(cudnnSetConvolution2dDescriptor(*conv,
pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
#endif
}
本文详细介绍了在使用CUDA和cuDNN进行卷积运算时遇到的错误:'toofewargumentsinfunctioncall',并提供了针对cudnn.hpp文件中setConvolutionDesc函数的修改方案,以解决CUDA版本6.0及更高版本中的兼容性问题。

1万+

被折叠的 条评论
为什么被折叠?



