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] Update unittest of fp16 for slice op #51036

Merged
merged 4 commits into from
Mar 17, 2023

Conversation

zyfncg
Copy link
Contributor

@zyfncg zyfncg commented Feb 28, 2023

PR types

Others

PR changes

Others

Describe

Update the threshold of fp16 unittest for slice op.

@paddle-bot
Copy link

paddle-bot bot commented Feb 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.

@ZzSean ZzSean changed the title Update unittest of fp16 for slice op [AMP OP&Test] Update unittest of fp16 for slice op Mar 1, 2023
ZzSean
ZzSean previously approved these changes Mar 1, 2023
Copy link
Contributor

@ZzSean ZzSean left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -510,7 +510,7 @@ def config(self):
def test_check_output(self):
place = core.CUDAPlace(0)
if core.is_float16_supported(place):
self.check_output_with_place(place, atol=1e-5, check_prim=True)
Copy link
Contributor

@ZzSean ZzSean Mar 1, 2023

Choose a reason for hiding this comment

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

  • 1e-3是默认值,可以直接删掉
  • test_check_output中可以直接调self.check_output
    下同

Copy link
Contributor Author

Choose a reason for hiding this comment

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

check_grad_with_place里的max_relative_error默认值也是1e-3吗?

Copy link
Contributor

Choose a reason for hiding this comment

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

这个可以等我们的后续PR合入,这里会改成默认1e-3

@Vvsmile
Copy link
Contributor

Vvsmile commented Mar 2, 2023

LGTM

Copy link
Contributor

@ZzSean ZzSean 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 42f2874 into PaddlePaddle:develop Mar 17, 2023
@zyfncg zyfncg deleted the slice_fp16 branch March 17, 2023 03:24
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