-
Notifications
You must be signed in to change notification settings - Fork 5.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
【Hackathon 6th Fundable Projects 3 No.149-152】fluid operator fused_elementwise_add #63996
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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.
同样,op.cc和sig.cc不能删除。
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
paddle/phi/api/yaml/ops.yaml
Outdated
- 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 | ||
|
||
- 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 | ||
|
||
- op : fused_elementwise_mul |
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.
这些fuse类算子放到fused_ops.yaml中
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.
已修改
@@ -0,0 +1,153 @@ | |||
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. |
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.
2023 -> 2024
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.
已修改
#include "paddle/phi/kernels/legacy/elementwise_add_kernel.h" | ||
#include "paddle/phi/kernels/legacy/elementwise_divide_kernel.h" | ||
#include "paddle/phi/kernels/legacy/elementwise_multipy_kernel.h" | ||
#include "paddle/phi/kernels/legacy/elementwise_subtract_kernel.h" |
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.
这几个头文件引用是否可以去掉?
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.
需要调用这几个头文件中的RawKernel
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "paddle/phi/api/ext/dispatch.h" |
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.
这个头文件可以删掉吧?
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.
已修改
…ementwise_add (PaddlePaddle#63996) * Fix * Fix * Fix * Fix * Fix
PR Category
Others
PR Types
Others
Description
迁移
fused_elementwise_add
fused_elementwise_div
fused_elementwise_mul
fused_elementwise_sub