[API Compatibility] add out for `topk` by aquagull · Pull Request #74887 · PaddlePaddle/Paddle

Conversation

@aquagull

PR Category

User Experience

PR Types

Others

Description

topk增加别名装饰器,使用assign来实现out参数;amax amin在之前已经完成了下沉,这个pr补充文档、单测
image
image

pcard-71500

@paddle-bot

你的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 Report

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

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

@aquagull

@aquagull aquagull changed the title Test ci [API Compatibility] add out for topk

Aug 27, 2025

zhwesky2010

Choose a reason for hiding this comment

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

LGTM

zhwesky2010

Choose a reason for hiding this comment

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

LGTM

out_values, out_indices = out
out_values = paddle.assign(values, output=out_values)
out_indices = paddle.assign(indices, output=out_indices)
return out_values, out_indices

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Labels