-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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.49 为 Paddle bce_loss 算子实现 float16 数据类型支持 #51490
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
self.shape = [10, 10] | ||
|
||
|
||
class TestBceLossOpStaticFP16(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.
APITest无需添加和修改
self.outputs = {'Out': output_np} | ||
|
||
def test_check_output(self): | ||
if fluid.core.is_compiled_with_cuda(): |
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.
直接继承父类相关函数即可
@ZzSean 政哥辛苦 review 一下 |
@@ -18,6 +18,8 @@ | |||
#include <vector> | |||
|
|||
#include "paddle/phi/backends/gpu/gpu_context.h" | |||
#include "paddle/phi/common/amp_type_traits.h" | |||
#include "paddle/phi/common/data_type.h" |
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.
这个头文件可以删
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.
这个头文件可以删
#include "paddle/phi/common/data_type.h"这个?
self.outputs = {'Out': output_np} | ||
|
||
def test_check_output(self): | ||
self.check_output(atol=1e-3) |
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.
默认值无需设置
self.check_output(atol=1e-3) | ||
|
||
def test_check_grad(self): | ||
self.check_grad(['X'], 'Out', max_relative_error=1e-3) |
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.
同上
close due to the following PR is merged: |
PR types
New features
PR changes
OPs
Describe
任务链接:#51281
NO.49 为 Paddle bce_loss 算子实现 float16 数据类型支持