Skip to content

Conversation

@SigureMo
Copy link
Member

@SigureMo SigureMo commented Dec 16, 2025

PR Category

Execute Infrastructure

PR Types

New features

Description

支持在 PIR 上表示 Python 函数,为 #76888 的拆分与正式化版本,主要由 @DrRyanHuang 开发

本 PR 为 part2,主要包含如下内容:

  • 使用 NativeMetaTensor 作为 Python function infermeta 的桥梁,替代掉 IrMetaTensorIrTensorIrMetaTensor 并不 owned IrTensor,这会导致所有权关系在 Python 这种将输出 Tensor 作为返回值返回的场景很难实现,因此添加 owned 结构持有 dtype 和 shape 解决该问题
  • 添加 lower 逻辑

#76888 将会作为最后一个 PR 合入

Copilot AI review requested due to automatic review settings December 16, 2025 13:28
@paddle-bot
Copy link

paddle-bot bot commented Dec 16, 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.

Co-authored-by: Ryan <[email protected]>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

zyfncg
zyfncg previously approved these changes Dec 17, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 6.89655% with 54 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@eaa6919). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...addle/fluid/pir/transforms/pd_op_to_kernel_pass.cc 3.57% 54 Missing ⚠️

❌ Your patch status has failed because the patch coverage (6.89%) 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   #76938   +/-   ##
==========================================
  Coverage           ?    6.89%           
==========================================
  Files              ?        3           
  Lines              ?       58           
  Branches           ?        0           
==========================================
  Hits               ?        4           
  Misses             ?       54           
  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.

@SigureMo SigureMo merged commit 4d6f92c into PaddlePaddle:develop Dec 17, 2025
81 of 85 checks passed
@SigureMo SigureMo deleted the pir/python-op-part-2 branch December 17, 2025 18:49
@SigureMo SigureMo changed the title [PIR][2/N]【CINN】 Support register Python function on PIR (NativeMetaTensor and lower part) [PIR][2/N] Support register Python function on PIR (NativeMetaTensor and lower part) Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants