-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[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
[0-size Tensor No.144] Add 0-size Tensor support for paddle.nextafter API. #73008
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
There was a problem hiding this 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); |
There was a problem hiding this comment.
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
影响可阅读性
/re-run all-failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@enkilee 请解决下冲突 |
… API. (PaddlePaddle#73008) * fix * add test * fix * merge and fix * fix error * fix error * fix error
PR Category
Execute Infrastructure
PR Types
Improvements
Description
paddle.nextafter 具体报错为CUDA Error 9
修复过程
1 修复前向kernel
2 修改单测程序