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] standardize the use of value[-2]. #55322

Merged
merged 1 commit into from
Sep 17, 2023

Conversation

winter-wang
Copy link
Contributor

@winter-wang winter-wang commented Jul 11, 2023

PR types

Others

PR changes

APIs

Description

规范化代码中对Value的使用[-2]。

Value分两种,OpResult和BlockArgument. 由于之前没有BlockArgument, 大家都是混用Value和OpResult, 现在有了BlockArguemnt, 需要区分Value和OpResult的使用。
在需要支持BlockArgument的地方,将原本的OpResult升级为Value,使其能够兼容BlockArgument的行为。

本pr内容:

  • 规范整理pir::Operation中的相关接口。
    • 将pir::Operation的部分公开接口按照attribute相关、input相关、ouput相关、successor相关、region相关、parent相关等进行了分类聚集,方便阅读。
    • 规范了部分接口的函数签名。(主要是移除或增加const限定符以及移除不合理的const_cast使用。)
  • 将OpResult::GetOpResultIndex接口调整为index。
  • 规范pir::Parser和pir::Printer中对OpResult的使用,调整为Value。

参考pr:

Todo:

  • 将pir::OperationArgument::inputs_中的类型由std::vector<pir::OpResult>修改为std::vector<pir::value>。
  • 将其它Dialect中相关op的Build接口的相关参数由OpResult替换成了Value。

Other

Pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Jul 11, 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 ir_develop branch 2 times, most recently from 8be3d09 to b040e43 Compare July 11, 2023 11:02
@winter-wang winter-wang reopened this Jul 12, 2023
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Jul 12, 2023
@PaddlePaddle PaddlePaddle unlocked this conversation Jul 12, 2023
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Jul 12, 2023
@PaddlePaddle PaddlePaddle unlocked this conversation Jul 12, 2023
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Jul 12, 2023
@winter-wang winter-wang force-pushed the ir_develop branch 2 times, most recently from cd615b0 to 82a5ea9 Compare September 6, 2023 07:46
@winter-wang winter-wang changed the title [IR] add parameter attribute. [PIR] normalize the use of value.3-2 Sep 16, 2023
@winter-wang winter-wang force-pushed the ir_develop branch 10 times, most recently from 012bed2 to 35db9c5 Compare September 16, 2023 10:51
@winter-wang winter-wang changed the title [PIR] normalize the use of value.3-2 [PIR] normalize the use of value.4-2 Sep 16, 2023
@winter-wang winter-wang force-pushed the ir_develop branch 4 times, most recently from 81050c4 to 60c3633 Compare September 16, 2023 11:39
@winter-wang winter-wang force-pushed the ir_develop branch 3 times, most recently from 61e06b4 to 9703038 Compare September 16, 2023 13:33
risemeup1
risemeup1 previously approved these changes Sep 16, 2023
@winter-wang winter-wang changed the title [PIR] normalize the use of value.4-2 [PIR] Standardize the use of value.4-2 Sep 16, 2023
@winter-wang winter-wang changed the title [PIR] Standardize the use of value.4-2 [PIR] standardize the use of value.4-2 Sep 16, 2023
@risemeup1 risemeup1 merged commit 50669e0 into PaddlePaddle:develop Sep 17, 2023
26 of 27 checks passed
@winter-wang winter-wang changed the title [PIR] standardize the use of value.4-2 [PIR] standardize the use of value[-2]. Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants