Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@SigureMo
Copy link
Member

@SigureMo SigureMo commented Mar 27, 2025

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

组合算子结束后恢复原来的 insertion point,避免副作用扩散到后续 case

该问题在 CINN 在动转静开默认后 test_slice 暴露,前一个动转静 case 因为跑了组合算子,导致后面没用 program_guard 的纯静态图插入点错误,并不是 default_main_program,因此跑(exe.run)了个寂寞(空 program)

通过删 backend 相关代码定位到 decomp 问题,加了插入点恢复逻辑

由于静态图单测实际上加 program_guard 会更安全些,因此也加了一下

Related links

CINN 切默认系列 PR

@SigureMo SigureMo requested review from gouzil and zrr1999 as code owners March 27, 2025 14:42
@paddle-bot
Copy link

paddle-bot bot commented Mar 27, 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.

@SigureMo SigureMo requested a review from Copilot March 27, 2025 14:43
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.

Pull Request Overview

This PR fixes a bug where the insertion point was not restored after running a composite operator in CINN, which caused subsequent cases to run on an incorrect static program. Key changes include adding an explicit paddle.static.program_guard to ensure the insertion point is correctly reset and reformatting argument lists in paddle.strided_slice for improved readability.

Files not reviewed (1)
  • paddle/fluid/pybind/pybind.cc: Language not supported

@SigureMo
Copy link
Member Author

/re-run all

int end_index) {
VLOG(4) << "[Prim] Bind Decomp sinking_decomp begin.";
py::list res;
auto original_insertion_point =
Copy link
Member Author

Choose a reason for hiding this comment

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

就加了这里 save insertion point 和后面恢复两行,不知道为啥全重新格式化了

@SigureMo SigureMo merged commit b8e1c0f into PaddlePaddle:develop Mar 28, 2025
33 checks passed
@SigureMo SigureMo deleted the prim/restore-insertion-point-after-decomp branch March 28, 2025 02:57
ggggxm pushed a commit to ggggxm/Paddle that referenced this pull request Mar 31, 2025
YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request May 7, 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.

2 participants