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

[XPU] Add group_norm + silu fused op. #10022

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

stevenshen36
Copy link
Contributor

@stevenshen36 stevenshen36 commented Feb 22, 2023

PR devices

XPU

PR types

New features

PR changes

Kernels

Description

Add group_norm +silu fused op on XPU backend.

@paddle-bot
Copy link

paddle-bot bot commented Feb 22, 2023

Thanks for your contribution!

Copy link
Collaborator

@zhupengyang zhupengyang left a comment

Choose a reason for hiding this comment

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

LGTM

小问题在后面的pr中修改吧

Comment on lines +26 to +31
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});
Copy link
Collaborator

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{};
Copy link
Collaborator

Choose a reason for hiding this comment

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

const lite::Tensor*

Comment on lines +36 to +37
param_.input =
scope->FindVar(op_desc.Input("Input").front())->GetMutable<Tensor>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

scope->FindTensor

@zhupengyang zhupengyang merged commit bc39e63 into PaddlePaddle:develop Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants