Skip to content

[XPU] use non fusion logsumexp impl to normalize input for numeric st… #68157

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

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

lj970926
Copy link
Contributor

@lj970926 lj970926 commented Sep 11, 2024

PR Category

Custom Device

PR Types

Bug fixes

Description

  1. Normalize input before fed to to exp for numeric stability (avoid nan/inf).

Copy link

paddle-bot bot commented Sep 11, 2024

你的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.

@@ -86,6 +90,11 @@ def set_shape(self):
create_test_class(globals(), XPUTestExpOP, stype)


support_types = get_xpu_op_support_types('exp')
Copy link
Contributor

Choose a reason for hiding this comment

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

这里新增的93-95行,和上面的88-90行,是重复的?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

收到,我改一下

@@ -525,6 +538,11 @@ def set_shape(self):
create_test_class(globals(), XPUTestLogOP, stype)


support_types = get_xpu_op_support_types('log')
Copy link
Contributor

Choose a reason for hiding this comment

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

这里也是,541-543行,和上面的536-538行是重复的?

Copy link
Member

@tizhou86 tizhou86 left a comment

Choose a reason for hiding this comment

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

LGTM

@houj04 houj04 added the XPU label Sep 13, 2024
@houj04 houj04 merged commit fa59b7b into PaddlePaddle:develop Sep 13, 2024
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants