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[-5]. #57461

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

winter-wang
Copy link
Contributor

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

PR types

Others

PR changes

APIs

Description

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

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

本pr内容:

  • 移除pir::Value中的GetDefiningOp接口。
    -BlockArgument没有defining op,因此,本pr移除该接口。 对OpReusult而言,已存在功能等价的接口owner()。
  • 在TypeId、Type、OpInfo中移除相应的哈希友元,新增向const void的隐式类型转换。统一采用const void进行哈希计算。
  • 移除Type中无意义的const_cast使用。

参考pr:

Other

Pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Sep 18, 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.

zhangbo9674
zhangbo9674 previously approved these changes Sep 18, 2023
@winter-wang winter-wang merged commit 5775b17 into PaddlePaddle:develop Sep 19, 2023
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 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.

2 participants