-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[PHI decoupling] remove dependency on "paddle/fluid/operators/elementwise/xxx.h" in phi #47870
[PHI decoupling] remove dependency on "paddle/fluid/operators/elementwise/xxx.h" in phi #47870
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -882,6 +882,38 @@ void ElementwiseKernel(const KPDevice &ctx, | |||
} | |||
} | |||
|
|||
template <typename OutT, typename Functor, int NumOuts = 1> | |||
void LaunchSameDimsElementwiseCudaKernel( |
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.
不需要把这个函数移过来,通过分析其逻辑可以看出,其本质调用的ElementwiseKernel,所以直接把使用这个函数的地方替换成ElementwiseKernel即可,另外如果后续需要移动函数,需要把原函数删掉,防止维护重复代码,增加工作量
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.
好的
@YuanRisheng 修改后的 CI 已经全部通过,可以再次 review 了。 |
PR types
Others
PR changes
Others
Describe
remove dependency on "paddle/fluid/operators/elementwise/xxx.h" in phi, including
elementwise_op_function.h
andelementwise_op_impl.cu.h
.changes:
#include "paddle/fluid/operators/elementwise/elementwise_op_impl.cu.h"
替换为#include "paddle/phi/kernels/funcs/elementwise_base.h"
.paddle::operators:LaunchSameDimsElementwiseCudaKernel
替换为phi::funcs::ElementwiseKernel
viterbi_decode_kernel.cu
中的#include "paddle/fluid/operators/elementwise/elementwise_op_function.h"
,并将paddle::operators::LaunchElementwiseCudaKernel
替换为phi::funcs::BroadcastKernel
,同时添加#include "paddle/phi/kernels/funcs/broadcast_function.h"
.