Skip to content

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

Merged
wanghuancoder merged 8 commits into
PaddlePaddle:developfrom
enkilee:0size-144-nextafter
Jun 10, 2025
Merged

wanghuancoder merged 8 commits into
PaddlePaddle:developfrom
enkilee:0size-144-nextafter

Conversation

@enkilee

@enkilee enkilee commented May 29, 2025

Copy link
Copy Markdown
Collaborator

PR Category

Execute Infrastructure

PR Types

Improvements

Description

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

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

@paddle-bot

paddle-bot Bot commented May 29, 2025

Copy link
Copy Markdown

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

@DanielSun11 DanielSun11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

const DenseTensor& y,
DenseTensor* out) {
if (x.numel() == 0 || y.numel() == 0) {
ctx.template Alloc<typename NextafterOut<T>::type>(out);

Copy link
Copy Markdown
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

enkilee commented Jun 4, 2025

Copy link
Copy Markdown
Collaborator Author

/re-run all-failed

@DanielSun11 DanielSun11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@luotao1

luotao1 commented Jun 5, 2025

Copy link
Copy Markdown
Collaborator

@enkilee 请解决下冲突

@wanghuancoder
wanghuancoder merged commit 62dcf8c into PaddlePaddle:develop Jun 10, 2025
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