KEMBAR78
[API Compatibility] Add compatible apis: where, eq, gt, Tensor.take_along_dim by LittleHeroZZZX · Pull Request #74870 · PaddlePaddle/Paddle · GitHub
Skip to content

Conversation

@LittleHeroZZZX
Copy link
Contributor

@LittleHeroZZZX LittleHeroZZZX commented Aug 25, 2025

PR Category

User Experience

PR Types

New features

Description

新增 where, eq, gt, Tensor.take_along_dim 四个 API:

  • where: 支持 input、other 参数和 out 机制
  • eq: equal 的别名,支持 input、other 参数和 out 机制,存在预处理,没有做C++ 下沉,使用装饰器
  • gt: greater_than 的别名,做 C++ 下沉,支持 input、other 参数和 out 机制,存在共性问题 不支持标量输入
  • Tensor.take_along_dim: 新增 API,take_along_axis 的别名

@paddle-bot
Copy link

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

@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

1 similar comment
@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed



def equal(x: Tensor, y: Tensor, name: str | None = None) -> Tensor:
def equal(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个按装饰器先实现吧,可以用这个param_two_alias

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

1 similar comment
@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@53f2a48). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #74870   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         5           
  Lines              ?        10           
  Branches           ?         0           
===========================================
  Hits               ?        10           
  Misses             ?         0           
  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.

zhwesky2010
zhwesky2010 previously approved these changes Aug 26, 2025
Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

zhwesky2010
zhwesky2010 previously approved these changes Aug 26, 2025
@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

XiaoguangHu01
XiaoguangHu01 previously approved these changes Aug 26, 2025
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

1 similar comment
@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

zhwesky2010
zhwesky2010 previously approved these changes Aug 27, 2025
Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,解决冲突

SigureMo
SigureMo previously approved these changes Aug 27, 2025
@LittleHeroZZZX LittleHeroZZZX dismissed stale reviews from SigureMo and zhwesky2010 via 912ce5e August 27, 2025 07:35
@zhwesky2010 zhwesky2010 merged commit 1b1cf09 into PaddlePaddle:develop Aug 27, 2025
52 checks passed
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.

6 participants