Skip to content

Conversation

@Starrysea996
Copy link
Contributor

@Starrysea996 Starrysea996 commented Aug 12, 2025

PR Category

User Experience

PR Types

New features

Description

Add scatter_reduce api for paddle, similar to torch.scatter_reduce

@paddle-bot
Copy link

paddle-bot bot commented Aug 12, 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 12, 2025

Codecov Report

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

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

return result


@ParamAliasDecorator(
Copy link
Contributor

Choose a reason for hiding this comment

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

这个是新增API,参数名直接与torch一致吧,不用再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

index: Tensor,
src: Tensor,
reduce: Literal['sum', 'prod', 'mean', 'amin', 'amax'],
include_self: bool = True,
Copy link
Contributor

Choose a reason for hiding this comment

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

torch这个是指定关键字用法,我们也按这样放到*后面去

@zhwesky2010 zhwesky2010 changed the title [API compatibility] add scatter reduce api [API compatibility] add scatter_reduce api Aug 13, 2025
zhwesky2010
zhwesky2010 previously approved these changes Aug 14, 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 requested a review from SigureMo August 14, 2025 09:18
SigureMo
SigureMo previously approved these changes Aug 14, 2025
XiaoguangHu01
XiaoguangHu01 previously approved these changes Aug 14, 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

SigureMo
SigureMo previously approved these changes Aug 15, 2025
SigureMo
SigureMo previously approved these changes Aug 15, 2025
@Starrysea996
Copy link
Contributor Author

/re-run all-failed

2 similar comments
@Starrysea996
Copy link
Contributor Author

/re-run all-failed

@Starrysea996
Copy link
Contributor Author

/re-run all-failed

@Starrysea996
Copy link
Contributor Author

/re-run all-failed

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

@zhwesky2010 zhwesky2010 merged commit d434c9e into PaddlePaddle:develop Aug 18, 2025
110 of 120 checks passed
Luckycheng222 pushed a commit to Luckycheng222/Paddle that referenced this pull request Aug 25, 2025
* add scatter reduce api

* cancel paramAliasDecorator

* add keyword-only

* fix test scatter reduce

* fix test note

* fix testscase and static check
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