-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[0-size Tensor No.2、3、13、14、15、17、30、36、37、68、189、211、217、219、224、228、245、254、258、260、264、265、272、273、288、291、295、305、327、331、332、333、334、336、337、340] Add 0-size Tensor support for a lot of activation function APIs. #72821
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.2、3、13、14、15、17、30、36、37、68、189、211、217、219、224、228、245、254、258、260、264、265、272、273、288、291、295、305、327、331、332、333、334、336、337、340] Add 0-size Tensor support for a lot of activation function APIs. #72821
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
wanghuancoder
left a comment
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
|
/re-run all-failed |
3 similar comments
|
/re-run all-failed |
|
/re-run all-failed |
|
/re-run all-failed |
|
/re-run all-failed |
1 similar comment
|
/re-run all-failed |
|
/re-run all-failed |
1 similar comment
|
/re-run all-failed |


PR Category
Execute Infrastructure
PR Types
Improvements
Description
修复了一个比较共性的问题,涉及到如下API:
acos acosh asin asinh atan atanh ceil cos cosh floor rsqrt sin sinh sqrt square tan tanh relu sigmoid silu softsign TanhShrink log_sigmoid这类api的kernel通常使用宏来快速定义,因此只需要修复对应的宏即可。具体的修改方法(以CPU为例)如下:
添加了
除此之外,这类api较为常见,因此需要在gpu xpu sparse对应的kernel中一并修改。修改方法类似。
由于
test_activation_op.py里面代码太长而且有较多遗留问题,因此新增单测文件:Paddle/test/legacy_test/test_activation_op_zero_size.pyPcard-67164