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 OP&Test] assign op add fp16 、bfp16 test #52233

Merged
merged 6 commits into from
Mar 30, 2023

Conversation

liuzhenhai93
Copy link
Contributor

@liuzhenhai93 liuzhenhai93 commented Mar 28, 2023

PR types

Performance optimization

PR changes

OPs

Describe

assign op add fp16 、bfp16 test

@paddle-bot
Copy link

paddle-bot bot commented Mar 28, 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.

@paddle-bot
Copy link

paddle-bot bot commented Mar 28, 2023

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

@liuzhenhai93 liuzhenhai93 changed the title add fp16 bfp16 test assign op add fp16 、bfp16 test Mar 28, 2023
@ZzSean ZzSean changed the title assign op add fp16 、bfp16 test [AMP OP&Test] assign op add fp16 、bfp16 test Mar 29, 2023
result1 = paddle.zeros(shape=[3, 3], dtype='float32')
paddle.assign(array, result1)
np.testing.assert_allclose(result1.numpy(), array, rtol=1e-05)
for dtype in [np.bool_, np.float32, np.int32, np.int64]:
Copy link
Contributor

Choose a reason for hiding this comment

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

这部分无需修改,只关注OpTest即可

Copy link
Contributor Author

Choose a reason for hiding this comment

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

顺手把冗余的代码规整到一起

Copy link
Contributor

@wanghuancoder wanghuancoder left a comment

Choose a reason for hiding this comment

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

LGTM

@ZzSean ZzSean merged commit 41f0e3c into PaddlePaddle:develop Mar 30, 2023
@liuzhenhai93 liuzhenhai93 deleted the assign_op_bf16_test branch March 30, 2023 02:49
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