-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
func : layer_norm | ||
data_type : x | ||
backward : layer_norm_grad | ||
optional : scale, bias |
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.
增加variance
的intermediate
属性,参考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) |
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.
增加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 != |
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.
这个算子的GetExpectedKernelType
需要invoke,可以参考算子frobenius_norm
DECLARE_NO_NEED_BUFFER_VARS_INFERER(LayerNormGradNoNeedBufferVarInferer, | ||
"Bias"); | ||
|
||
class LayerNormCompositeGradOpMaker : public prim::CompositeGradOpMakerBase { |
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.
十分抱歉! 这个算子很复杂,暂时不要修改这个,这个算子任务关闭
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.
十分抱歉! 这个算子很复杂,暂时不要修改这个,这个算子任务关闭
收到~
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
PR types
Others
PR changes
Others
Describe
#51842 case8