Skip to content

[Accuracy diff No. 163] Fix accuracy (output type) diff for paddle.clip API - #74719

Merged
wanghuancoder merged 2 commits into
PaddlePaddle:developfrom
hushenwei2000:fix_clip
Aug 20, 2025
Merged

wanghuancoder merged 2 commits into
PaddlePaddle:developfrom
hushenwei2000:fix_clip

Conversation

@hushenwei2000

Copy link
Copy Markdown
Contributor

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

Currently, the clip kernel exhibits different output types between PyTorch and Paddle. For instance, when the input datatype is int32/int64 and one of the min/max is float type, PyTorch outputs float32, whereas Paddle outputs the origin datatype.

This PR

  • Addde type cast in Python level API.

pcard-67164

@paddle-bot

paddle-bot Bot commented Aug 19, 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.

@codecov-commenter

codecov-commenter commented Aug 19, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@d632461). Learn more about missing BASE report.

Files with missing lines Patch % Lines
python/paddle/tensor/math.py 80.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (80.00%) 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   #74719   +/-   ##
==========================================
  Coverage           ?   80.00%           
==========================================
  Files              ?        1           
  Lines              ?        5           
  Branches           ?        0           
==========================================
  Hits               ?        4           
  Misses             ?        1           
  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.

@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

@wanghuancoder
wanghuancoder merged commit 9edea54 into PaddlePaddle:develop Aug 20, 2025
Luckycheng222 pushed a commit to Luckycheng222/Paddle that referenced this pull request Aug 25, 2025
…ip API (PaddlePaddle#74719)

* fix(math.py): fix output type diff for clip kernel

* fix(math.py): fix output type diff for clip kernel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants