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] refine program translator #54719

Merged

Conversation

kangguangli
Copy link
Contributor

@kangguangli kangguangli commented Jun 16, 2023

PR types

Others

PR changes

Others

Description

This PR:

  1. refactor OpTranslator, which makes a single op translator will be the combinations of several function and thus reduce the cost of specializing translators for special ops.
  2. more type support for paddle framework
  3. specializing several ops

Others

Pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Jun 16, 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 previously approved these changes Jun 19, 2023
Copy link
Contributor

@winter-wang winter-wang left a comment

Choose a reason for hiding this comment

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

LGTM

zyfncg
zyfncg previously approved these changes Jun 27, 2023
Copy link
Contributor

@zyfncg zyfncg left a comment

Choose a reason for hiding this comment

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

LGTM for YAML

Aurelius84
Aurelius84 previously approved these changes Jun 27, 2023
Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

LGTM overall

@kangguangli kangguangli dismissed stale reviews from Aurelius84 and zyfncg via 3fa2d84 June 28, 2023 12:58
auto program = std::make_unique<Program>(ir::IrContext::Instance());
ir::IrContext* ctx = ir::IrContext::Instance();
ctx->GetOrRegisterDialect<dialect::PaddleDialect>();
ctx->GetOrRegisterDialect<ir::BuiltinDialect>();
Copy link
Contributor

Choose a reason for hiding this comment

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

BuiltinDialect会在构造函数里面自动注册,没必要重复

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

winter-wang
winter-wang previously approved these changes Jun 30, 2023
Copy link
Contributor

@winter-wang winter-wang left a comment

Choose a reason for hiding this comment

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

LGTM overall

Aurelius84
Aurelius84 previously approved these changes Jun 30, 2023
Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

LGTM

@kangguangli kangguangli dismissed stale reviews from Aurelius84 and winter-wang via 207d2d5 June 30, 2023 09:19
heavyrain-lzy
heavyrain-lzy previously approved these changes Jun 30, 2023
Copy link
Contributor

@heavyrain-lzy heavyrain-lzy left a comment

Choose a reason for hiding this comment

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

LGTM for YAML

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

@kangguangli kangguangli merged commit 5d40f2a into PaddlePaddle:develop Jul 1, 2023
@kangguangli kangguangli deleted the refactor_program_translator branch July 17, 2023 07:47
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.

6 participants