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

No.54:为 Paddle allclose、isclose 算子实现 float16 数据类型支持 #51168

Merged
merged 33 commits into from
Mar 10, 2023
Merged

Conversation

mrcangye
Copy link
Contributor

@mrcangye mrcangye commented Mar 3, 2023

PR types

New features

PR changes

OPs

Describe

任务链接:#50658 (comment)
中文文档修复链接:PaddlePaddle/docs#5688

@paddle-bot
Copy link

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

@zhangting2020
Copy link
Contributor

辛苦分别为2个算子补充FP16的OpTest,用来验证精度。

具体写法可以参考低精度单测添加介绍中的step2:https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/amp_precision/amp_test_dev_guide_cn.html#step2

也可以参考这个#50952

@zhangting2020 zhangting2020 self-requested a review March 9, 2023 02:26
zhangting2020
zhangting2020 previously approved these changes Mar 9, 2023
Copy link
Contributor

@zhangting2020 zhangting2020 left a comment

Choose a reason for hiding this comment

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

LGTM

phi::AllCloseKernel,
float,
double,
phi::dtype::float16) {
Copy link
Contributor

Choose a reason for hiding this comment

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

需要增加BF16的注册

phi::IscloseKernel,
float,
double,
phi::dtype::float16) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

需要BF16的注册

Copy link
Contributor

Choose a reason for hiding this comment

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

在这个题目中暂时不添加bf16的支持。我们会有另外的题目

@@ -170,6 +171,36 @@ def test_equal_nan():
self.assertRaises(TypeError, test_equal_nan)


class TestAllcloseOpFp16(unittest.TestCase):
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

Choose a reason for hiding this comment

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

已经添加了继承OpTest的单测,这个单测是测的静态图分支

@@ -203,6 +204,36 @@ def test_equal_nan():
self.assertRaises(TypeError, test_equal_nan)


class TestIscloseOpFp16(unittest.TestCase):
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

@zhangting2020 zhangting2020 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

6 participants