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

support auto generate for layer_norm #52008

Closed
wants to merge 3 commits into from

Conversation

Liyulingyue
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

#51842 case8

@paddle-bot
Copy link

paddle-bot bot commented Mar 22, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Mar 22, 2023
func : layer_norm
data_type : x
backward : layer_norm_grad
optional : scale, bias
Copy link
Contributor

Choose a reason for hiding this comment

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

增加varianceintermediate属性,参考send_ue_recv算子

@@ -847,6 +847,17 @@
optional : master_param, skip_update, beta1_pow_out, beta2_pow_out, master_param_outs
inplace : (param -> param_out), (moment1 -> moment1_out), (moment2 -> moment2_out), (beta1_pow -> beta1_pow_out), (beta2_pow -> beta2_pow_out), (master_param -> master_param_outs)

- op : layer_norm
args : (Tensor x, Tensor scale, Tensor bias, float epsilon, int begin_norm_axis)
Copy link
Contributor

Choose a reason for hiding this comment

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

增加epsilon begin_norm_axis的默认值


// NOTE(jiahongyu): Below codes originally enclosed by PADDLE_WITH_MKLDNN
int begin_norm_axis = ctx.Attr<int>("begin_norm_axis");
if (begin_norm_axis !=
Copy link
Contributor

Choose a reason for hiding this comment

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

这个算子的GetExpectedKernelType需要invoke,可以参考算子frobenius_norm

DECLARE_NO_NEED_BUFFER_VARS_INFERER(LayerNormGradNoNeedBufferVarInferer,
"Bias");

class LayerNormCompositeGradOpMaker : public prim::CompositeGradOpMakerBase {
Copy link
Contributor

Choose a reason for hiding this comment

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

十分抱歉! 这个算子很复杂,暂时不要修改这个,这个算子任务关闭

Copy link
Contributor Author

Choose a reason for hiding this comment

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

十分抱歉! 这个算子很复杂,暂时不要修改这个,这个算子任务关闭

收到~

@paddle-bot
Copy link

paddle-bot bot commented Mar 23, 2023

很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。
Sorry to inform you that through our discussion, your PR fails to meet the merging standard (Reference: Paddle Custom Operator Design Doc). You can also submit an new one. Thank you.

@Liyulingyue Liyulingyue deleted the static_test_8 branch March 23, 2023 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants