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

【Hackathon 6th Fundable Projects 3 No.149-152】fluid operator fused_elementwise_add #63996

Merged
merged 5 commits into from
May 10, 2024
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
95 changes: 0 additions & 95 deletions paddle/fluid/operators/fused/fused_elementwise_op.cc

This file was deleted.

92 changes: 0 additions & 92 deletions paddle/fluid/operators/ops_signature/fused_elementwise_sig.cc

This file was deleted.

4 changes: 4 additions & 0 deletions paddle/fluid/pir/dialect/op_generator/ops_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@
'fused_token_prune',
'fused_dconv_drelu_dbn',
'fused_dot_product_attention',
'fused_elementwise_add',
'fused_elementwise_div',
'fused_elementwise_mul',
'fused_elementwise_sub',
'nce',
'lars_momentum',
'lars_momentum_',
Expand Down
52 changes: 52 additions & 0 deletions paddle/phi/api/yaml/fused_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,58 @@
backward : fused_dropout_add_grad
support_dygraph_mode : true

- op : fused_elementwise_add
args: (Tensor x, Tensor y, int axis = -1, str fuse_activation = "", float fuse_alpha
= 0.0f, float fuse_beta = 0.0f, float fused_output_scale = 1.0f, int[] fused_unsqueeze2_axes
= {}, float scale_x = 1.0f, float scale_y = 1.0f, float scale_out = 1.0f)
output: Tensor (out)
infer_meta:
func: ElementwiseInferMeta
param : [x, y]
kernel :
func : fused_elementwise_add
data_type : x
support_dygraph_mode : true

- op : fused_elementwise_div
args: (Tensor x, Tensor y, int axis = -1, str fuse_activation = "", float fuse_alpha
= 0.0f, float fuse_beta = 0.0f, float fused_output_scale = 1.0f, int[] fused_unsqueeze2_axes
= {}, float scale_x = 1.0f, float scale_y = 1.0f, float scale_out = 1.0f)
output: Tensor (out)
infer_meta:
func: ElementwiseInferMeta
param : [x, y]
kernel :
func : fused_elementwise_div
data_type : x
support_dygraph_mode : true

- op : fused_elementwise_mul
args: (Tensor x, Tensor y, int axis = -1, str fuse_activation = "", float fuse_alpha
= 0.0f, float fuse_beta = 0.0f, float fused_output_scale = 1.0f, int[] fused_unsqueeze2_axes
= {}, float scale_x = 1.0f, float scale_y = 1.0f, float scale_out = 1.0f)
output: Tensor (out)
infer_meta:
func: ElementwiseInferMeta
param : [x, y]
kernel :
func : fused_elementwise_mul
data_type : x
support_dygraph_mode : true

- op : fused_elementwise_sub
args: (Tensor x, Tensor y, int axis = -1, str fuse_activation = "", float fuse_alpha
= 0.0f, float fuse_beta = 0.0f, float fused_output_scale = 1.0f, int[] fused_unsqueeze2_axes
= {}, float scale_x = 1.0f, float scale_y = 1.0f, float scale_out = 1.0f)
output: Tensor (out)
infer_meta:
func: ElementwiseInferMeta
param : [x, y]
kernel :
func : fused_elementwise_sub
data_type : x
support_dygraph_mode : true

- op : fused_embedding_eltwise_layernorm
args : (Tensor[] ids, Tensor[] embs, Tensor bias, Tensor scale, float epsilon = 0.00001f)
output : Tensor(out)
Expand Down
Loading