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 6th No.10】Update paddle.searchsorted -part #64331

Merged
merged 15 commits into from
May 23, 2024

Conversation

NKNaN
Copy link
Contributor

@NKNaN NKNaN commented May 15, 2024

PR Category

User Experience

PR Types

Improvements

Description

Update paddle.searchsorted to support fp16 and bf16 data type
refer to: #64001 (comment)

Copy link

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

out_data_[idx] = seq_size_;
} else {
if (right_) {
out_data_[idx] = static_cast<OutType>(phi::funcs::UpperBound<T1, T2>(
sequence_ptr, seq_size_, *value_ptr));
out_data_[idx] = static_cast<OutType>(
Copy link
Contributor

Choose a reason for hiding this comment

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

paddle/phi/kernels/funcs/algorithm.h中实现的phi::funcs::UpperBound是有什么问题么?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

paddle/phi/kernels/funcs/algorithm.h 中的 phi::funcs::UpperBound 和 LowerBound 不能直接支持 phi::dtype::float16 和 phi::dtype::bfloat16 吧,需要转一下类型

@luotao1 luotao1 merged commit 5ccfdff into PaddlePaddle:develop May 23, 2024
32 checks passed
@luotao1
Copy link
Contributor

luotao1 commented May 23, 2024

对应修改下中文文档

@NKNaN
Copy link
Contributor Author

NKNaN commented May 23, 2024

对应修改下中文文档

好的

chen2016013 pushed a commit to chen2016013/Paddle that referenced this pull request May 26, 2024
…4331)

* update searchsorted

* fix impl

* fix impl dtype

* fix impl dtype

* fix impl dtype

* rerun ci

* update test

* fix test

* fix test

* update fp16 test

* fix impl

* fix impl

* fix impl

* fix impl

* fix impl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants