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

[AMP Prim OP]support some prim ops for bf16 dtype part3 #54368

Merged

Conversation

Charles-hit
Copy link
Contributor

PR types

Others

PR changes

Others

Description

Pcard-66975
PR改动:
1.支持assign, erf, fill_any_like, flatten, index_select, top_k, transpose组合算子bf16dtype并添加单测。
2.修复top_k bf16单测报错的问题,由于该算子在numpy端是用fp32进行计算,paddle是移位后变成bfloat16计算,可能会导致结果不一致,所以将numpy端计算时尾数进行移位舍弃计算。

@paddle-bot
Copy link

paddle-bot bot commented Jun 5, 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.

cyber-pioneer
cyber-pioneer previously approved these changes Jun 7, 2023
Copy link
Contributor

@cyber-pioneer cyber-pioneer left a comment

Choose a reason for hiding this comment

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

LGTM

@Charles-hit Charles-hit merged commit e64a18d into PaddlePaddle:develop Jun 8, 2023
@Charles-hit Charles-hit deleted the support_bf16_for_primops_part3 branch June 8, 2023 07:14
Charles-hit added a commit to Charles-hit/Paddle that referenced this pull request Jun 13, 2023
phlrain pushed a commit that referenced this pull request Jun 14, 2023
* [AMP Prim OP]support some prim ops for bf16 dtype part3 (#54368)

* support some prim ops bf16 dtype

* fix cmake

* [AMP Prim OP]support some prim ops for bf16 dtype part5 (#54422)

* support some prim ops for bf16 dtype

* remove useless code

* support some prim ops bf16 dtype (#54399)
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.

None yet

2 participants