@@ -97,7 +97,7 @@ function ∇conv_data!(dx::DenseCuArray{T}, dy::DenseCuArray{T}, w::DenseCuArray
97
97
alpha, beta = scalingParameter (T,alpha), scalingParameter (T,beta);
98
98
convDesc, dx, depad = cudnnConvolutionDescriptorAndPaddedInput (cdims, dx)
99
99
xDesc, yDesc, wDesc = cudnnTensorDescriptor (dx), cudnnTensorDescriptor (dy), cudnnFilterDescriptor (w)
100
- p = cudnnConvolutionBwdDataAlgoPerf (wDesc, w, yDesc, dy, convDesc, xDesc, dx)
100
+ p = cudnnConvolutionBwdDataAlgoPerf (wDesc, w, yDesc, dy, convDesc, xDesc, dx, beta != 0 )
101
101
with_workspace (p. memory) do workspace
102
102
cudnnConvolutionBackwardData (handle (), alpha, wDesc, w, yDesc, dy, convDesc, p. algo, workspace, sizeof (workspace), beta, xDesc, dx)
103
103
end
@@ -115,7 +115,7 @@ function ∇conv_filter!(dw::DenseCuArray{T}, x::DenseCuArray{T}, dy::DenseCuArr
115
115
alpha, beta = scalingParameter (T,alpha), scalingParameter (T,beta);
116
116
convDesc, x, _ = cudnnConvolutionDescriptorAndPaddedInput (cdims, x)
117
117
xDesc, yDesc, wDesc = cudnnTensorDescriptor (x), cudnnTensorDescriptor (dy), cudnnFilterDescriptor (dw)
118
- p = cudnnConvolutionBwdFilterAlgoPerf (xDesc, x, yDesc, dy, convDesc, wDesc, dw);
118
+ p = cudnnConvolutionBwdFilterAlgoPerf (xDesc, x, yDesc, dy, convDesc, wDesc, dw, beta != 0 );
119
119
with_workspace (p. memory) do workspace
120
120
cudnnConvolutionBackwardFilter (handle (), alpha, xDesc, x, yDesc, dy, convDesc, p. algo, workspace, sizeof (workspace), beta, wDesc, dw);
121
121
end
0 commit comments