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

[Prim][PIR] Support the dynamic shape for layer_norm_grad #68274

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from

Conversation

zeroRains
Copy link
Contributor

@zeroRains zeroRains commented Sep 17, 2024

PR Category

Operator Mechanism

PR Types

New features

Description

为layer_norm_grad添加动态shape支持,Mac和cpu精度不足

Copy link

paddle-bot bot commented Sep 17, 2024

你的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 the contributor External developers label Sep 17, 2024
@CLAassistant
Copy link

CLAassistant commented Sep 18, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@zeroRains zeroRains requested a review from phlrain as a code owner September 21, 2024 05:51
if (bias_ptr->dtype() == phi::DataType::FLOAT16 ||
bias_ptr->dtype() == phi::DataType::BFLOAT16) {
bias_grad_tmp = cast<T>(bias_grad_tmp, bias_ptr->dtype());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的判断逻辑有一个函数ConvertoMT可以使用

Copy link
Contributor Author

Choose a reason for hiding this comment

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

不行吧,我看ConvertoMT里面用是将半精度转成float32,但是这个部分是从float32转回半精度

}
set_output<T>(bias_grad_tmp, bias_grad);
} else {
bias_grad = nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

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

动静shape 相同的代码只写一份吧

@@ -49,6 +49,7 @@
"pd_op.gather_nd",
"pd_op.gelu",
"pd_op.hardswish",
"pd_op.layer_norm",
Copy link
Contributor

Choose a reason for hiding this comment

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

反向动态shape 基本支持完备了,可以看看怎么删除这个list吧

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Oct 18, 2024
@PaddlePaddle PaddlePaddle unlocked this conversation Oct 18, 2024
Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

paddle-ci-bot bot commented Nov 4, 2024

Sorry to inform you that 6b46c2b's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

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.

3 participants