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

Fix argsort cpu kernel when with input of NaN #41070

Merged
merged 2 commits into from
Mar 30, 2022

Conversation

wawltor
Copy link
Contributor

@wawltor wawltor commented Mar 29, 2022

PR types

Bug fixes

PR changes

OPs

Describe

Fix sort cpu when with input of NaN

  • 1.0, np.nan, 3.0, 2.0 -> 降序排序后 nan 3 2 1 -> 排序的indices (1, 2, 3, 0)
  • 1.0, np.nan, 3.0, 2.0 -> 升序排序后 1 2 3 nan -> 排序的indices (0, 3, 2, 1)

GPU:在10.2 11.2两个cuda版本测试了一下和torch结果是一样的

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@wawltor wawltor changed the title Fix sort cpu when with input of NaN Fix argsort cpu kernel when with input of NaN Mar 30, 2022
@wawltor wawltor merged commit 17af293 into PaddlePaddle:develop Mar 30, 2022
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.

2 participants