-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make cudnn convolution layer and projection support for dilation #3629
Make cudnn convolution layer and projection support for dilation #3629
Conversation
paddle/cuda/src/hl_cuda_cudnn.cc
Outdated
mode, | ||
data_type)); | ||
#else | ||
if (dilation_h > 1 || dilation_w > 1) { | ||
LOG(FATAL) | ||
<< "Current cudnn version does't support for dilation convolution."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Current cuDNN version does't support for dilation convolution. The dilation convolution requires cuDNN >= v6.0."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
testProjectionConv(1, true); | ||
testProjectionConv(3, true); | ||
/// testProjectionConv(1, true); | ||
/// testProjectionConv(3, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -870,12 +871,15 @@ def __init__(self, | |||
caffe_mode=True, | |||
filter_size_y=None, | |||
padding_y=None, | |||
dilation_y=None, | |||
stride_y=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to move dilation=None
and dilation_y=None
to last line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
dilation_y = dilation | ||
|
||
if dilation > 1 or dilation_y > 1: | ||
assert layer_type in ["cudnn_conv", "cudnn_convt"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the layer_type =None
, this line will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -2340,13 +2340,15 @@ def img_conv_layer(input, | |||
groups=1, | |||
stride=1, | |||
padding=0, | |||
dilation=0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 by defalut.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
* add flops
fix #3628