Skip to content

[0-size Tensor No.144] Add 0-size Tensor support for paddle.nextafter API. #73008

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 8 commits into from
Jun 10, 2025

Conversation

enkilee
Copy link
Contributor

@enkilee enkilee commented May 29, 2025

PR Category

Execute Infrastructure

PR Types

Improvements

Description

paddle.nextafter 具体报错为CUDA Error 9
修复过程

1 修复前向kernel
2 修改单测程序

Copy link

paddle-bot bot commented May 29, 2025

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

@paddle-bot paddle-bot bot added the contributor External developers label May 29, 2025
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label May 29, 2025
@enkilee enkilee changed the title [0-size Tensor No.142] Add 0-size Tensor support for paddle.nextafter API. [0-size Tensor No.144] Add 0-size Tensor support for paddle.nextafter API. May 30, 2025
Copy link
Contributor

@DanielSun11 DanielSun11 left a comment

Choose a reason for hiding this comment

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

还需要补充cpu和gpu的paddleAPITest回测结果

@@ -71,6 +71,11 @@ void NextafterKernel(const Context& ctx,
const DenseTensor& x,
const DenseTensor& y,
DenseTensor* out) {
if (x.numel() == 0 || y.numel() == 0) {
ctx.template Alloc<typename NextafterOut<T>::type>(out);
Copy link
Contributor

Choose a reason for hiding this comment

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

用这个分配即可ctx.template Alloc<T>(out);; typename NextafterOut<T>::type影响可阅读性

@enkilee
Copy link
Contributor Author

enkilee commented Jun 4, 2025

/re-run all-failed

Copy link
Contributor

@DanielSun11 DanielSun11 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1
Copy link
Contributor

luotao1 commented Jun 5, 2025

@enkilee 请解决下冲突

@wanghuancoder wanghuancoder merged commit 62dcf8c into PaddlePaddle:develop Jun 10, 2025
48 of 49 checks passed
shanjiang7 pushed a commit to shanjiang7/Paddle that referenced this pull request Jun 12, 2025
… API. (PaddlePaddle#73008)

* fix

* add test

* fix

* merge and fix

* fix error

* fix error

* fix error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants