diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 517ac24cccc72..f44e23e6da74e 100755 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -328,10 +328,6 @@ copy( inference_lib_dist SRCS ${PADDLE_SOURCE_DIR}/paddle/phi/core/visit_type.h DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/core/) -copy( - inference_lib_dist - SRCS ${PADDLE_SOURCE_DIR}/paddle/phi/core/hostdevice.h - DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/core/) copy( inference_lib_dist SRCS ${PADDLE_SOURCE_DIR}/paddle/fluid/platform/init_phi.h diff --git a/paddle/fluid/operators/bernoulli_op.h b/paddle/fluid/operators/bernoulli_op.h index e0bd2145db635..ffa2722ccbb60 100644 --- a/paddle/fluid/operators/bernoulli_op.h +++ b/paddle/fluid/operators/bernoulli_op.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. */ #pragma once +#include "paddle/common/hostdevice.h" #include "paddle/fluid/platform/enforce.h" -#include "paddle/phi/core/hostdevice.h" namespace paddle { namespace operators { diff --git a/paddle/fluid/operators/bilateral_slice_op.h b/paddle/fluid/operators/bilateral_slice_op.h index 66783f151ea06..c88b9c9054e30 100644 --- a/paddle/fluid/operators/bilateral_slice_op.h +++ b/paddle/fluid/operators/bilateral_slice_op.h @@ -13,8 +13,8 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/fluid/framework/op_registry.h" -#include "paddle/phi/core/hostdevice.h" namespace paddle { namespace operators { diff --git a/paddle/fluid/operators/dequantize_log_op.cu b/paddle/fluid/operators/dequantize_log_op.cu index 89af422859fe4..933e074b8bbe7 100644 --- a/paddle/fluid/operators/dequantize_log_op.cu +++ b/paddle/fluid/operators/dequantize_log_op.cu @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/fluid/operators/dequantize_log_op.h" +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/math.h" namespace paddle { diff --git a/paddle/fluid/operators/detection/box_clip_op.cu b/paddle/fluid/operators/detection/box_clip_op.cu index ef0f2439c5ee1..7b802337ef7b7 100644 --- a/paddle/fluid/operators/detection/box_clip_op.cu +++ b/paddle/fluid/operators/detection/box_clip_op.cu @@ -13,10 +13,10 @@ limitations under the License. */ #include +#include "paddle/common/hostdevice.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/operators/detection/box_clip_op.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/math_function.h" namespace paddle { diff --git a/paddle/fluid/operators/fake_quantize_op.h b/paddle/fluid/operators/fake_quantize_op.h index 13f1e5a3a2612..dd8675331fce6 100644 --- a/paddle/fluid/operators/fake_quantize_op.h +++ b/paddle/fluid/operators/fake_quantize_op.h @@ -16,12 +16,12 @@ limitations under the License. */ #include +#include "paddle/common/hostdevice.h" #include "paddle/fluid/framework/eigen.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/framework/tensor_util.h" #include "paddle/fluid/memory/malloc.h" #include "paddle/phi/common/transform.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/blas/blas.h" namespace paddle { diff --git a/paddle/fluid/operators/index_impl.cu.h b/paddle/fluid/operators/index_impl.cu.h index 7d2cdae87950b..629717f61933a 100644 --- a/paddle/fluid/operators/index_impl.cu.h +++ b/paddle/fluid/operators/index_impl.cu.h @@ -18,12 +18,12 @@ limitations under the License. */ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/framework/operator.h" #include "paddle/phi/backends/gpu/gpu_launch_config.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/core/generator.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/aligned_vector.h" #include "paddle/phi/kernels/funcs/distribution_helper.h" #include "paddle/phi/kernels/primitive/kernel_primitives.h" diff --git a/paddle/fluid/operators/interpolate_op.h b/paddle/fluid/operators/interpolate_op.h index 31767d68b9d3c..563879e301d12 100644 --- a/paddle/fluid/operators/interpolate_op.h +++ b/paddle/fluid/operators/interpolate_op.h @@ -14,8 +14,8 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/fluid/framework/op_registry.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/eigen/common.h" #include "paddle/phi/kernels/funcs/math_function.h" diff --git a/paddle/fluid/operators/math/cos_sim_functor.h b/paddle/fluid/operators/math/cos_sim_functor.h index 0175bec6e7edf..1c0f994fd8733 100644 --- a/paddle/fluid/operators/math/cos_sim_functor.h +++ b/paddle/fluid/operators/math/cos_sim_functor.h @@ -16,8 +16,8 @@ limitations under the License. */ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/fluid/platform/device_context.h" -#include "paddle/phi/core/hostdevice.h" namespace paddle { namespace operators { diff --git a/paddle/fluid/operators/modified_huber_loss_op.cu b/paddle/fluid/operators/modified_huber_loss_op.cu index d063e8d1cb4d5..aec8c49cdd250 100644 --- a/paddle/fluid/operators/modified_huber_loss_op.cu +++ b/paddle/fluid/operators/modified_huber_loss_op.cu @@ -16,9 +16,9 @@ limitations under the License. */ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/operators/modified_huber_loss_op.h" -#include "paddle/phi/core/hostdevice.h" namespace paddle { namespace operators { diff --git a/paddle/fluid/operators/modified_huber_loss_op.h b/paddle/fluid/operators/modified_huber_loss_op.h index 4330abde2a828..88cb91d454e72 100644 --- a/paddle/fluid/operators/modified_huber_loss_op.h +++ b/paddle/fluid/operators/modified_huber_loss_op.h @@ -14,9 +14,9 @@ limitations under the License. */ #pragma once +#include "paddle/common/hostdevice.h" #include "paddle/fluid/framework/eigen.h" #include "paddle/fluid/framework/op_registry.h" -#include "paddle/phi/core/hostdevice.h" namespace paddle { namespace operators { diff --git a/paddle/fluid/operators/quantize_linear_op.h b/paddle/fluid/operators/quantize_linear_op.h index 1f1bfc3dea73b..48f4b472baab5 100644 --- a/paddle/fluid/operators/quantize_linear_op.h +++ b/paddle/fluid/operators/quantize_linear_op.h @@ -15,13 +15,13 @@ limitations under the License. */ #include #include "paddle/common/ddim.h" +#include "paddle/common/hostdevice.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/framework/tensor_util.h" #include "paddle/fluid/memory/malloc.h" #include "paddle/fluid/operators/fake_quantize_op.h" #include "paddle/phi/common/data_type.h" #include "paddle/phi/common/transform.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/cast_kernel.h" namespace paddle { diff --git a/paddle/phi/api/all.h b/paddle/phi/api/all.h index ec52102185970..93c97605f9f3f 100644 --- a/paddle/phi/api/all.h +++ b/paddle/phi/api/all.h @@ -29,14 +29,17 @@ limitations under the License. */ #include "paddle/phi/api/include/tensor_utils.h" // phi common headers -#include "paddle/common/layout.h" #include "paddle/phi/common/backend.h" #include "paddle/phi/common/data_type.h" #include "paddle/phi/common/int_array.h" #include "paddle/phi/common/scalar.h" // original custom op headers -#include "paddle/common/exception.h" #include "paddle/phi/api/ext/dispatch.h" #include "paddle/phi/api/ext/op_meta_info.h" #include "paddle/phi/api/ext/tensor_compat.h" + +// common headers +#include "paddle/common/ddim.h" +#include "paddle/common/exception.h" +#include "paddle/common/layout.h" diff --git a/paddle/phi/common/bfloat16.h b/paddle/phi/common/bfloat16.h index 028851e34c8bc..d3a7f3daf3762 100644 --- a/paddle/phi/common/bfloat16.h +++ b/paddle/phi/common/bfloat16.h @@ -20,7 +20,7 @@ #include #include #include -#include "paddle/phi/core/hostdevice.h" +#include "paddle/common/hostdevice.h" #ifdef PADDLE_WITH_CUDA #include diff --git a/paddle/phi/common/complex.h b/paddle/phi/common/complex.h index 5de6290fb7705..34605855137e0 100644 --- a/paddle/phi/common/complex.h +++ b/paddle/phi/common/complex.h @@ -20,7 +20,7 @@ #include #include #include -#include "paddle/phi/core/hostdevice.h" +#include "paddle/common/hostdevice.h" #ifdef PADDLE_WITH_CUDA #include #include diff --git a/paddle/phi/common/float16.h b/paddle/phi/common/float16.h index 9d60b8c6241ae..04411aa4cec49 100644 --- a/paddle/phi/common/float16.h +++ b/paddle/phi/common/float16.h @@ -32,7 +32,7 @@ #include #include -#include "paddle/phi/core/hostdevice.h" +#include "paddle/common/hostdevice.h" #ifdef PADDLE_WITH_CUDA #include #endif // PADDLE_WITH_CUDA diff --git a/paddle/phi/common/transform.h b/paddle/phi/common/transform.h index e80561284b885..d83b698a45bc6 100644 --- a/paddle/phi/common/transform.h +++ b/paddle/phi/common/transform.h @@ -17,9 +17,9 @@ limitations under the License. */ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/all_context.h" #include "paddle/phi/core/enforce.h" -#include "paddle/phi/core/hostdevice.h" #if defined(__NVCC__) || defined(__HIPCC__) #include diff --git a/paddle/phi/common/type_safe_sign_math.h b/paddle/phi/common/type_safe_sign_math.h index e5d3cf48e022d..3031b3d8f6a58 100644 --- a/paddle/phi/common/type_safe_sign_math.h +++ b/paddle/phi/common/type_safe_sign_math.h @@ -17,9 +17,9 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/float16.h" -#include "paddle/phi/core/hostdevice.h" namespace phi { diff --git a/paddle/phi/core/hostdevice.h b/paddle/phi/core/hostdevice.h deleted file mode 100644 index decebbe66a538..0000000000000 --- a/paddle/phi/core/hostdevice.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#pragma once - -#ifdef __HIPCC__ -#include -#endif - -#if defined(__xpu__) -#include - -#include "xpu/kernel/cluster_header.h" -#include "xpu/kernel/debug.h" -#include "xpu/kernel/math.h" -#endif - -#if (defined(__CUDACC__) || defined(__HIPCC__) || defined(__xpu__)) -#define HOSTDEVICE __host__ __device__ -#define DEVICE __device__ -#define HOST __host__ -#else -#define HOSTDEVICE -#define DEVICE -#define HOST -#endif diff --git a/paddle/phi/kernels/cpu/graph_send_recv_funcs.h b/paddle/phi/kernels/cpu/graph_send_recv_funcs.h index c67480cc9e33e..dc800876b99a1 100644 --- a/paddle/phi/kernels/cpu/graph_send_recv_funcs.h +++ b/paddle/phi/kernels/cpu/graph_send_recv_funcs.h @@ -16,9 +16,9 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/eigen/common.h" namespace phi { diff --git a/paddle/phi/kernels/cpu/graph_send_ue_recv_funcs.h b/paddle/phi/kernels/cpu/graph_send_ue_recv_funcs.h index 7647415d8e7cb..4af25b37f943b 100644 --- a/paddle/phi/kernels/cpu/graph_send_ue_recv_funcs.h +++ b/paddle/phi/kernels/cpu/graph_send_ue_recv_funcs.h @@ -16,9 +16,9 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/eigen/common.h" namespace phi { diff --git a/paddle/phi/kernels/cpu/send_u_recv_kernel.cc b/paddle/phi/kernels/cpu/send_u_recv_kernel.cc index 9e186aeedfab3..8d09034f35cb7 100644 --- a/paddle/phi/kernels/cpu/send_u_recv_kernel.cc +++ b/paddle/phi/kernels/cpu/send_u_recv_kernel.cc @@ -18,8 +18,8 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/cpu/cpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/cpu/graph_send_recv_funcs.h" diff --git a/paddle/phi/kernels/cpu/send_ue_recv_grad_kernel.cc b/paddle/phi/kernels/cpu/send_ue_recv_grad_kernel.cc index 404a163738070..0d0210ac661c0 100644 --- a/paddle/phi/kernels/cpu/send_ue_recv_grad_kernel.cc +++ b/paddle/phi/kernels/cpu/send_ue_recv_grad_kernel.cc @@ -17,8 +17,8 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/cpu/cpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/cpu/graph_send_recv_funcs.h" #include "paddle/phi/kernels/cpu/graph_send_ue_recv_funcs.h" diff --git a/paddle/phi/kernels/cpu/send_ue_recv_kernel.cc b/paddle/phi/kernels/cpu/send_ue_recv_kernel.cc index a53efc2bc17b0..73a671fde4e48 100644 --- a/paddle/phi/kernels/cpu/send_ue_recv_kernel.cc +++ b/paddle/phi/kernels/cpu/send_ue_recv_kernel.cc @@ -18,8 +18,8 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/cpu/cpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/cpu/graph_send_ue_recv_funcs.h" #include "paddle/phi/kernels/impl/graph_message_passing_impl.h" diff --git a/paddle/phi/kernels/cpu/send_uv_grad_kernel.cc b/paddle/phi/kernels/cpu/send_uv_grad_kernel.cc index 7c16308f7360a..152cd94856231 100644 --- a/paddle/phi/kernels/cpu/send_uv_grad_kernel.cc +++ b/paddle/phi/kernels/cpu/send_uv_grad_kernel.cc @@ -14,8 +14,8 @@ #include "paddle/phi/kernels/send_uv_grad_kernel.h" +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/cpu/cpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/empty_kernel.h" #include "paddle/phi/kernels/funcs/math_function.h" diff --git a/paddle/phi/kernels/cpu/send_uv_kernel.cc b/paddle/phi/kernels/cpu/send_uv_kernel.cc index 59f334c2b67f4..c5200182a1d08 100644 --- a/paddle/phi/kernels/cpu/send_uv_kernel.cc +++ b/paddle/phi/kernels/cpu/send_uv_kernel.cc @@ -14,8 +14,8 @@ #include "paddle/phi/kernels/send_uv_kernel.h" +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/cpu/cpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/cpu/graph_send_ue_recv_funcs.h" #include "paddle/phi/kernels/impl/graph_message_passing_impl.h" diff --git a/paddle/phi/kernels/funcs/algorithm.h b/paddle/phi/kernels/funcs/algorithm.h index 5f66f6f1abd4d..7ad7dce7928fc 100644 --- a/paddle/phi/kernels/funcs/algorithm.h +++ b/paddle/phi/kernels/funcs/algorithm.h @@ -18,7 +18,7 @@ #include // for int64_t #include -#include "paddle/phi/core/hostdevice.h" +#include "paddle/common/hostdevice.h" namespace phi { namespace funcs { diff --git a/paddle/phi/kernels/funcs/aligned_vector.h b/paddle/phi/kernels/funcs/aligned_vector.h index 753aa44b0aa3a..003b365c16d1d 100644 --- a/paddle/phi/kernels/funcs/aligned_vector.h +++ b/paddle/phi/kernels/funcs/aligned_vector.h @@ -16,8 +16,8 @@ limitations under the License. */ #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #if defined(__xpu__) #define CHAR_BIT 8 diff --git a/paddle/phi/kernels/funcs/complex_functors.h b/paddle/phi/kernels/funcs/complex_functors.h index e6ffeb3b5602e..c8848c2f6ce24 100644 --- a/paddle/phi/kernels/funcs/complex_functors.h +++ b/paddle/phi/kernels/funcs/complex_functors.h @@ -19,9 +19,9 @@ limitations under the License. */ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/common/complex.h" #include "paddle/phi/common/type_traits.h" -#include "paddle/phi/core/hostdevice.h" namespace phi { namespace funcs { diff --git a/paddle/phi/kernels/funcs/cross_entropy.h b/paddle/phi/kernels/funcs/cross_entropy.h index 3c4057420c3d4..ebba150cd9162 100644 --- a/paddle/phi/kernels/funcs/cross_entropy.h +++ b/paddle/phi/kernels/funcs/cross_entropy.h @@ -15,10 +15,10 @@ limitations under the License. */ #pragma once #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/float16.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/eigen/common.h" namespace phi { diff --git a/paddle/phi/kernels/funcs/detail/activation_functions.h b/paddle/phi/kernels/funcs/detail/activation_functions.h index 758503563680b..e635cd1cf0337 100644 --- a/paddle/phi/kernels/funcs/detail/activation_functions.h +++ b/paddle/phi/kernels/funcs/detail/activation_functions.h @@ -18,9 +18,9 @@ limitations under the License. */ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/common/macros.h" #include "paddle/phi/backends/cpu/cpu_info.h" -#include "paddle/phi/core/hostdevice.h" namespace phi { namespace funcs { namespace detail { diff --git a/paddle/phi/kernels/funcs/detail/gru_kernel.h b/paddle/phi/kernels/funcs/detail/gru_kernel.h index 9e2aef1940619..8ab0b44f7e627 100644 --- a/paddle/phi/kernels/funcs/detail/gru_kernel.h +++ b/paddle/phi/kernels/funcs/detail/gru_kernel.h @@ -15,7 +15,7 @@ limitations under the License. */ #pragma once #include -#include "paddle/phi/core/hostdevice.h" +#include "paddle/common/hostdevice.h" #include "paddle/phi/kernels/funcs/detail/activation_functions.h" // TODO(guosheng): refine code style in gru_kernel diff --git a/paddle/phi/kernels/funcs/detail/lstm_kernel.h b/paddle/phi/kernels/funcs/detail/lstm_kernel.h index 0846f05a0c2c5..8af7467e36e29 100644 --- a/paddle/phi/kernels/funcs/detail/lstm_kernel.h +++ b/paddle/phi/kernels/funcs/detail/lstm_kernel.h @@ -15,7 +15,7 @@ limitations under the License. */ #pragma once #include -#include "paddle/phi/core/hostdevice.h" +#include "paddle/common/hostdevice.h" #include "paddle/phi/kernels/funcs/detail/activation_functions.h" namespace phi { diff --git a/paddle/phi/kernels/funcs/diag_functor.h b/paddle/phi/kernels/funcs/diag_functor.h index 6fe54363e6f0e..424b7169a19b1 100644 --- a/paddle/phi/kernels/funcs/diag_functor.h +++ b/paddle/phi/kernels/funcs/diag_functor.h @@ -14,9 +14,9 @@ #pragma once +#include "paddle/common/hostdevice.h" #include "paddle/phi/common/type_traits.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/full_kernel.h" #include "paddle/phi/kernels/funcs/for_range.h" diff --git a/paddle/phi/kernels/funcs/distribution_helper.h b/paddle/phi/kernels/funcs/distribution_helper.h index abade7ac0ef87..07e04e94da60a 100644 --- a/paddle/phi/kernels/funcs/distribution_helper.h +++ b/paddle/phi/kernels/funcs/distribution_helper.h @@ -21,12 +21,12 @@ limitations under the License. */ #include #endif +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_info.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/generator.h" -#include "paddle/phi/core/hostdevice.h" #if defined(__NVCC__) || defined(__HIPCC__) #include "paddle/phi/kernels/funcs/index_impl.cu.h" diff --git a/paddle/phi/kernels/funcs/eigen/extensions.h b/paddle/phi/kernels/funcs/eigen/extensions.h index c724564417b19..285b58d29ed85 100644 --- a/paddle/phi/kernels/funcs/eigen/extensions.h +++ b/paddle/phi/kernels/funcs/eigen/extensions.h @@ -16,10 +16,10 @@ #ifndef __xpu__ +#include "paddle/common/hostdevice.h" #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/complex.h" #include "paddle/phi/common/float16.h" -#include "paddle/phi/core/hostdevice.h" #include "unsupported/Eigen/CXX11/Tensor" namespace Eigen { diff --git a/paddle/phi/kernels/funcs/elementwise_functor.h b/paddle/phi/kernels/funcs/elementwise_functor.h index eaf527fbba9f6..5477b952d08b3 100644 --- a/paddle/phi/kernels/funcs/elementwise_functor.h +++ b/paddle/phi/kernels/funcs/elementwise_functor.h @@ -14,12 +14,12 @@ limitations under the License. */ #pragma once +#include "paddle/common/hostdevice.h" #include "paddle/common/macros.h" #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/complex.h" #include "paddle/phi/common/float16.h" #include "paddle/phi/core/enforce.h" -#include "paddle/phi/core/hostdevice.h" #if defined(__xpu__) #include diff --git a/paddle/phi/kernels/funcs/fft_fill_conj.h b/paddle/phi/kernels/funcs/fft_fill_conj.h index ab6d351986ecc..c47257818f3a3 100644 --- a/paddle/phi/kernels/funcs/fft_fill_conj.h +++ b/paddle/phi/kernels/funcs/fft_fill_conj.h @@ -15,8 +15,8 @@ #pragma once #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/for_range.h" #if defined(__NVCC__) || defined(__HIPCC__) #include "thrust/device_vector.h" diff --git a/paddle/phi/kernels/funcs/index_impl.cu.h b/paddle/phi/kernels/funcs/index_impl.cu.h index cfe95f87f6335..84a665ac249d1 100644 --- a/paddle/phi/kernels/funcs/index_impl.cu.h +++ b/paddle/phi/kernels/funcs/index_impl.cu.h @@ -18,9 +18,9 @@ limitations under the License. */ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_launch_config.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/aligned_vector.h" #include "paddle/phi/kernels/primitive/kernel_primitives.h" diff --git a/paddle/phi/kernels/funcs/math.h b/paddle/phi/kernels/funcs/math.h index 004279c25d4af..f52175ccff7a3 100644 --- a/paddle/phi/kernels/funcs/math.h +++ b/paddle/phi/kernels/funcs/math.h @@ -15,8 +15,8 @@ #pragma once #include "math.h" // NOLINT +#include "paddle/common/hostdevice.h" #include "paddle/phi/common/float16.h" -#include "paddle/phi/core/hostdevice.h" namespace phi { namespace funcs { diff --git a/paddle/phi/kernels/funcs/pooling.h b/paddle/phi/kernels/funcs/pooling.h index 1ffd747735543..7fa3e68be5a11 100644 --- a/paddle/phi/kernels/funcs/pooling.h +++ b/paddle/phi/kernels/funcs/pooling.h @@ -18,10 +18,10 @@ limitations under the License. */ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/common/macros.h" // import FLT_MAX #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #include "paddle/phi/backends/gpu/gpu_decls.h" diff --git a/paddle/phi/kernels/funcs/quant_dequant.h b/paddle/phi/kernels/funcs/quant_dequant.h index c0ba1df5c6344..dc0007b4e606d 100644 --- a/paddle/phi/kernels/funcs/quant_dequant.h +++ b/paddle/phi/kernels/funcs/quant_dequant.h @@ -15,10 +15,10 @@ limitations under the License. */ #pragma once #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_launch_config.h" #include "paddle/phi/common/float16.h" #include "paddle/phi/common/transform.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/aligned_vector.h" #include "paddle/phi/kernels/funcs/blas/blas.h" diff --git a/paddle/phi/kernels/gpu/bce_loss_grad_kernel.cu b/paddle/phi/kernels/gpu/bce_loss_grad_kernel.cu index b50fc1301748c..942f1be4f1625 100644 --- a/paddle/phi/kernels/gpu/bce_loss_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/bce_loss_grad_kernel.cu @@ -17,10 +17,10 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/float16.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/elementwise_base.h" diff --git a/paddle/phi/kernels/gpu/bce_loss_kernel.cu b/paddle/phi/kernels/gpu/bce_loss_kernel.cu index 49191b3e354a7..c1e73afac71f9 100644 --- a/paddle/phi/kernels/gpu/bce_loss_kernel.cu +++ b/paddle/phi/kernels/gpu/bce_loss_kernel.cu @@ -17,10 +17,10 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/float16.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/elementwise_base.h" #include "paddle/phi/kernels/primitive/functor_primitives.h" diff --git a/paddle/phi/kernels/gpu/cum_grad_kernel.cu b/paddle/phi/kernels/gpu/cum_grad_kernel.cu index 0e99305ac3127..846a093db4f84 100644 --- a/paddle/phi/kernels/gpu/cum_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/cum_grad_kernel.cu @@ -27,11 +27,11 @@ namespace cub = hipcub; #endif +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/float16.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" namespace phi { diff --git a/paddle/phi/kernels/gpu/cum_kernel.cu b/paddle/phi/kernels/gpu/cum_kernel.cu index 831b225c61d84..c85dd99a3d401 100644 --- a/paddle/phi/kernels/gpu/cum_kernel.cu +++ b/paddle/phi/kernels/gpu/cum_kernel.cu @@ -26,12 +26,12 @@ namespace cub = hipcub; #endif +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/float16.h" #include "paddle/phi/common/memory_utils.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" namespace phi { diff --git a/paddle/phi/kernels/gpu/cum_maxmin_kernel.cu b/paddle/phi/kernels/gpu/cum_maxmin_kernel.cu index 24ba48429e10c..08b8b89afe4b3 100644 --- a/paddle/phi/kernels/gpu/cum_maxmin_kernel.cu +++ b/paddle/phi/kernels/gpu/cum_maxmin_kernel.cu @@ -16,8 +16,8 @@ #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/math_function.h" diff --git a/paddle/phi/kernels/gpu/depthwise_conv.h b/paddle/phi/kernels/gpu/depthwise_conv.h index 278b219b453d3..03c14a6234bda 100644 --- a/paddle/phi/kernels/gpu/depthwise_conv.h +++ b/paddle/phi/kernels/gpu/depthwise_conv.h @@ -15,8 +15,8 @@ limitations under the License. */ #pragma once #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" -#include "paddle/phi/core/hostdevice.h" #ifdef __NVCC__ #include diff --git a/paddle/phi/kernels/gpu/graph_reindex_funcs.h b/paddle/phi/kernels/gpu/graph_reindex_funcs.h index 2a5479e076e1d..eb26b434091cc 100644 --- a/paddle/phi/kernels/gpu/graph_reindex_funcs.h +++ b/paddle/phi/kernels/gpu/graph_reindex_funcs.h @@ -14,9 +14,9 @@ #pragma once +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/graph_reindex_kernel.h" namespace phi { diff --git a/paddle/phi/kernels/gpu/graph_sample_neighbors_kernel.cu b/paddle/phi/kernels/gpu/graph_sample_neighbors_kernel.cu index 20e1c6727ae91..595b803a68dfd 100644 --- a/paddle/phi/kernels/gpu/graph_sample_neighbors_kernel.cu +++ b/paddle/phi/kernels/gpu/graph_sample_neighbors_kernel.cu @@ -27,8 +27,8 @@ #include #endif +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/graph_sample_neighbors_kernel.h" diff --git a/paddle/phi/kernels/gpu/graph_send_recv_funcs.h b/paddle/phi/kernels/gpu/graph_send_recv_funcs.h index 9aacba8a7a3aa..0a6ccbe45b39f 100644 --- a/paddle/phi/kernels/gpu/graph_send_recv_funcs.h +++ b/paddle/phi/kernels/gpu/graph_send_recv_funcs.h @@ -19,9 +19,9 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/send_u_recv_kernel.h" namespace phi { diff --git a/paddle/phi/kernels/gpu/graph_send_ue_recv_funcs.h b/paddle/phi/kernels/gpu/graph_send_ue_recv_funcs.h index bff91078865d9..a5d6f3d8c6b06 100644 --- a/paddle/phi/kernels/gpu/graph_send_ue_recv_funcs.h +++ b/paddle/phi/kernels/gpu/graph_send_ue_recv_funcs.h @@ -17,9 +17,9 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/impl/graph_message_passing_impl.h" namespace phi { diff --git a/paddle/phi/kernels/gpu/nll_loss.h b/paddle/phi/kernels/gpu/nll_loss.h index 9d063d0ef44a0..648b69b45253c 100644 --- a/paddle/phi/kernels/gpu/nll_loss.h +++ b/paddle/phi/kernels/gpu/nll_loss.h @@ -19,9 +19,9 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/math.h" namespace phi { diff --git a/paddle/phi/kernels/gpu/send_u_recv_grad_kernel.cu b/paddle/phi/kernels/gpu/send_u_recv_grad_kernel.cu index b9c4a8daf2326..5f310da580d6a 100644 --- a/paddle/phi/kernels/gpu/send_u_recv_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/send_u_recv_grad_kernel.cu @@ -17,8 +17,8 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/gpu/graph_send_recv_funcs.h" diff --git a/paddle/phi/kernels/gpu/send_u_recv_kernel.cu b/paddle/phi/kernels/gpu/send_u_recv_kernel.cu index d4a08a72d80a9..69ba6a1830002 100644 --- a/paddle/phi/kernels/gpu/send_u_recv_kernel.cu +++ b/paddle/phi/kernels/gpu/send_u_recv_kernel.cu @@ -21,8 +21,8 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/math_function.h" #include "paddle/phi/kernels/gpu/graph_send_recv_funcs.h" diff --git a/paddle/phi/kernels/gpu/send_ue_recv_grad_kernel.cu b/paddle/phi/kernels/gpu/send_ue_recv_grad_kernel.cu index 5703b5faea07c..d021e877ddcf4 100644 --- a/paddle/phi/kernels/gpu/send_ue_recv_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/send_ue_recv_grad_kernel.cu @@ -13,8 +13,8 @@ // limitations under the License. #include "paddle/phi/kernels/send_ue_recv_grad_kernel.h" +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/empty_kernel.h" #include "paddle/phi/kernels/funcs/elementwise_functor.h" diff --git a/paddle/phi/kernels/gpu/send_ue_recv_kernel.cu b/paddle/phi/kernels/gpu/send_ue_recv_kernel.cu index c87f133d07b8d..1ed59c43e83d4 100644 --- a/paddle/phi/kernels/gpu/send_ue_recv_kernel.cu +++ b/paddle/phi/kernels/gpu/send_ue_recv_kernel.cu @@ -20,8 +20,8 @@ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/elementwise_functor.h" #include "paddle/phi/kernels/funcs/math_function.h" diff --git a/paddle/phi/kernels/gpu/send_uv_grad_kernel.cu b/paddle/phi/kernels/gpu/send_uv_grad_kernel.cu index bc61ae766d6c2..d5126979b84f6 100644 --- a/paddle/phi/kernels/gpu/send_uv_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/send_uv_grad_kernel.cu @@ -14,8 +14,8 @@ #include "paddle/phi/kernels/send_uv_grad_kernel.h" +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/empty_kernel.h" #include "paddle/phi/kernels/funcs/elementwise_functor.h" diff --git a/paddle/phi/kernels/gpu/send_uv_kernel.cu b/paddle/phi/kernels/gpu/send_uv_kernel.cu index 860a900dac834..cbc9e42ff84ea 100644 --- a/paddle/phi/kernels/gpu/send_uv_kernel.cu +++ b/paddle/phi/kernels/gpu/send_uv_kernel.cu @@ -16,8 +16,8 @@ #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/elementwise_functor.h" #include "paddle/phi/kernels/gpu/graph_send_ue_recv_funcs.h" diff --git a/paddle/phi/kernels/gpu/sigmoid_cross_entropy_with_logits.h b/paddle/phi/kernels/gpu/sigmoid_cross_entropy_with_logits.h index dc6d8312e06c7..2baa96d2a5160 100644 --- a/paddle/phi/kernels/gpu/sigmoid_cross_entropy_with_logits.h +++ b/paddle/phi/kernels/gpu/sigmoid_cross_entropy_with_logits.h @@ -16,9 +16,9 @@ #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_helper.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/funcs/elementwise_base.h" diff --git a/paddle/phi/kernels/gpu/weighted_sample_neighbors_kernel.cu b/paddle/phi/kernels/gpu/weighted_sample_neighbors_kernel.cu index d4e0ca632e04d..3b43459ad3728 100644 --- a/paddle/phi/kernels/gpu/weighted_sample_neighbors_kernel.cu +++ b/paddle/phi/kernels/gpu/weighted_sample_neighbors_kernel.cu @@ -26,9 +26,9 @@ #endif #include "math.h" // NOLINT +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/memory_utils.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/block_radix_topk.cuh" #include "paddle/phi/kernels/funcs/random.cuh" diff --git a/paddle/phi/kernels/impl/amp_kernel_impl.h b/paddle/phi/kernels/impl/amp_kernel_impl.h index ec857f3f640d5..cfe5b33814594 100644 --- a/paddle/phi/kernels/impl/amp_kernel_impl.h +++ b/paddle/phi/kernels/impl/amp_kernel_impl.h @@ -14,8 +14,8 @@ #pragma once +#include "paddle/common/hostdevice.h" #include "paddle/phi/common/amp_type_traits.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/amp_kernel.h" #include "paddle/phi/kernels/full_kernel.h" diff --git a/paddle/phi/kernels/impl/deformable_conv_grad_kernel_impl.h b/paddle/phi/kernels/impl/deformable_conv_grad_kernel_impl.h index fdd31e510510a..b9931a8997830 100644 --- a/paddle/phi/kernels/impl/deformable_conv_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/deformable_conv_grad_kernel_impl.h @@ -14,8 +14,8 @@ #pragma once +#include "paddle/common/hostdevice.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/empty_kernel.h" #include "paddle/phi/kernels/full_kernel.h" #include "paddle/phi/kernels/funcs/blas/blas.h" diff --git a/paddle/phi/kernels/impl/deformable_conv_kernel_impl.h b/paddle/phi/kernels/impl/deformable_conv_kernel_impl.h index d4647128963e5..9d3d66ab2dbe6 100644 --- a/paddle/phi/kernels/impl/deformable_conv_kernel_impl.h +++ b/paddle/phi/kernels/impl/deformable_conv_kernel_impl.h @@ -14,8 +14,8 @@ #pragma once +#include "paddle/common/hostdevice.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/empty_kernel.h" #include "paddle/phi/kernels/funcs/blas/blas.h" #include "paddle/phi/kernels/funcs/deformable_conv_functor.h" diff --git a/paddle/phi/kernels/impl/kldiv_loss_grad_kernel_impl.h b/paddle/phi/kernels/impl/kldiv_loss_grad_kernel_impl.h index d272e73303436..a5e6c3d8fbfae 100644 --- a/paddle/phi/kernels/impl/kldiv_loss_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/kldiv_loss_grad_kernel_impl.h @@ -15,8 +15,8 @@ #pragma once #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/eigen/common.h" namespace phi { diff --git a/paddle/phi/kernels/impl/kldiv_loss_kernel_impl.h b/paddle/phi/kernels/impl/kldiv_loss_kernel_impl.h index 851a78b07413e..4232e32597ed1 100644 --- a/paddle/phi/kernels/impl/kldiv_loss_kernel_impl.h +++ b/paddle/phi/kernels/impl/kldiv_loss_kernel_impl.h @@ -15,9 +15,9 @@ #pragma once #include +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/eigen/common.h" namespace phi { diff --git a/paddle/phi/kernels/impl/merged_momentum_impl.h b/paddle/phi/kernels/impl/merged_momentum_impl.h index 85f253fd32d49..32a6024ebee91 100644 --- a/paddle/phi/kernels/impl/merged_momentum_impl.h +++ b/paddle/phi/kernels/impl/merged_momentum_impl.h @@ -16,10 +16,10 @@ #include "glog/logging.h" +#include "paddle/common/hostdevice.h" #include "paddle/common/macros.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/kernels/funcs/for_range.h" #include "paddle/phi/kernels/impl/momentum_kernel_impl.h" #include "paddle/phi/kernels/merged_momentum_kernel.h" diff --git a/paddle/phi/kernels/impl/quantize_linear_impl.h b/paddle/phi/kernels/impl/quantize_linear_impl.h index 9f86fd07447ee..a454023d859d8 100644 --- a/paddle/phi/kernels/impl/quantize_linear_impl.h +++ b/paddle/phi/kernels/impl/quantize_linear_impl.h @@ -18,9 +18,9 @@ #include "paddle/phi/kernels/quantize_linear_kernel.h" +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/gpu/gpu_launch_config.h" #include "paddle/phi/common/place.h" -#include "paddle/phi/core/hostdevice.h" #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/cast_kernel.h" diff --git a/paddle/phi/kernels/nms_kernel.h b/paddle/phi/kernels/nms_kernel.h index e8511f4c4a49f..a8ceb0c1f3c84 100644 --- a/paddle/phi/kernels/nms_kernel.h +++ b/paddle/phi/kernels/nms_kernel.h @@ -14,8 +14,8 @@ #pragma once +#include "paddle/common/hostdevice.h" #include "paddle/phi/core/dense_tensor.h" -#include "paddle/phi/core/hostdevice.h" namespace phi { diff --git a/paddle/phi/kernels/strings/unicode.h b/paddle/phi/kernels/strings/unicode.h index 410543c27d68f..6dfb6aeb6ede6 100644 --- a/paddle/phi/kernels/strings/unicode.h +++ b/paddle/phi/kernels/strings/unicode.h @@ -17,8 +17,8 @@ limitations under the License. */ #include #include +#include "paddle/common/hostdevice.h" #include "paddle/common/macros.h" -#include "paddle/phi/core/hostdevice.h" namespace phi { namespace strings { diff --git a/test/cpp/phi/common/transform_test.cu b/test/cpp/phi/common/transform_test.cu index 22c72b6626f85..8326160d881b6 100644 --- a/test/cpp/phi/common/transform_test.cu +++ b/test/cpp/phi/common/transform_test.cu @@ -16,9 +16,9 @@ limitations under the License. */ #include "paddle/phi/common/transform.h" +#include "paddle/common/hostdevice.h" #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/common/memory_utils.h" -#include "paddle/phi/core/hostdevice.h" template class Scale {