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

【Hackathon No.61】uniform_random 算子FP16/BF16单测完善 #52949

Merged
merged 1 commit into from
May 5, 2023

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Apr 15, 2023

PR types

Others

PR changes

Others

Description

uniform_random 算子FP16/BF16单测完善
图片

@paddle-bot
Copy link

paddle-bot bot commented Apr 15, 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.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Apr 15, 2023
@co63oc co63oc changed the title 【Hackathon No.60】uniform_random 算子FP16/BF16单测完善 【Hackathon No.61】uniform_random 算子FP16/BF16单测完善 Apr 15, 2023
@@ -1,3 +1,4 @@

Copy link
Contributor

Choose a reason for hiding this comment

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

删除无效改动

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

self.op_type = "uniform_inplace"
self.dtype = np.float16
self.shape = (1000, 784)
x = paddle.ones(self.shape, dtype=self.dtype)
Copy link
Contributor

Choose a reason for hiding this comment

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

数据初始化使用random

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

@co63oc co63oc force-pushed the uniform branch 3 times, most recently from ccc13da to 9d6308d Compare April 19, 2023 09:44
@co63oc
Copy link
Contributor Author

co63oc commented Apr 25, 2023

@luotao1 @ZzSean CI已完成


def verify_output(self, outs):
hist, prob = self.output_hist(np.array(outs[0]))
np.testing.assert_allclose(hist, prob, rtol=0, atol=0.01)
Copy link
Contributor

Choose a reason for hiding this comment

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

atol使用1e-3能否通过?

Copy link
Contributor Author

@co63oc co63oc Apr 26, 2023

Choose a reason for hiding this comment

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

BF16测试1e-3失败,修改FP16为0.001,BF16为0.002
图片

@co63oc
Copy link
Contributor Author

co63oc commented Apr 27, 2023

@ZzSean 修改CI已完成

ZzSean
ZzSean previously approved these changes Apr 28, 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

self.place,
['X'],
'Out',
check_dygraph=False,
Copy link
Contributor

Choose a reason for hiding this comment

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

请问两个单测为什么要设置 check_dygraph=False 呢?

Copy link
Contributor Author

@co63oc co63oc Apr 28, 2023

Choose a reason for hiding this comment

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

测试提示错误设置python_api,生成是随机数,没有paddle.uniform_random_inplace可以设置

Copy link
Contributor

Choose a reason for hiding this comment

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

@co63oc 辛苦

  • 再merge下develop,CI 超过7天会设置部分失败
  • 加一个备注的todo,说由于缺少paddle.uniform_random_inplace的设置,暂时把动态图的测试给关了

@paddle-ci-bot
Copy link

paddle-ci-bot bot commented May 4, 2023

Sorry to inform you that 0908d08's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@phlrain phlrain self-assigned this May 5, 2023
@phlrain phlrain self-requested a review May 5, 2023 07:14
@phlrain phlrain removed their assignment May 5, 2023
Copy link
Collaborator

@phlrain phlrain left a comment

Choose a reason for hiding this comment

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

LGTM for check_dygraph

@luotao1 luotao1 merged commit b02de1b into PaddlePaddle:develop May 5, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants