Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PIR] add blocks interface for pir::Operation. #59278

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

winter-wang
Copy link
Contributor

@winter-wang winter-wang commented Nov 22, 2023

PR types

New features

PR changes

Others

Description

  • 新增模版双层容器 DoubleLevelContainer工具对象,支持将双层容器平铺为一层,跳过外层,对内层元素直接进行遍历。
  • pir::Operation派生自DoubleLevelContainer类,通过blocks()可将自身转换为DoubleLevelContainer,进而可通过范围for循环跳过region直接遍历子block。
  • python端通过 Operation.blocks()接口直接遍历block。
  • 完成PR59231 中的遗留comment任务, 将 cvt_as_if_op重命名为 as_if_op,并在python端将其绑定为pir::Operation的成员函数。

Other

Pcard-67164

Copy link

paddle-bot bot commented Nov 22, 2023

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

@winter-wang winter-wang force-pushed the cf_develop branch 2 times, most recently from 5cedff4 to 4ca14be Compare November 22, 2023 17:51
Copy link
Contributor

@zhangbo9674 zhangbo9674 left a comment

Choose a reason for hiding this comment

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

LGTM

@winter-wang winter-wang merged commit 33d1a75 into PaddlePaddle:develop Nov 23, 2023
28 checks passed
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
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