Skip to content

Conversation

hushenwei2000
Copy link
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

Copy link

paddle-bot bot commented Aug 19, 2025

你的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
Copy link

codecov-commenter commented Aug 19, 2025

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 ⚠️
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.

Copy link
Contributor

@wanghuancoder wanghuancoder left a comment

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
70 of 72 checks passed
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