Skip to content

[0-size Tensor No.1、275、283] Add 0-size Tensor support for paddle.abs、paddle.Tensor.__abs__、paddle.Tensor.abs API. - #72887

Merged
luotao1 merged 9 commits into
PaddlePaddle:developfrom
DanielSun11:fix_0-size_abs
May 27, 2025
Merged

luotao1 merged 9 commits into
PaddlePaddle:developfrom
DanielSun11:fix_0-size_abs

Conversation

@DanielSun11

Copy link
Copy Markdown
Contributor

PR Category

Execute Infrastructure

PR Types

Improvements

Description

修复paddle.abs,使其支持0 size Tensor。由于GPU AbsKernel使用的ElementwiseKernel在之前已经被修复过,CPU版本的kernel本身不具备太大问题,目前三个api在CPU和GPU环境下都正常。因此修复了OneDNN以及XPU对应的Kernel。添加了单测

PaddleAPI回测结果:
image

Pcard-67164

@paddle-bot

paddle-bot Bot commented May 22, 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.

@wanghuancoder wanghuancoder 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

@DanielSun11

Copy link
Copy Markdown
Contributor Author

/re-run all-failed

2 similar comments
@DanielSun11

Copy link
Copy Markdown
Contributor Author

/re-run all-failed

@DanielSun11

Copy link
Copy Markdown
Contributor Author

/re-run all-failed

@luotao1

luotao1 commented May 26, 2025

Copy link
Copy Markdown
Collaborator

Please merge the develop to pass api-benchmark

@codecov-commenter

codecov-commenter commented May 26, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@705356a). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...addle/phi/kernels/onednn/activation_grad_kernel.cc 33.33% 4 Missing ⚠️
paddle/phi/kernels/onednn/activation_kernel.cc 33.33% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (33.33%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #72887   +/-   ##
==========================================
  Coverage           ?   33.33%           
==========================================
  Files              ?        2           
  Lines              ?        9           
  Branches           ?        0           
==========================================
  Hits               ?        3           
  Misses             ?        6           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@luotao1
luotao1 merged commit cedb8ca into PaddlePaddle:develop May 27, 2025
@DanielSun11
DanielSun11 deleted the fix_0-size_abs branch September 18, 2025 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants