Skip to content

Conversation

@zengshao0622
Copy link
Contributor

@zengshao0622 zengshao0622 commented Feb 28, 2023

PR types

Others

PR changes

Others

Describe

  • add fp16 unit test for pad3d op
  • add bf16 unit test for pad3d op
  • set fp16 atol=1e-3 and max_relative_error=1.5e-3
  • set bf16 atol=1e-2 and max_relative_error=1e-2

@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.

self.python_api = paddle.nn.functional.pad
self.inputs = {'X': np.random.random(self.shape).astype("float64")}
self.inputs = {
'X': np.random.random(self.shape).astype("float32")
Copy link
Contributor

Choose a reason for hiding this comment

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

self.check_output(check_eager=True, atol=1e-3)

def test_check_grad(self):
self.check_grad(['X'], 'Out', max_relative_error=0.3)
Copy link
Contributor

Choose a reason for hiding this comment

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

0.3这个值和规范所给阈值不同,这个值是本地测试出来的么?

@ZzSean ZzSean changed the title pad3d add unittests of fp16 and bf16 [AMP OP&Test] pad3d add unittests of fp16 and bf16 Mar 28, 2023
@Vvsmile
Copy link
Contributor

Vvsmile commented Mar 29, 2023

LGTM

@ZzSean ZzSean merged commit f86d0be into PaddlePaddle:develop Mar 29, 2023
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.

4 participants