-
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
[XPU] Add group_norm + silu fused op. #10022
Conversation
Thanks for your contribution! |
ab71dd9
to
6b2a318
Compare
6b2a318
to
54a9c74
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
小问题在后面的pr中修改吧
auto input_shape = param_.input->dims(); | ||
auto batch_size = input_shape[0]; | ||
auto channel = input_shape[1]; | ||
auto h = input_shape[2]; | ||
auto w = input_shape[3]; | ||
param_.output->Resize({batch_size, channel, h, w}); |
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.
param_.output->Resize(param_.input->dims());
@@ -1797,6 +1797,15 @@ struct XPUMultiEncoderParam : ParamBase { | |||
bool already_qkv_fusion{false}; // qkv is already fusion in graph | |||
}; | |||
|
|||
struct XPUGnSiluParam : ParamBase { | |||
lite::Tensor* input{}; |
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.
const lite::Tensor*
param_.input = | ||
scope->FindVar(op_desc.Input("Input").front())->GetMutable<Tensor>(); |
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.
scope->FindTensor
PR devices
XPU
PR types
New features
PR changes
Kernels
Description
Add group_norm +silu fused op on XPU backend.