Repository navigation
[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
Merged
wanghuancoder merged 13 commits intoMay 28, 2025
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
Contributor
Contributor
Author
…addle into fix_0-size_activation_func
Contributor
Author
|
/re-run all-failed |
3 similar comments
Contributor
Author
|
/re-run all-failed |
Contributor
Author
|
/re-run all-failed |
Contributor
Author
|
/re-run all-failed |
XieYunshen
approved these changes
May 26, 2025
Contributor
Author
|
/re-run all-failed |
1 similar comment
Contributor
Author
|
/re-run all-failed |
Contributor
Author
|
/re-run all-failed |
1 similar comment
Contributor
Author
|
/re-run all-failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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