未验证 提交 1ad95e97 编写于 作者: H huangjiyi 提交者: GitHub

[PHI decoupling] remove dependency on 2 header files in fluid from phi (#47842)

* rm "paddle/fluid/operators/eigen/eigen_function.h" in phi

* rm "paddle/fluid/operators/elementwise/elementwise_op_function.h" in phi

* Revert "rm "paddle/fluid/operators/elementwise/elementwise_op_function.h" in phi"

This reverts commit c4ba51225e3652f1d80925afba406612968f0ee9.
上级 e0742c48
...@@ -21,8 +21,8 @@ limitations under the License. */ ...@@ -21,8 +21,8 @@ limitations under the License. */
#include "paddle/phi/kernels/funcs/eigen/common.h" #include "paddle/phi/kernels/funcs/eigen/common.h"
// See Note [ Why still include the fluid headers? ] // See Note [ Why still include the fluid headers? ]
#include "paddle/fluid/operators/eigen/eigen_function.h"
#include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/bfloat16.h"
#include "paddle/phi/kernels/funcs/eigen/eigen_function.h"
namespace phi { namespace phi {
template <typename T, typename Context> template <typename T, typename Context>
...@@ -43,7 +43,7 @@ void ScaleKernel(const Context& dev_ctx, ...@@ -43,7 +43,7 @@ void ScaleKernel(const Context& dev_ctx,
if (x.numel() <= 0 || (!x.IsInitialized())) { if (x.numel() <= 0 || (!x.IsInitialized())) {
return; return;
} }
paddle::operators::EigenScale<std::decay_t<decltype(dev)>, T>::Eval( phi::funcs::EigenScale<std::decay_t<decltype(dev)>, T>::Eval(
dev, dev,
eigen_out, eigen_out,
eigen_x, eigen_x,
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
#pragma once #pragma once
#include "paddle/fluid/operators/eigen/eigen_function.h"
#include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/backends/cpu/cpu_context.h"
#include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/dense_tensor.h"
#include "paddle/phi/kernels/cpu/reduce.h" #include "paddle/phi/kernels/cpu/reduce.h"
#include "paddle/phi/kernels/funcs/eigen/common.h" #include "paddle/phi/kernels/funcs/eigen/common.h"
#include "paddle/phi/kernels/funcs/eigen/eigen_function.h"
namespace phi { namespace phi {
namespace funcs { namespace funcs {
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
#include "paddle/phi/kernels/funcs/eigen/common.h" #include "paddle/phi/kernels/funcs/eigen/common.h"
// See Note [ Why still include the fluid headers? ] // See Note [ Why still include the fluid headers? ]
#include "paddle/fluid/operators/eigen/eigen_function.h"
#include "paddle/phi/common/complex.h" #include "paddle/phi/common/complex.h"
#include "paddle/phi/kernels/funcs/eigen/eigen_function.h"
namespace phi { namespace phi {
......
...@@ -14,11 +14,11 @@ limitations under the License. */ ...@@ -14,11 +14,11 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/fluid/operators/eigen/eigen_function.h"
#include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/dense_tensor.h"
#include "paddle/phi/kernels/complex_kernel.h" #include "paddle/phi/kernels/complex_kernel.h"
#include "paddle/phi/kernels/funcs/complex_functors.h" #include "paddle/phi/kernels/funcs/complex_functors.h"
#include "paddle/phi/kernels/funcs/eigen/common.h" #include "paddle/phi/kernels/funcs/eigen/common.h"
#include "paddle/phi/kernels/funcs/eigen/eigen_function.h"
namespace phi { namespace phi {
......
...@@ -18,7 +18,7 @@ limitations under the License. */ ...@@ -18,7 +18,7 @@ limitations under the License. */
#include "paddle/phi/kernels/funcs/eigen/common.h" #include "paddle/phi/kernels/funcs/eigen/common.h"
// See Note [ Why still include the fluid headers? ] // See Note [ Why still include the fluid headers? ]
#include "paddle/fluid/operators/eigen/eigen_function.h" #include "paddle/phi/kernels/funcs/eigen/eigen_function.h"
namespace phi { namespace phi {
...@@ -31,7 +31,7 @@ void SignKernel(const Context& dev_ctx, ...@@ -31,7 +31,7 @@ void SignKernel(const Context& dev_ctx,
auto eigen_x = phi::EigenVector<T>::Flatten(x); auto eigen_x = phi::EigenVector<T>::Flatten(x);
auto& dev = *dev_ctx.eigen_device(); auto& dev = *dev_ctx.eigen_device();
paddle::operators::EigenSign<std::decay_t<decltype(dev)>, T>::Eval( phi::funcs::EigenSign<std::decay_t<decltype(dev)>, T>::Eval(
dev, eigen_out, eigen_x); dev, eigen_out, eigen_x);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册