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[-3]. #57418

Merged
merged 1 commit into from
Sep 17, 2023

Conversation

winter-wang
Copy link
Contributor

@winter-wang winter-wang commented Sep 17, 2023

PR types

Others

PR changes

APIs

Description

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

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

本pr内容:

  • 移除 pir::OperationArgument中的AddOperand和AndOperands接口。
  • 移除value.cc和operand.cc中无意义的const_cast。
  • 规范BuiltinDialect中对OpResult的不合理使用。

参考pr:

Todo:

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

Other

Pcard-67164

@winter-wang winter-wang force-pushed the ir_develop branch 3 times, most recently from 3136754 to 2ef6469 Compare September 17, 2023 05:13
Copy link
Contributor

@risemeup1 risemeup1 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 2d6517b into PaddlePaddle:develop Sep 17, 2023
26 of 27 checks passed
@winter-wang winter-wang changed the title [PIR] normalize the use of value[4-3]. [PIR] standardize the use of value. [4-3]. Sep 17, 2023
@winter-wang winter-wang changed the title [PIR] standardize the use of value. [4-3]. [PIR] standardize the use of value. [-3]. Sep 18, 2023
@winter-wang winter-wang changed the title [PIR] standardize the use of value. [-3]. [PIR] standardize the use of value[-3]. Sep 18, 2023
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 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.

None yet

2 participants