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

Switch the parameter order of "Scale" and "Bias". #63449

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions paddle/fluid/pir/transforms/xpu/group_norm_silu_fuse_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class GroupNormSiluPattern : public paddle::drr::DrrPatternBase {

const auto &silu = pat.Op(paddle::dialect::SiluOp::name());

groupnorm({&pat.Tensor("X"), &pat.Tensor("Bias"), &pat.Tensor("Scale")},
groupnorm({&pat.Tensor("X"), &pat.Tensor("Scale"), &pat.Tensor("Bias")},
{&pat.Tensor("Y"), &pat.Tensor("Mean"), &pat.Tensor("Variance")});
silu({&pat.Tensor("Y")}, {&pat.Tensor("Out")});

Expand All @@ -70,7 +70,7 @@ class GroupNormSiluPattern : public paddle::drr::DrrPatternBase {
paddle::dialect::GroupNormSiluXpuOp::name(),
{{{"epsilon", pat.Attr("epsilon")}, {"groups", pat.Attr("groups")}}});
group_norm_silu_xpu(
{&res.Tensor("X"), &res.Tensor("Bias"), &res.Tensor("Scale")},
{&res.Tensor("X"), &res.Tensor("Scale"), &res.Tensor("Bias")},
{&res.Tensor("Out")});
}
};
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/api/yaml/fused_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@
data_type : dtype

- op : group_norm_silu_xpu
args : (Tensor x, Tensor scale, Tensor bias, int groups, float epsilon)
args : (Tensor x, Tensor scale, Tensor bias, int groups = -1, float epsilon = 1e-5)
output : Tensor(out)
infer_meta :
func : GroupNormalizeSiluXPUInferMeta
Expand Down