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] Refactor op yaml info parser #54790

Merged
merged 8 commits into from Jun 22, 2023

Conversation

phlrain
Copy link
Collaborator

@phlrain phlrain commented Jun 20, 2023

PR types

Others

PR changes

Others

Description

新增Op yaml infor的parser,方便在lowering 和构造context的时候使用,减少重复代码

Other

Pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Jun 20, 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 Jun 20, 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.

std::vector<std::pair<std::string, std::string>> inplace;
std::vector<std::pair<std::string, std::string>> view;
OpRunTimeInfo(std::string infer_meta_func,
std::vector<std::string> infer_meta_param,
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的参数建议都设置为const &

bool no_need_buffer = false;
bool is_mutable_attribute = false;
OpInputInfo() {}
OpInputInfo(const OpInputInfo& input_info)
Copy link
Contributor

Choose a reason for hiding this comment

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

OpInputInfo(const OpInputInfo& input_info)=default;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done


const OpInfoTuple& op_info_tuple_;

const std::vector<OpInputInfo>& vec_op_input_info_;
Copy link
Contributor

Choose a reason for hiding this comment

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

这个成员是不是只是op_info_tuple_ 第0个位置的vector。这里可以不作为类成员,而是以 private inline const & InputInfo() const 形式来内部使用即可?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@phlrain phlrain changed the title Refactor op info [IR] Refactor op yaml info parser Jun 22, 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

@Aurelius84 Aurelius84 merged commit 1b8a1a9 into PaddlePaddle:develop Jun 22, 2023
24 of 25 checks passed
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.

None yet

2 participants