-
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
[Prim][PIR] Sink layer_norm forward prim rule #58679
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
3a200a9
to
012e850
Compare
|
||
|
||
# xshape output will no longer used after decomp, but return none to keep output num the same as origin op | ||
decomp_output_unused_op = ["squeeze", "unsqueeze"] |
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.
有算子拆解后,部分intermediate 输出将不再需要,组合机制里不再生成这些输出。
python/paddle/base/core.py
Outdated
@@ -503,6 +503,8 @@ def _get_batch_norm_none_var(op): | |||
"unsqueeze2": ["XShape"], | |||
} | |||
|
|||
pir_ops_contain_none = ["pd_op.squeeze", "pd_op.unsqueeze"] |
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.
这儿最好加一下注释表示中间输出拆解后可能部分算子会变为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.
ok
@@ -503,6 +503,9 @@ def _get_batch_norm_none_var(op): | |||
"unsqueeze2": ["XShape"], | |||
} | |||
|
|||
# some intermediate outputs like xshape will no longer used after decomp, but return none to keep output num the same as origin op | |||
decomp_ops_list_contain_unused_output = ["pd_op.squeeze", "pd_op.unsqueeze"] |
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.
这儿后续可以放到decomposition
目录下
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.
后续会自动生成,放在这个目录下面
* pir sink decomp support symbol overload * fix code * move layer_norm * support layer_norm op * fix code * add type cast * remove unused code * fix code * fix code
PR types
Others
PR changes
Others
Description
Pcard-66975
Sink layer_norm forward prim rule