-
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
【Hackathon No.47】为 Paddle cross 算子实现 float16 数据类型支持 #50924
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
Zhang Ting seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
可以参考#51168 |
@@ -65,6 +65,21 @@ def init_output(self): | |||
self.outputs = {'Out': np.array(z_list).reshape(self.shape)} | |||
|
|||
|
|||
class TestCrossOpCase2(TestCrossOp): | |||
def initTestCase(self): |
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.
需要参考低精度单测规范修改单测命名,TestCrossOpCase2 -> TestCrossFP16Op
https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/amp_precision/amp_test_dev_guide_cn.html#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.
done
self.outputs = {'Out': np.array(z_list).reshape(self.shape)} | ||
|
||
def test_check_output(self): | ||
self.check_output(atol=1e-3, check_eager=True) |
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.
test_check_output可以删掉,因为OpTest内部对fp16类型的阈值设置默认是1e-3。这里不需要为FP16实现这个方法
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.
老师,这里如果不设置atol=1e-3那么测试就会失败,设置后才能测试通过。不确定是不是内部对cross这个op单独设置了阈值。
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.
这个阈值大概也是近期刚刚默认加入的,是不是你开发环境的代码没有合入paddle的dev的内容,所以导致无法通过,我先在PR中删除,重新跑CI看看
@zhangting2020 这是中文文档pr:PaddlePaddle/docs#5708 |
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-CI-Codestyle-Check 流水线提示修改下代码风格 |
hi, @denglianbin
|
PR types
Others
PR changes
Others
Describe
性能数据(op benchmark)