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

[IR] fine-tune the implementation of ir component. #53894

Merged
merged 1 commit into from
May 19, 2023

Conversation

winter-wang
Copy link
Contributor

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

PR types

Others

PR changes

Others

Description

本 PR 主要包括:

  • 新增Builder、OperationArgument数据结构;
    • 通过本pr, 用户可以通过 类似builder.create(....) 这种方式来创建op。而不是只能通过Operation::create(...)这种方式。
  • 对基础组件的实现进行微调。
    • 微调type、attribute、op等注册方式。
      • type、attribute、op的内存之前由dialect负责new, ir_context负责delete。调整为由ir_context同时负责new和deleter.
    • 将OpInfoImpl数据结构仅供opinfo.cc和ir_context.cc使用,避免导出。
      • op_info_impl.h在设计的时候是不对用户开放的,编译时不会导出。而op_info.h文件是需要对外导出的。因此,本pr移除了op_info.h对op_info_impl.h的依赖包含。
      • 将新IR中的涉及到的重量级的模版函数里面的模版部分进行了轻量化提取,将其中重量级的部分以非模版函数的形式进行了单独定义,避免了重量级模版函数被多次实例化的场景。

Other

Pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented May 17, 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.

@paddle-bot
Copy link

paddle-bot bot commented May 17, 2023

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

paddle/ir/builder.h Outdated Show resolved Hide resolved
paddle/ir/dialect.cc Show resolved Hide resolved
paddle/ir/dialect.h Show resolved Hide resolved
@winter-wang winter-wang force-pushed the develop branch 3 times, most recently from b42c37a to d148640 Compare May 17, 2023 12:27
paddle/ir/op_base.h Outdated Show resolved Hide resolved
@winter-wang winter-wang force-pushed the develop branch 16 times, most recently from a078544 to 2196e6a Compare May 19, 2023 02:01
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 changed the title [IR] fine-tune the implimentation of ir component. [IR] fine-tune the implementation of ir component. May 19, 2023
@winter-wang winter-wang merged commit 9d9f0ce into PaddlePaddle:develop May 19, 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.

3 participants