提交 97f0ec23 编写于 作者: Q qingqing01 提交者: Tao Luo

Fix compiling error with cuDNN 5.1 (#17458)

test=develop
上级 3d4e8268
...@@ -183,15 +183,17 @@ class ConvolutionDescriptor { ...@@ -183,15 +183,17 @@ class ConvolutionDescriptor {
CUDNN_ENFORCE(dynload::cudnnSetConvolutionNdDescriptor( CUDNN_ENFORCE(dynload::cudnnSetConvolutionNdDescriptor(
desc, pads.size(), pads.data(), strides.data(), dilations.data(), desc, pads.size(), pads.data(), strides.data(), dilations.data(),
CUDNN_CROSS_CORRELATION, compute_type)); CUDNN_CROSS_CORRELATION, compute_type));
CUDNN_ENFORCE(platform::dynload::cudnnSetConvolutionMathType(
desc, CUDNN_DEFAULT_MATH));
#if CUDNN_VERSION_MIN(7, 0, 1) #if CUDNN_VERSION_MIN(7, 0, 1)
CUDNN_ENFORCE( CUDNN_ENFORCE(
platform::dynload::cudnnSetConvolutionGroupCount(desc, groups)); platform::dynload::cudnnSetConvolutionGroupCount(desc, groups));
#if CUDA_VERSION >= 9000 && CUDNN_VERSION_MIN(7, 0, 1)
CUDNN_ENFORCE(platform::dynload::cudnnSetConvolutionMathType(
desc, CUDNN_DEFAULT_MATH));
if (dtype == CUDNN_DATA_HALF) { if (dtype == CUDNN_DATA_HALF) {
CUDNN_ENFORCE(platform::dynload::cudnnSetConvolutionMathType( CUDNN_ENFORCE(platform::dynload::cudnnSetConvolutionMathType(
desc, CUDNN_TENSOR_OP_MATH)); desc, CUDNN_TENSOR_OP_MATH));
} }
#endif
#endif #endif
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册