Skip to content

Conversation

@Wangzheee
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

支持 preln 结构的ernie模型,增加 preln_emb_eltwise_layernorm_op, preln_skip_layernorm_op 两个op

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

#if IS_TRT_VERSION_GE(7000)
VLOG(4) << "convert fluid PrelnEmbEltwiseLayerNorm op to tensorrt layer";

if (!(engine_->use_oss() && engine_->with_interleaved())) {
Copy link
Member

Choose a reason for hiding this comment

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

能否把判断放到pass部分,这样即便跑不了trt plugin,也不会挂掉。

const framework::Scope& scope, bool test_mode) override {
#if IS_TRT_VERSION_GE(7000)
VLOG(4) << "convert fused preln_skip_layernorm op to tensorrt layer";
if (!(engine_->use_oss() && engine_->with_interleaved())) {
Copy link
Member

Choose a reason for hiding this comment

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

同上

}
}

if (op_type == "fused_preln_embedding_eltwise_layernorm") {
Copy link
Member

Choose a reason for hiding this comment

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

如果没有进入trt,该融合pass没有原生kernel实现,运行时会报错。所以判断是否可以提前到pass阶段?如果不可以,这里可以直接报错了,信息会更明确

}
}

if (op_type == "preln_skip_layernorm") {
Copy link
Member

Choose a reason for hiding this comment

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

同上

Copy link
Member

@shangzhizhou shangzhizhou left a comment

Choose a reason for hiding this comment

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

以上几个问题请提pr修复

@Wangzheee Wangzheee merged commit f31c242 into PaddlePaddle:develop Feb 16, 2022
@Wangzheee
Copy link
Contributor Author

以上几个问题请提pr修复

好的~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants