Skip to content
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

enable cudnn_convt #4076

Merged
merged 1 commit into from
Sep 13, 2017
Merged

Conversation

chengduoZH
Copy link
Contributor

@chengduoZH chengduoZH commented Sep 13, 2017

fix #4074
fix #2984

@chengduoZH chengduoZH requested a review from lcy-seso September 13, 2017 12:01
@@ -169,6 +169,7 @@ class LayerType(object):
EXCONV_LAYER = 'exconv'
EXCONVTRANS_LAYER = 'exconvt'
CUDNNCONV_LAYER = 'cudnn_conv'
CUDNNCONVTRANS_LAYER = 'cudnn_convt'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个在v1 下是自动判断设置吗?这样修改是不是需要显示地手工指定呢?

Copy link
Contributor Author

@chengduoZH chengduoZH Sep 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看cudnn的conv和convt python代码是同一段,只是在设置上有区别

    if layer_type:
        if dilation > 1 or dilation_y > 1:
            assert layer_type in ["cudnn_conv", "cudnn_convt"]
        if trans:
            assert layer_type in ["exconvt", "cudnn_convt"]
        else:
            assert layer_type in ["exconv", "cudnn_conv"]
        lt = layer_type
    else:
        lt = LayerType.CONVTRANS_LAYER if trans else LayerType.CONV_LAYER

c++代码是同一段,只是在配置上有区别

    ProjectionConfig *conf = new ProjectionConfig();
    if (isDeconv_) {
      conf->set_type("convt");
    } else {
      conf->set_type("conv");
    }

Copy link
Contributor

@lcy-seso lcy-seso Sep 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

曾经有过这个issue #2984 ,和相关的PR,为什么依然不能自动设置呢?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR 是这一个 #3049

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该之前也遇到,如果确认解决,也关闭相关的issue吧。

Copy link
Contributor

@lcy-seso lcy-seso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lcy-seso lcy-seso merged commit aed51dd into PaddlePaddle:develop Sep 13, 2017
@chengduoZH chengduoZH deleted the enable_cudnn_convt branch September 13, 2017 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants