-
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
【PaddlePaddle Hackathon 4】No.56 :add fp and bf16 for bernoulli #54232
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
需要补充一下api中的check_dtype |
请解决下冲突和ROCM流水线问题 |
self.x = convert_float_to_uint16( | ||
np.random.uniform(size=(1000, 784)).astype("float32") | ||
) | ||
self.out = np.zeros((1000, 784)).astype("float32") |
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.
out也需要convert一下?
check_dtype如何补充? |
|
||
def verify_output(self, outs): | ||
hist, prob = output_hist(np.array(outs[0])) | ||
np.testing.assert_allclose(hist, prob, atol=0.02) |
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.
bf16这里的atol是否需要增大?
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.
笔误了写成0.02了,但这需要指定atol=0.01,默认给的1e-7
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 types
Others
PR changes
APIs
Description
add fp16 test and bf16 test for bernoulli
#51281