Repository navigation
[NewIR]Gen new ir api for paddle::dialect::xxx - #56241
Merged
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
added 4 commits
August 13, 2023 13:21
Aurelius84
reviewed
Aug 14, 2023
|
|
||
| COMBINE_OP_TEMPLATE = """auto {op_name} = APIBuilder::Instance().GetBuilder()->Build<ir::CombineOp>({in_name});""" | ||
|
|
||
| COMPUTE_OP_TEMPLATE = """paddle::dialect::{op_class_name} {op_inst_name} = APIBuilder::Instance().GetBuilder()->Build<paddle::dialect::{op_class_name}>({args});""" |
Collaborator
There was a problem hiding this comment.
后续这里的code可以酌情换行下,提升生成代码的可读性
Collaborator
Author
There was a problem hiding this comment.
嗯嗯,后续的pr会考虑format下代码格式
| primitive_vjp_experimental | ||
| SRCS ${VJP_SRCS} | ||
| DEPS primitive_backend_static_experimental) | ||
| add_dependencies(primitive_vjp_experimental pd_dialect) |
Collaborator
There was a problem hiding this comment.
这一行需要显式地添加么?backend/CMakeLists.txt 中的 primitive_backend_static_experimental 已经DEPS了pd_dialect,所以这里不是隐式已经依赖了pd_dialect?
Collaborator
Author
There was a problem hiding this comment.
这里需要显示添加add_dependencies
Aurelius84
approved these changes
Aug 14, 2023
zhangbo9674
approved these changes
Aug 14, 2023
YuanRisheng
approved these changes
Aug 14, 2023
| def _gen_return_result(self, op_info, op_inst_name): | ||
| output_name_list = op_info.output_name_list | ||
| assert len(output_name_list) == 1 | ||
| return f'return {op_inst_name}.result(0);' |
This file contains hidden or 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
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
Gen new ir api

pcard-67164