Skip to content

[Accuracy diff No.181、182、183] fix maximum_grad minimum_grad bug - #71716

Merged
wanghuancoder merged 15 commits into
PaddlePaddle:developfrom
wanghuancoder:fix_maximum_minimum_grad
Mar 20, 2025
Merged

wanghuancoder merged 15 commits into
PaddlePaddle:developfrom
wanghuancoder:fix_maximum_minimum_grad

Conversation

@wanghuancoder

Copy link
Copy Markdown
Contributor

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

maximum_grad minimum_grad算法对齐Torch。

Pcard-67164

@paddle-bot

paddle-bot Bot commented Mar 17, 2025

Copy link
Copy Markdown

你的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.

// cast, because divide and add kernel is not support bf16 and fp16 on CPU
if (out_grad.dtype() == phi::DataType::BFLOAT16 ||
out_grad.dtype() == phi::DataType::FLOAT16) {
out_grad_copy = cast<T>(out_grad, phi::DataType::FLOAT32);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这个cast 有个统一的库函数,后面可以替换下

@wanghuancoder
wanghuancoder merged commit 6e225b3 into PaddlePaddle:develop Mar 20, 2025
YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request May 7, 2025
* fix maximum_grad minimum_grad bug
@wanghuancoder wanghuancoder changed the title fix maximum_grad minimum_grad bug [Accuracy diff No.181,182,183] fix maximum_grad minimum_grad bug Jun 10, 2025
@luotao1 luotao1 changed the title [Accuracy diff No.181,182,183] fix maximum_grad minimum_grad bug [Accuracy diff No.181、182、183] fix maximum_grad minimum_grad bug Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants