-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Optimizer]: add quick gelu fusion pass for ViT model. #9718
[Optimizer]: add quick gelu fusion pass for ViT model. #9718
Conversation
Thanks for your contribution! |
a2a25a4
to
45b5712
Compare
5a95eb8
to
94a0e00
Compare
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
94a0e00
to
24268eb
Compare
LGTM |
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
其它问题后面一个PR一起改下吧
bool has_act = const_cast<Node*>(node)->AsStmt().op_info()->HasAttr( | ||
"activation_type"); |
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.
node->stmt()
尽量不要用 const_cast
} | ||
|
||
cpp::OpDesc GenOpDesc(const key2nodes_t& matched) { | ||
auto op_desc = *matched.at("scale")->stmt()->op_info(); |
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.
两个算子的定义完全不同,没必要复用 op_info。更好的做法是新建一个 OpInfo
No description provided.