-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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]Split PaddleDialect and KernelDialect and Implement Layered Compailation #56442
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
你的PR提交成功,感谢你对开源项目的贡献! |
zhangbo9674
reviewed
Aug 18, 2023
YuanRisheng
previously approved these changes
Aug 21, 2023
phlrain
approved these changes
Aug 21, 2023
YuanRisheng
approved these changes
Aug 21, 2023
zhangbo9674
approved these changes
Aug 21, 2023
XiaoguangHu01
approved these changes
Aug 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
BeingGod
pushed a commit
to BeingGod/Paddle
that referenced
this pull request
Sep 9, 2023
…mpailation (PaddlePaddle#56442) * [NewIR]Split PaddleDialect and KernelDialect and Implement Layered Compailation * remove ir_core DEPS * fix header files * fix conflict * ignore test_assert UT * fix code style * fix UT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Description
Pcard-67164
What's New?
1. 拆分了Dialect
fluid/ir/dialect
目录文件拆分为paddle_dialect
和paddle_kernel_dialect
trait
和interface
目录移动到paddle_dialect
中2. 独立中间组件
pd_dialect_core
,包含 dialect 相关的 type, attribute, trait,interfacepd_dialect_op
包含 Operation 定义,但不包含 VJP 的 static 实现,以解决与prim的循环依赖pd_dialect_api
包含 API C++ 定义,提供给 prim vjp 使用pd_dialect
,前三者并外加算子的 VJP static 实现3. 效果
对于与 dialect 平层级的其他组件,可以按需依赖
pd_dialect_core
、或pd_dialect_api
、或pd_dialect_op
,而不必依赖pd_dialect
这个大的target.对于上层组件,如执行器层面,可以直接依赖
pd_dialect
,而不必关心细节 targetNOTE
1. 如何解决 pd_op.cc/.h 对于
prim/vjp
中primitive_vjp_experimental
的依赖的?虽然
pd_op.h
中定义了vjp
的 static 类方法,但其实不影响每个Op class 的大小。只需要两步处理:xxx.cc
,在编译pd_dialect_op
时不添加此xxx.cc
作为 SRCS,则DEPS 中就不会有primitive_vjp_experimental
,此处为第一处「断依赖边」primitive_vjp_experimental
只依赖于pd_dialect_api
,所以在编译pd_dialect
时额外加上xxx.cc
即可保证对外的算子定义是完整。