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.159】fused_gemm_epilogue #64729

Closed
wants to merge 5 commits into from
Closed
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
6 changes: 0 additions & 6 deletions paddle/fluid/operators/fused/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ register_operators(
fused_multi_transformer_op
fused_multi_transformer_int8_op
resnet_unit_op
fused_gemm_epilogue_op
fused_gate_attention_op
resnet_basic_block_op)

Expand All @@ -23,7 +22,6 @@ op_library(fusion_lstm_op)
if(WITH_XPU)
op_library(resnet_basic_block_op)
op_library(resnet_unit_op)
op_library(fused_gemm_epilogue_op)
op_library(fused_attention_op)
op_library(fused_feedforward_op)
endif()
Expand Down Expand Up @@ -55,8 +53,4 @@ if(WITH_GPU OR WITH_ROCM)
if((NOT WITH_ROCM) AND (NOT ${CUDNN_VERSION} VERSION_LESS 8000))
op_library(resnet_unit_op)
endif()

if(CUDA_VERSION GREATER_EQUAL 11.6)
op_library(fused_gemm_epilogue_op)
endif()
endif()
199 changes: 0 additions & 199 deletions paddle/fluid/operators/fused/fused_gemm_epilogue_op.cc

This file was deleted.

39 changes: 0 additions & 39 deletions paddle/fluid/operators/ops_signature/fused_gemm_epilogue_sig.cc

This file was deleted.

1 change: 1 addition & 0 deletions paddle/fluid/pir/dialect/op_generator/op_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ class {TEST_API} {op_name} : public pir::Op<{op_name}{interfaces}{traits}> {{
'add_n_',
'split_grad',
'expand',
'fused_gemm_epilogue',
'increment',
'increment_',
'assign_out_',
Expand Down
10 changes: 10 additions & 0 deletions paddle/phi/ops/yaml/fused_backward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,13 @@
kernel :
func : max_pool2d_v2_grad
param: [x, out, saved_idx, out_grad, kernel_size, strides, paddings, data_format, global_pooling, adaptive]

- backward_op: fused_gemm_epilogue_grad
forward : fused_gemm_epilogue(Tensor x, Tensor y, Tensor bias, bool trans_x, bool trans_y, str activation) -> Tensor(out), Tensor(reserve_space)
args : (Tensor x, Tensor y, Tensor reserve_space, Tensor out_grad, bool trans_x, bool trans_y, str activation)
output : Tensor(x_grad), Tensor(y_grad), Tensor(bias_grad)
infer_meta :
func : FusedGemmEpilogueGradInferMeta
kernel:
func : fused_gemm_epilogue_grad
optional : reserve_space
7 changes: 7 additions & 0 deletions paddle/phi/ops/yaml/fused_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,13 @@
data_type : x
optional : bias0, scale, bias1, mean, variance

- op : fused_gemm_epilogue
args : (Tensor x, Tensor y, Tensor bias, bool trans_x, bool trans_y, str activation)
output : Tensor(out), Tensor(reserve_space)
invoke : fused_gemm_epilogue_impl(x, y, bias, trans_x, trans_y, activation)
backward: fused_gemm_epilogue_grad
optional: reserve_space

- op : fused_linear_param_grad_add
args : (Tensor x, Tensor dout, Tensor dweight, Tensor dbias, bool multi_precision = true, bool has_bias = true)
output : Tensor(dweight_out), Tensor(dbias_out)
Expand Down
10 changes: 0 additions & 10 deletions paddle/phi/ops/yaml/inconsistent/dygraph_backward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -367,16 +367,6 @@
composite : tile_grad(x, out_grad, repeat_times, x_grad)
backward : tile_double_grad

- backward_op: fused_gemm_epilogue_grad
forward : fused_gemm_epilogue(Tensor x, Tensor y, Tensor bias, bool trans_x, bool trans_y, str activation) -> Tensor(out), Tensor(reserve_space)
args : (Tensor x, Tensor y, Tensor reserve_space, Tensor out_grad, bool trans_x, bool trans_y, str activation)
output : Tensor(x_grad), Tensor(y_grad), Tensor(bias_grad)
infer_meta :
func : FusedGemmEpilogueGradInferMeta
kernel:
func : fused_gemm_epilogue_grad
optional : reserve_space

- backward_op: maximum_double_grad
forward: maximum_grad(Tensor x, Tensor y, Tensor grad_out) -> Tensor(grad_x), Tensor(grad_y)
args: (Tensor x, Tensor y, Tensor grad_x_grad, Tensor grad_y_grad)
Expand Down
7 changes: 0 additions & 7 deletions paddle/phi/ops/yaml/inconsistent/dygraph_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,6 @@
optional : skip_update, master_params
inplace : (params -> params_out), (moments1 -> moments1_out), (moments2 -> moments2_out), (beta1_pows -> beta1_pows_out), (beta2_pows -> beta2_pows_out), (master_params -> master_params_out)

- op : fused_gemm_epilogue
args : (Tensor x, Tensor y, Tensor bias, bool trans_x, bool trans_y, str activation)
output : Tensor(out), Tensor(reserve_space)
invoke : fused_gemm_epilogue_impl(x, y, bias, trans_x, trans_y, activation)
backward: fused_gemm_epilogue_grad
optional: reserve_space

- op : greater_equal
args : (Tensor x, Tensor y)
output : Tensor(out)
Expand Down