-
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
Fused elementwises kernels and ops #51427
Fused elementwises kernels and ops #51427
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -175,7 +175,7 @@ if(WITH_MKLDNN) | |||
pass_library(softplus_activation_mkldnn_fuse_pass inference DIR mkldnn) | |||
pass_library(shuffle_channel_mkldnn_detect_pass inference DIR mkldnn) | |||
pass_library(fc_act_mkldnn_fuse_pass inference DIR mkldnn) | |||
pass_library(elt_act_mkldnn_fuse_pass inference DIR mkldnn) | |||
pass_library(elt_act_onednn_fuse_pass inference DIR mkldnn) |
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.
As we change it already, please change elt
to either eltwise
or elementwise
as it's more common among other passes.
} | ||
extra { | ||
attrs { | ||
name: "x_data_format" |
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.
x_data_format
and y_data_format
seem to be deprecated attributes. Please don't add them here. They should be also removed from base operators
type: FLOAT | ||
} | ||
attrs { | ||
name: "Scale_x" |
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.
name: "Scale_x" | |
name: "scale_x" |
All attributes should be lowercase. We must unify it, as there are currently too many duplicates with quantization scales.
attrs { | ||
name: "fuse_activation" | ||
type: STRING | ||
} |
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.
attrs { | |
name: "fuse_activation" | |
type: STRING | |
} | |
attrs { | |
name: "fuse_activation" | |
type: STRING | |
} | |
attrs { | |
name: "fuse_alpha" | |
type: FLOAT | |
} | |
attrs { | |
name: "fuse_beta" | |
type: FLOAT | |
} |
attrs { | ||
name: "alpha" | ||
type: FLOAT | ||
} | ||
attrs { | ||
name: "beta" | ||
type: FLOAT | ||
} |
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.
attrs { | |
name: "alpha" | |
type: FLOAT | |
} | |
attrs { | |
name: "beta" | |
type: FLOAT | |
} |
name: "fuse_activation" | ||
type: STRING | ||
} | ||
} |
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.
There is also float fused_output_scale
from operator_scale_onednn_fuse_pass
name: "fuse_activation" | ||
type: STRING | ||
} | ||
} |
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.
All comments to fused_elementwise_add.pbtxt
are valid for other fused_elementwise_.pbtxt
name: "fuse_activation" | ||
type: STRING | ||
} | ||
} |
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.
elementwise_mul
can have fused_unsqueeze2_axes
attribute fromoperator_unsqueeze2_onednn_fuse_pass
Fused elementwise ops
I am sorry to inform you that you need update code again. I have analyzed the CI-Coverage and found the problem. The test |
7d2fa1a
@YuanRisheng Done. I've seen that PR-CI-Coverage first checks approves and fails if there aren't required ones, and only once the approves are there it runs tests, which really slows development (tests work on local, have to wait for approves, test doesn't work on CI, approves get dismissed which is just a waste of time) |
@HulekJakub Thank you for your feedback. I will report this issue to my team. And CI-Windows fails because of |
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 types
Others
PR changes
Others
Description