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

【Hackathon4 No.61】remainder 算子FP16/BF16单测完善 #52920

Merged
merged 38 commits into from
May 16, 2023

Conversation

enkilee
Copy link
Contributor

@enkilee enkilee commented Apr 14, 2023

PR types

Others

PR changes

Others

Description

remainder

@paddle-bot
Copy link

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

@enkilee enkilee changed the title remainder support fp16 bf16 【Hackathon No.61】remainder 算子FP16/BF16单测完善 Apr 18, 2023
@enkilee enkilee changed the title 【Hackathon No.61】remainder 算子FP16/BF16单测完善 【Hackathon4 No.61】remainder 算子FP16/BF16单测完善 Apr 20, 2023
@paddle-ci-bot
Copy link

paddle-ci-bot bot commented May 3, 2023

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

checker=self.verify_output, place=place
)

def verify_output(self, outs):
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

@enkilee enkilee May 5, 2023

Choose a reason for hiding this comment

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

不管是用np.mod还是np.fmod,rtol都到了300以上

Copy link
Contributor

@ZzSean ZzSean May 10, 2023

Choose a reason for hiding this comment

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

由于数据类型所限,使用fp32计算和使用bf16的结果差距太大,这里可以对输入做一些处理,初始化为FP32->convert为bf16->convert为fp32,即convert_uint16_to_float(convert_float_to_uint16(x))然后再计算参考结果,这样应该是可以通过的,无需使用自定义函数

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 481511a into PaddlePaddle:develop May 16, 2023
@enkilee enkilee deleted the hackathon4-No61-remainder branch July 6, 2023 01:28
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.

5 participants