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

[NewIR]Rename ir into pir and Adjust Dialect class name #57103

Merged
merged 15 commits into from
Sep 9, 2023

Conversation

Aurelius84
Copy link
Contributor

@Aurelius84 Aurelius84 commented Sep 8, 2023

PR types

Others

PR changes

Others

Description

Pcard-67164

What's New?

此PR仅做了目录重命名和调整,以及部分Dialect 类名的规范化,无新增功能

📚 基本原则:

  • 第一原则: 目录组织和 Dialect 类组织要「规范」且「达义」,符合框架的一致性习惯
  • 第二原则: 保持命名的「简洁性」,可利用目录、namespace来隔离「同名文件」

🚀 主要变化如下:

类别 变动前 变动后 备注
目录 paddle/ir paddle/pir
目录 paddle/fluid/ir paddle/fluid/pir
目录 test/cpp/ir test/cpp/pir
目录 dialect/paddle_dialect/ dialect/operator/
目录 dialect/paddle_kernel_dialect dialect/kernel
目录 hlir/dialect/cinn_dialect hlir/dialect/operator
类名 PaddleDialect OperatorDialect 有 namepace 隔离
类名 PaddleKernelDialect KernelDialect
类名 CINNDialect OperatorDialect 有 namepace 隔离
文件名 pd_dialect.hpd_xxx op_dialect.hop_xxx
文件名 cinn_dialect.h op_dialect.h
文件名 pd_manual_xx manual_xx
文件名 pd_attribute_storage.h attribute_storage.h 有目录隔离
文件名 kernel_attribute_storage.h attribute_storage.h 有目录隔离
文件名 pd_meta_tensor.h/.cc meta_tensor.h/.cc
文件名 pd_type_storage.h type_storage.h 有目录隔离
文件名 kernel_type_storage.h type_storage.h 有目录隔离
库名 ir_core pir_core
库名 ir_pass pir_pass
库名 ir_shape pir_shape
库名 ir_pattern_rewrite pir_pattern_rewrite
库名 libir.xx libpir.xx
目标名 pd_dialect pd_op_dialect
目标名 pd_kernel_dialect pd_kernel_dialect 保持不变
目标名 cinn_dialect cinn_op_dialect
目标名 runtime_dialect cinn_runtime_dialect 后续可考虑为 cinn_rt_dialect
方言名 pd pd_op
方言名 pd_kernel pd_kernel 保持不变
方言名 cinn cinn_op
方言名 runtime cinn_runtime 后续可考虑为 cinn_rt
自动代码 pd_op.h/.cc pd_op.h/.cc 保持不变

@paddle-bot
Copy link

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

@Aurelius84 Aurelius84 changed the title [NewIR]Rename ir into pir and Adjust Dialect class name [NewIR]Rename ir into pir and Adjust Dialect class name Sep 8, 2023
@Aurelius84 Aurelius84 changed the title [NewIR]Rename ir into pir and Adjust Dialect class name [NewIR]Rename ir into pir and Adjust Dialect class name Sep 8, 2023
YuanRisheng
YuanRisheng previously approved these changes Sep 8, 2023
Copy link
Contributor

@YuanRisheng YuanRisheng left a comment

Choose a reason for hiding this comment

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

后续是否会对python端进行重命名,比如new_ir字段改成pir之类的?

@Aurelius84
Copy link
Contributor Author

后续是否会对python端进行重命名,比如new_ir字段改成pir之类的?

@YuanRisheng 已经有计划了,护航实习生子豪会来提Python端的rename

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

@Aurelius84 Aurelius84 merged commit 3d6606e into PaddlePaddle:develop Sep 9, 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.

7 participants