-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
辛苦分别为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 |
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要BF16的注册
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请继承OpTest框架进行测试
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请利用OpTest框架写测试
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
OPs
Describe
任务链接:#50658 (comment)
中文文档修复链接:PaddlePaddle/docs#5688