提交 bc65b241 authored 作者: --global's avatar --global

Change default DnnConvGrad implementation

上级 ebf020a3
...@@ -356,7 +356,7 @@ AddConfigVar('dnn.conv.workmem', ...@@ -356,7 +356,7 @@ AddConfigVar('dnn.conv.workmem',
AddConfigVar('dnn.conv.workmem_bwd', AddConfigVar('dnn.conv.workmem_bwd',
"Default value for the workmem attribute of cudnn gradient " "Default value for the workmem attribute of cudnn gradient "
"convolutions.", "convolutions.",
EnumStr('deterministic', 'none', 'fft', 'guess'), EnumStr('none', 'deterministic', 'fft', 'guess'),
in_c_key=False) in_c_key=False)
......
...@@ -53,8 +53,8 @@ for (int i = 0; i < 5; i++) ...@@ -53,8 +53,8 @@ for (int i = 0; i < 5; i++)
// implementations should be selected based on the size of the data. // implementations should be selected based on the size of the data.
APPLY_SPECIFIC(previous_algo) = CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM; APPLY_SPECIFIC(previous_algo) = CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM;
#if defined(CUDNN_VERSION) && CUDNN_VERSION >= 3000 #if defined(CUDNN_VERSION) && CUDNN_VERSION >= 3000
APPLY_SPECIFIC(previous_bwd_f_algo) = CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1; APPLY_SPECIFIC(previous_bwd_f_algo) = CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0;
APPLY_SPECIFIC(previous_bwd_d_algo) = CUDNN_CONVOLUTION_BWD_DATA_ALGO_1; APPLY_SPECIFIC(previous_bwd_d_algo) = CUDNN_CONVOLUTION_BWD_DATA_ALGO_0;
#endif #endif
#section cleanup_code_struct #section cleanup_code_struct
......
...@@ -147,7 +147,7 @@ APPLY_SPECIFIC(conv_gi)(CudaNdarray *kerns, CudaNdarray *output, ...@@ -147,7 +147,7 @@ APPLY_SPECIFIC(conv_gi)(CudaNdarray *kerns, CudaNdarray *output,
if (stride_v != 1 || stride_h != 1 || input_h > 1024 || if (stride_v != 1 || stride_h != 1 || input_h > 1024 ||
input_w > 1024 || (filter_h == 1 && filter_w == 1)) input_w > 1024 || (filter_h == 1 && filter_w == 1))
{ {
chosen_algo = CUDNN_CONVOLUTION_BWD_DATA_ALGO_1; chosen_algo = CUDNN_CONVOLUTION_BWD_DATA_ALGO_0;
} }
} }
......
...@@ -147,7 +147,7 @@ APPLY_SPECIFIC(conv_gw)(CudaNdarray *input, CudaNdarray *output, ...@@ -147,7 +147,7 @@ APPLY_SPECIFIC(conv_gw)(CudaNdarray *input, CudaNdarray *output,
if (stride_v != 1 || stride_h != 1 || input_h > 1024 || if (stride_v != 1 || stride_h != 1 || input_h > 1024 ||
input_w > 1024 || (filter_h == 1 && filter_w == 1)) input_w > 1024 || (filter_h == 1 && filter_w == 1))
{ {
chosen_algo = CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1; chosen_algo = CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0;
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论