From 5664ea26a0c2ed61bca5857877a3bc6ef0a1d01c Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Thu, 13 Apr 2023 14:17:44 +0800 Subject: [PATCH] [enforce.h Decouple logging.h] Delete glog/logging.h from enforce.h (#52651) * [enforce.h Decouple logging.h] Delete glog/logging.h from enforce.h * Add logging.h for profiler.cc * Add logging.h for gloo_utils.h * Add logging.h for addmm_kernel_impl.h * Add logging.h for addmm_grad_kernel_impl.h * Add logging.h for p_send_kernel.cu * Add logging.h for determinant_grad_kernel_impl.h * Add logging.h for p_recv_kernel.cu * Add logging.h for elementwise_grad_base.h * Add logging.h for transfer_layout_kernel.cc * Add logging.h for eigvals_kernel.cc and index_select_impl.h * Add logging.h for all files in kernel directory * Add logging.h for xpu_info.cc * Add logging.h for xpu --- paddle/fluid/framework/ir/delete_cast_op_pass.cc | 2 ++ paddle/fluid/framework/ir/xpu/conv2d_xpu_fuse_pass.cc | 3 +++ paddle/fluid/framework/ir/xpu/delete_isolated_node_pass.cc | 3 +++ paddle/fluid/framework/ir/xpu/fc_xpu_fuse_pass.cc | 3 +++ .../ir/xpu/fused_multi_transformer_xpu_quant_pass.cc | 3 +++ .../ir/xpu/fused_multi_transformer_xpu_quant_pass_tester.cc | 2 ++ .../framework/ir/xpu/generate_sequence_xpu_fuse_pass.cc | 3 +++ paddle/fluid/framework/ir/xpu/link_xpu_op_max_pass.cc | 3 +++ .../framework/ir/xpu/multi_encoder_xpu_slice_fuse_pass.cc | 3 +++ paddle/fluid/framework/ir/xpu/one_beam_size_fuse_pass.cc | 3 +++ paddle/fluid/framework/ir/xpu/stack_fuse_pass.cc | 3 +++ .../fluid/memory/allocation/cuda_device_context_allocator.h | 2 ++ paddle/fluid/platform/device/xpu/bkcl_helper.h | 2 ++ paddle/fluid/platform/device/xpu/xpu_op_list.cc | 2 ++ paddle/phi/api/lib/data_transform.cc | 2 ++ paddle/phi/api/lib/tensor_copy.cc | 2 ++ paddle/phi/api/lib/tensor_method.cc | 2 ++ paddle/phi/api/profiler/profiler.cc | 2 ++ paddle/phi/api/yaml/generator/strings_api_gen.py | 2 ++ paddle/phi/backends/context_pool.cc | 3 +++ paddle/phi/backends/custom/custom_device.cc | 2 ++ paddle/phi/backends/event.cc | 2 ++ paddle/phi/backends/gpu/cuda/cuda_graph.h | 2 ++ paddle/phi/backends/gpu/cuda/cuda_info.cc | 2 ++ paddle/phi/backends/gpu/gpu_resources.cc | 1 + paddle/phi/backends/onednn/onednn_context.cc | 2 ++ paddle/phi/backends/stream.cc | 2 ++ paddle/phi/backends/xpu/xpu_context.cc | 2 ++ paddle/phi/backends/xpu/xpu_info.cc | 2 ++ paddle/phi/core/cuda_stream.h | 2 ++ paddle/phi/core/dense_tensor.cc | 2 ++ paddle/phi/core/distributed/check/nccl_dynamic_check.cc | 2 ++ paddle/phi/core/distributed/gloo_utils.h | 2 ++ paddle/phi/core/distributed/nccl_comm_context.cc | 3 +++ paddle/phi/core/distributed/store/tcp_store.cc | 2 ++ paddle/phi/core/distributed/store/tcp_utils.cc | 2 ++ paddle/phi/core/enforce.h | 1 - paddle/phi/core/selected_rows_impl.cc | 3 +++ paddle/phi/core/string_tensor.cc | 2 ++ paddle/phi/core/tensor_utils.cc | 2 ++ paddle/phi/infermeta/multiary.cc | 2 ++ paddle/phi/kernels/coalesce_tensor_kernel.cc | 2 ++ paddle/phi/kernels/cpu/adam_kernel.cc | 2 ++ paddle/phi/kernels/cpu/adamw_kernel.cc | 2 ++ paddle/phi/kernels/cpu/add_n_kernel.cc | 2 ++ paddle/phi/kernels/cpu/batch_norm_grad_kernel.cc | 2 ++ paddle/phi/kernels/cpu/eigvals_kernel.cc | 2 ++ paddle/phi/kernels/cpu/gelu_grad_kernel.cc | 2 ++ paddle/phi/kernels/cpu/gelu_kernel.cc | 2 ++ paddle/phi/kernels/cpu/index_add_impl.h | 2 ++ paddle/phi/kernels/cpu/index_sample_kernel.cc | 2 ++ paddle/phi/kernels/cpu/index_select_impl.h | 2 ++ paddle/phi/kernels/cpu/roll_kernel_impl.h | 2 ++ paddle/phi/kernels/funcs/batch_norm_utils.h | 2 ++ paddle/phi/kernels/funcs/blas/blas_impl.cu.h | 2 ++ paddle/phi/kernels/funcs/blas/blaslt_impl.cu.h | 2 ++ paddle/phi/kernels/funcs/concat_and_split_functor.cu | 2 ++ paddle/phi/kernels/funcs/dims_simplifier.h | 2 ++ paddle/phi/kernels/funcs/elementwise_grad_base.h | 2 ++ paddle/phi/kernels/funcs/fused_gemm_epilogue.h | 1 + paddle/phi/kernels/funcs/gather_scatter_functor.cc | 2 ++ paddle/phi/kernels/funcs/layer_norm_impl.cu.h | 2 ++ paddle/phi/kernels/funcs/selected_rows_functor.cc | 2 ++ paddle/phi/kernels/funcs/selected_rows_functor.cu | 2 ++ paddle/phi/kernels/funcs/sparse/sparse_blas_impl.cu.h | 2 ++ paddle/phi/kernels/funcs/stack_and_unstack.h | 2 ++ paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.cu | 2 ++ paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.h | 2 ++ paddle/phi/kernels/fusion/gpu/attn_gemm.h | 2 ++ paddle/phi/kernels/fusion/gpu/conv_fusion_kernel.cu | 2 ++ paddle/phi/kernels/fusion/gpu/fmha_ref.h | 2 ++ paddle/phi/kernels/fusion/gpu/fused_dropout_helper.h | 2 ++ .../fusion/gpu/fused_layernorm_residual_dropout_bias.h | 2 ++ .../kernels/fusion/gpu/fused_linear_param_grad_add_kernel.cu | 2 ++ paddle/phi/kernels/fusion/onednn/fused_transpose_kernel.cc | 2 ++ .../kernels/fusion/xpu/fused_multi_transformer_xpu_kernel.cc | 3 +++ paddle/phi/kernels/gpu/activation_grad_kernel.cu | 2 ++ paddle/phi/kernels/gpu/adam_kernel.cu | 2 ++ paddle/phi/kernels/gpu/adamw_kernel.cu | 2 ++ paddle/phi/kernels/gpu/affine_grid_grad_kernel.cu | 2 ++ paddle/phi/kernels/gpu/batch_norm_grad_kernel.cu | 2 ++ paddle/phi/kernels/gpu/batch_norm_kernel.cu | 2 ++ paddle/phi/kernels/gpu/elementwise_grad.h | 2 ++ paddle/phi/kernels/gpu/embedding_grad_kernel.cu | 1 + paddle/phi/kernels/gpu/gelu_funcs.h | 2 ++ paddle/phi/kernels/gpu/grid_sample_kernel.cu | 2 ++ paddle/phi/kernels/gpu/index_add_kernel.cu | 1 + paddle/phi/kernels/gpu/index_select_grad_kernel.cu | 1 + paddle/phi/kernels/gpu/instance_norm_grad_kernel.cu | 3 +++ paddle/phi/kernels/gpu/instance_norm_kernel.cu | 2 ++ paddle/phi/kernels/gpu/p_recv_kernel.cu | 2 ++ paddle/phi/kernels/gpu/p_send_kernel.cu | 2 ++ paddle/phi/kernels/gpu/prelu_kernel.cu | 2 ++ paddle/phi/kernels/gpu/rnn_kernel.cu.cc | 2 ++ paddle/phi/kernels/gpu/top_k_kernel.cu | 2 ++ paddle/phi/kernels/gpudnn/conv_cudnn_frontend.h | 2 ++ paddle/phi/kernels/gpudnn/conv_cudnn_v7.h | 2 ++ paddle/phi/kernels/gpudnn/conv_gpudnn_base.h | 2 ++ paddle/phi/kernels/gpudnn/conv_grad_kernel.cu | 2 ++ paddle/phi/kernels/gpudnn/conv_kernel.cu | 2 ++ paddle/phi/kernels/gpudnn/conv_miopen_helper.h | 2 ++ paddle/phi/kernels/impl/activation_grad_impl.h | 2 ++ paddle/phi/kernels/impl/addmm_grad_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/addmm_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/determinant_grad_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/determinant_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/dot_grad_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/einsum_grad_impl.h | 2 ++ paddle/phi/kernels/impl/elementwise_grad_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/lamb_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/matmul_grad_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/matmul_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/merged_momentum_impl.h | 2 ++ paddle/phi/kernels/impl/momentum_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/set_value_grad_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/slogdeterminant_grad_kernel_impl.h | 2 ++ paddle/phi/kernels/impl/slogdeterminant_kernel_impl.h | 2 ++ paddle/phi/kernels/npu_identity_kernel.cc | 2 ++ paddle/phi/kernels/onednn/transpose_kernel.cc | 3 +++ paddle/phi/kernels/selected_rows/cpu/adam_kernel.cc | 1 + paddle/phi/kernels/selected_rows/cpu/adamw_kernel.cc | 2 ++ paddle/phi/kernels/selected_rows/gpu/adam_kernel.cu | 2 ++ paddle/phi/kernels/selected_rows/gpu/adamw_kernel.cu | 2 ++ paddle/phi/kernels/selected_rows/impl/lamb_kernel_impl.h | 2 ++ paddle/phi/kernels/selected_rows/xpu/adam_kernel.cc | 2 ++ paddle/phi/kernels/share_buffer_kernel.cc | 2 ++ paddle/phi/kernels/strings/gpu/strings_copy_kernel.cu | 2 ++ paddle/phi/kernels/transfer_layout_kernel.cc | 2 ++ paddle/phi/kernels/xpu/adam_kernel.cc | 2 ++ paddle/phi/kernels/xpu/adamw_kernel.cc | 2 ++ paddle/phi/kernels/xpu/amp_kernel.cc | 2 ++ paddle/phi/kernels/xpu/set_value_grad_kernel.cc | 5 +++-- test/cpp/phi/core/test_sparse_csr_tensor.cc | 1 + test/cpp/phi/core/test_string_tensor.cc | 1 + test/cpp/phi/core/test_tensor_array.cc | 4 ++-- test/cpp/phi/kernels/test_strings_lower_upper_dev_api.cc | 2 ++ 136 files changed, 278 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/framework/ir/delete_cast_op_pass.cc b/paddle/fluid/framework/ir/delete_cast_op_pass.cc index 5df0128f482..3bf2e53e405 100644 --- a/paddle/fluid/framework/ir/delete_cast_op_pass.cc +++ b/paddle/fluid/framework/ir/delete_cast_op_pass.cc @@ -14,6 +14,8 @@ #include "paddle/fluid/framework/ir/delete_cast_op_pass.h" +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/op_version_registry.h" #include "paddle/fluid/platform/enforce.h" diff --git a/paddle/fluid/framework/ir/xpu/conv2d_xpu_fuse_pass.cc b/paddle/fluid/framework/ir/xpu/conv2d_xpu_fuse_pass.cc index 0b591120014..af5ec2c651c 100644 --- a/paddle/fluid/framework/ir/xpu/conv2d_xpu_fuse_pass.cc +++ b/paddle/fluid/framework/ir/xpu/conv2d_xpu_fuse_pass.cc @@ -13,6 +13,9 @@ // limitations under the License. #include + +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/fuse_pass_base.h" #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/ir/pass.h" diff --git a/paddle/fluid/framework/ir/xpu/delete_isolated_node_pass.cc b/paddle/fluid/framework/ir/xpu/delete_isolated_node_pass.cc index c1137c319d2..b96fc8c31bb 100644 --- a/paddle/fluid/framework/ir/xpu/delete_isolated_node_pass.cc +++ b/paddle/fluid/framework/ir/xpu/delete_isolated_node_pass.cc @@ -13,6 +13,9 @@ // limitations under the License. #include + +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/ir/pass.h" #include "paddle/fluid/framework/ir/xpu/pass_utils.h" diff --git a/paddle/fluid/framework/ir/xpu/fc_xpu_fuse_pass.cc b/paddle/fluid/framework/ir/xpu/fc_xpu_fuse_pass.cc index cd9febd8ec8..74b021bf1af 100644 --- a/paddle/fluid/framework/ir/xpu/fc_xpu_fuse_pass.cc +++ b/paddle/fluid/framework/ir/xpu/fc_xpu_fuse_pass.cc @@ -13,6 +13,9 @@ // limitations under the License. #include + +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/fuse_pass_base.h" #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/ir/pass.h" diff --git a/paddle/fluid/framework/ir/xpu/fused_multi_transformer_xpu_quant_pass.cc b/paddle/fluid/framework/ir/xpu/fused_multi_transformer_xpu_quant_pass.cc index e79c37c127b..fab466a5063 100644 --- a/paddle/fluid/framework/ir/xpu/fused_multi_transformer_xpu_quant_pass.cc +++ b/paddle/fluid/framework/ir/xpu/fused_multi_transformer_xpu_quant_pass.cc @@ -13,6 +13,9 @@ // limitations under the License. #include + +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/fuse_pass_base.h" #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/ir/pass.h" diff --git a/paddle/fluid/framework/ir/xpu/fused_multi_transformer_xpu_quant_pass_tester.cc b/paddle/fluid/framework/ir/xpu/fused_multi_transformer_xpu_quant_pass_tester.cc index d3181dbde46..cdcc20cb2f7 100644 --- a/paddle/fluid/framework/ir/xpu/fused_multi_transformer_xpu_quant_pass_tester.cc +++ b/paddle/fluid/framework/ir/xpu/fused_multi_transformer_xpu_quant_pass_tester.cc @@ -11,6 +11,8 @@ limitations under the License. */ #include +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/pass.h" #include "paddle/fluid/framework/ir/pass_tester_helper.h" diff --git a/paddle/fluid/framework/ir/xpu/generate_sequence_xpu_fuse_pass.cc b/paddle/fluid/framework/ir/xpu/generate_sequence_xpu_fuse_pass.cc index 7b40b67824d..5be359c0cd1 100644 --- a/paddle/fluid/framework/ir/xpu/generate_sequence_xpu_fuse_pass.cc +++ b/paddle/fluid/framework/ir/xpu/generate_sequence_xpu_fuse_pass.cc @@ -13,6 +13,9 @@ // limitations under the License. #include + +#include "glog/logging.h" + #include "paddle/fluid/framework/convert_utils.h" #include "paddle/fluid/framework/ir/fuse_pass_base.h" #include "paddle/fluid/framework/ir/graph_pattern_detector.h" diff --git a/paddle/fluid/framework/ir/xpu/link_xpu_op_max_pass.cc b/paddle/fluid/framework/ir/xpu/link_xpu_op_max_pass.cc index 932d4ca7b88..e100db36c27 100644 --- a/paddle/fluid/framework/ir/xpu/link_xpu_op_max_pass.cc +++ b/paddle/fluid/framework/ir/xpu/link_xpu_op_max_pass.cc @@ -13,6 +13,9 @@ // limitations under the License. #include + +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/fuse_pass_base.h" #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/ir/pass.h" diff --git a/paddle/fluid/framework/ir/xpu/multi_encoder_xpu_slice_fuse_pass.cc b/paddle/fluid/framework/ir/xpu/multi_encoder_xpu_slice_fuse_pass.cc index 722ac525d41..59754f9d581 100644 --- a/paddle/fluid/framework/ir/xpu/multi_encoder_xpu_slice_fuse_pass.cc +++ b/paddle/fluid/framework/ir/xpu/multi_encoder_xpu_slice_fuse_pass.cc @@ -13,6 +13,9 @@ // limitations under the License. #include + +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/fuse_pass_base.h" #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/ir/pass.h" diff --git a/paddle/fluid/framework/ir/xpu/one_beam_size_fuse_pass.cc b/paddle/fluid/framework/ir/xpu/one_beam_size_fuse_pass.cc index c6adf390fad..2944f9c7a51 100644 --- a/paddle/fluid/framework/ir/xpu/one_beam_size_fuse_pass.cc +++ b/paddle/fluid/framework/ir/xpu/one_beam_size_fuse_pass.cc @@ -14,6 +14,9 @@ #include "paddle/fluid/framework/ir/xpu/one_beam_size_fuse_pass.h" #include + +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/ir/xpu/pass_utils.h" #include "paddle/fluid/framework/op_version_registry.h" diff --git a/paddle/fluid/framework/ir/xpu/stack_fuse_pass.cc b/paddle/fluid/framework/ir/xpu/stack_fuse_pass.cc index a128011159d..ff7a0b30237 100644 --- a/paddle/fluid/framework/ir/xpu/stack_fuse_pass.cc +++ b/paddle/fluid/framework/ir/xpu/stack_fuse_pass.cc @@ -13,6 +13,9 @@ // limitations under the License. #include + +#include "glog/logging.h" + #include "paddle/fluid/framework/ir/fuse_pass_base.h" #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/ir/pass.h" diff --git a/paddle/fluid/memory/allocation/cuda_device_context_allocator.h b/paddle/fluid/memory/allocation/cuda_device_context_allocator.h index c8c1f7a61e6..7286f84160c 100644 --- a/paddle/fluid/memory/allocation/cuda_device_context_allocator.h +++ b/paddle/fluid/memory/allocation/cuda_device_context_allocator.h @@ -19,6 +19,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/fluid/memory/allocation/allocator.h" #include "paddle/fluid/platform/cuda_device_guard.h" #include "paddle/fluid/platform/device_context.h" diff --git a/paddle/fluid/platform/device/xpu/bkcl_helper.h b/paddle/fluid/platform/device/xpu/bkcl_helper.h index e7c968bd34f..1f44bc0a8c9 100644 --- a/paddle/fluid/platform/device/xpu/bkcl_helper.h +++ b/paddle/fluid/platform/device/xpu/bkcl_helper.h @@ -25,6 +25,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/fluid/framework/data_type.h" #include "paddle/fluid/framework/scope.h" #include "paddle/fluid/platform/collective_helper.h" diff --git a/paddle/fluid/platform/device/xpu/xpu_op_list.cc b/paddle/fluid/platform/device/xpu/xpu_op_list.cc index 1b12b9ebf94..abe5bcd8c6c 100644 --- a/paddle/fluid/platform/device/xpu/xpu_op_list.cc +++ b/paddle/fluid/platform/device/xpu/xpu_op_list.cc @@ -15,6 +15,8 @@ limitations under the License. */ #include #include +#include "glog/logging.h" + #include "paddle/fluid/framework/convert_utils.h" #include "paddle/fluid/platform/device/xpu/xpu_info.h" #include "paddle/phi/backends/xpu/xpu_op_kpfirst_list.h" diff --git a/paddle/phi/api/lib/data_transform.cc b/paddle/phi/api/lib/data_transform.cc index db848413d9f..d5e09c052c0 100644 --- a/paddle/phi/api/lib/data_transform.cc +++ b/paddle/phi/api/lib/data_transform.cc @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/api/lib/data_transform.h" +#include "glog/logging.h" + #include "paddle/phi/api/lib/kernel_dispatch.h" #include "paddle/phi/api/lib/utils/allocator.h" #include "paddle/phi/backends/context_pool.h" diff --git a/paddle/phi/api/lib/tensor_copy.cc b/paddle/phi/api/lib/tensor_copy.cc index 5bbb178f504..ac3f80bed0c 100644 --- a/paddle/phi/api/lib/tensor_copy.cc +++ b/paddle/phi/api/lib/tensor_copy.cc @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/api/lib/tensor_copy.h" +#include "glog/logging.h" + #include "paddle/phi/api/include/context_pool.h" #include "paddle/phi/api/lib/api_gen_utils.h" #include "paddle/phi/api/lib/kernel_dispatch.h" diff --git a/paddle/phi/api/lib/tensor_method.cc b/paddle/phi/api/lib/tensor_method.cc index 5efd89d34e1..2b5269f5882 100644 --- a/paddle/phi/api/lib/tensor_method.cc +++ b/paddle/phi/api/lib/tensor_method.cc @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/api/include/tensor.h" +#include "glog/logging.h" + #include "paddle/phi/common/int_array.h" #include "paddle/phi/core/compat/convert_utils.h" #include "paddle/phi/core/tensor_base.h" diff --git a/paddle/phi/api/profiler/profiler.cc b/paddle/phi/api/profiler/profiler.cc index 3c7f405a011..906ca12c7c5 100644 --- a/paddle/phi/api/profiler/profiler.cc +++ b/paddle/phi/api/profiler/profiler.cc @@ -20,6 +20,8 @@ limitations under the License. */ #include #include +#include "glog/logging.h" + #include "paddle/phi/api/profiler/common_event.h" #include "paddle/phi/api/profiler/device_tracer.h" #include "paddle/phi/api/profiler/host_event_recorder.h" diff --git a/paddle/phi/api/yaml/generator/strings_api_gen.py b/paddle/phi/api/yaml/generator/strings_api_gen.py index 53f4cd6e0df..b66342d7815 100644 --- a/paddle/phi/api/yaml/generator/strings_api_gen.py +++ b/paddle/phi/api/yaml/generator/strings_api_gen.py @@ -330,6 +330,8 @@ def source_include(header_file_path): #include "{header_file_path}" #include "gflags/gflags.h" +#include "glog/logging.h" + #include "paddle/phi/api/lib/api_gen_utils.h" #include "paddle/phi/core/kernel_context.h" #include "paddle/phi/core/string_tensor.h" diff --git a/paddle/phi/backends/context_pool.cc b/paddle/phi/backends/context_pool.cc index fdc156d5617..b05aa51205a 100644 --- a/paddle/phi/backends/context_pool.cc +++ b/paddle/phi/backends/context_pool.cc @@ -13,6 +13,9 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/phi/backends/context_pool.h" + +#include "glog/logging.h" + #include "paddle/phi/common/memory_utils.h" #include "paddle/phi/core/enforce.h" diff --git a/paddle/phi/backends/custom/custom_device.cc b/paddle/phi/backends/custom/custom_device.cc index cee4f56d63c..46535ee8477 100644 --- a/paddle/phi/backends/custom/custom_device.cc +++ b/paddle/phi/backends/custom/custom_device.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "glog/logging.h" + #include "paddle/phi/api/profiler/trace_event_collector.h" #include "paddle/phi/backends/callback_manager.h" #include "paddle/phi/backends/context_pool.h" diff --git a/paddle/phi/backends/event.cc b/paddle/phi/backends/event.cc index 7e64bc58fdb..371e858a3fe 100644 --- a/paddle/phi/backends/event.cc +++ b/paddle/phi/backends/event.cc @@ -14,6 +14,8 @@ #include "paddle/phi/backends/event.h" +#include "glog/logging.h" + #include "paddle/phi/backends/device_guard.h" #include "paddle/phi/backends/stream.h" diff --git a/paddle/phi/backends/gpu/cuda/cuda_graph.h b/paddle/phi/backends/gpu/cuda/cuda_graph.h index abf9dac21db..2f61e031f11 100644 --- a/paddle/phi/backends/gpu/cuda/cuda_graph.h +++ b/paddle/phi/backends/gpu/cuda/cuda_graph.h @@ -26,6 +26,8 @@ #include "cuda.h" // NOLINT #include "cuda_runtime.h" // NOLINT +#include "glog/logging.h" + #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/memory_utils.h" diff --git a/paddle/phi/backends/gpu/cuda/cuda_info.cc b/paddle/phi/backends/gpu/cuda/cuda_info.cc index 1ef1327cd6d..297b0a5e132 100644 --- a/paddle/phi/backends/gpu/cuda/cuda_info.cc +++ b/paddle/phi/backends/gpu/cuda/cuda_info.cc @@ -14,6 +14,8 @@ #include "paddle/phi/backends/gpu/gpu_info.h" +#include "glog/logging.h" + #include "paddle/phi/core/enforce.h" static std::once_flag g_device_props_size_init_flag; diff --git a/paddle/phi/backends/gpu/gpu_resources.cc b/paddle/phi/backends/gpu/gpu_resources.cc index 1b484b50336..622891c93bb 100644 --- a/paddle/phi/backends/gpu/gpu_resources.cc +++ b/paddle/phi/backends/gpu/gpu_resources.cc @@ -33,6 +33,7 @@ #endif // !defined(__APPLE__) && defined(PADDLE_WITH_NCCL) #endif // PADDLE_WITH_CUDA +#include "glog/logging.h" #include "unsupported/Eigen/CXX11/Tensor" #include "paddle/phi/core/enforce.h" diff --git a/paddle/phi/backends/onednn/onednn_context.cc b/paddle/phi/backends/onednn/onednn_context.cc index a536651cbab..5095b5c234b 100644 --- a/paddle/phi/backends/onednn/onednn_context.cc +++ b/paddle/phi/backends/onednn/onednn_context.cc @@ -21,6 +21,8 @@ #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/core/expect.h" +#include "glog/logging.h" + namespace phi { OneDNNContextThreadLocals::Body::Body() diff --git a/paddle/phi/backends/stream.cc b/paddle/phi/backends/stream.cc index 097f4426458..52bb1d2e549 100644 --- a/paddle/phi/backends/stream.cc +++ b/paddle/phi/backends/stream.cc @@ -14,6 +14,8 @@ #include "paddle/phi/backends/stream.h" +#include "glog/logging.h" + #include "paddle/phi/backends/device_guard.h" #include "paddle/phi/backends/event.h" diff --git a/paddle/phi/backends/xpu/xpu_context.cc b/paddle/phi/backends/xpu/xpu_context.cc index c1fc20761dc..b1d768f8445 100644 --- a/paddle/phi/backends/xpu/xpu_context.cc +++ b/paddle/phi/backends/xpu/xpu_context.cc @@ -16,6 +16,8 @@ #include +#include "glog/logging.h" + #include "paddle/phi/api/ext/exception.h" #include "paddle/phi/backends/xpu/enforce_xpu.h" #include "paddle/phi/common/place.h" diff --git a/paddle/phi/backends/xpu/xpu_info.cc b/paddle/phi/backends/xpu/xpu_info.cc index 997d3cd9d11..a8fbf7e7e6b 100644 --- a/paddle/phi/backends/xpu/xpu_info.cc +++ b/paddle/phi/backends/xpu/xpu_info.cc @@ -14,6 +14,8 @@ limitations under the License. */ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/xpu/enforce_xpu.h" #include "paddle/phi/backends/xpu/xpu_context.h" #include "paddle/phi/backends/xpu/xpu_header.h" diff --git a/paddle/phi/core/cuda_stream.h b/paddle/phi/core/cuda_stream.h index ff2f4846b17..b27770b0814 100644 --- a/paddle/phi/core/cuda_stream.h +++ b/paddle/phi/core/cuda_stream.h @@ -28,6 +28,8 @@ using gpuStream_t = cudaStream_t; using gpuStream_t = hipStream_t; #endif +#include "glog/logging.h" + #include "paddle/phi/core/enforce.h" namespace phi { diff --git a/paddle/phi/core/dense_tensor.cc b/paddle/phi/core/dense_tensor.cc index fc84ec1b33d..3116093a788 100644 --- a/paddle/phi/core/dense_tensor.cc +++ b/paddle/phi/core/dense_tensor.cc @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/core/dense_tensor.h" +#include "glog/logging.h" + #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/complex.h" #include "paddle/phi/common/float16.h" diff --git a/paddle/phi/core/distributed/check/nccl_dynamic_check.cc b/paddle/phi/core/distributed/check/nccl_dynamic_check.cc index da8fb5d98a8..57bdf12bce7 100644 --- a/paddle/phi/core/distributed/check/nccl_dynamic_check.cc +++ b/paddle/phi/core/distributed/check/nccl_dynamic_check.cc @@ -14,6 +14,8 @@ #include "paddle/phi/core/distributed/check/nccl_dynamic_check.h" +#include "glog/logging.h" + #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/enforce.h" #include "paddle/phi/core/errors.h" diff --git a/paddle/phi/core/distributed/gloo_utils.h b/paddle/phi/core/distributed/gloo_utils.h index 80e5fca49af..57e029c17ac 100644 --- a/paddle/phi/core/distributed/gloo_utils.h +++ b/paddle/phi/core/distributed/gloo_utils.h @@ -22,6 +22,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/phi/common/data_type.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/distributed/reduce_helper.h" diff --git a/paddle/phi/core/distributed/nccl_comm_context.cc b/paddle/phi/core/distributed/nccl_comm_context.cc index df80bf38742..49a58f8f10f 100644 --- a/paddle/phi/core/distributed/nccl_comm_context.cc +++ b/paddle/phi/core/distributed/nccl_comm_context.cc @@ -13,6 +13,9 @@ // limitations under the License. #include "paddle/phi/core/distributed/nccl_comm_context.h" + +#include "glog/logging.h" + #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/distributed/check/nccl_dynamic_check.h" #include "paddle/phi/core/distributed/check/static_check.h" diff --git a/paddle/phi/core/distributed/store/tcp_store.cc b/paddle/phi/core/distributed/store/tcp_store.cc index dcf75042c10..98b1ad3f850 100644 --- a/paddle/phi/core/distributed/store/tcp_store.cc +++ b/paddle/phi/core/distributed/store/tcp_store.cc @@ -18,6 +18,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/phi/core/distributed/store/tcp_utils.h" #include "paddle/phi/core/flags.h" diff --git a/paddle/phi/core/distributed/store/tcp_utils.cc b/paddle/phi/core/distributed/store/tcp_utils.cc index 516c6437e0f..aaf00cb8000 100644 --- a/paddle/phi/core/distributed/store/tcp_utils.cc +++ b/paddle/phi/core/distributed/store/tcp_utils.cc @@ -18,6 +18,8 @@ #include #include +#include "glog/logging.h" + namespace phi { namespace distributed { namespace tcputils { diff --git a/paddle/phi/core/enforce.h b/paddle/phi/core/enforce.h index 70cd7af19cd..96006fe83a4 100644 --- a/paddle/phi/core/enforce.h +++ b/paddle/phi/core/enforce.h @@ -59,7 +59,6 @@ limitations under the License. */ #endif #define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h -#include "glog/logging.h" #include "paddle/phi/core/errors.h" #include "paddle/phi/backends/dynload/port.h" diff --git a/paddle/phi/core/selected_rows_impl.cc b/paddle/phi/core/selected_rows_impl.cc index f0fbefe2fc5..e64474ea0d4 100644 --- a/paddle/phi/core/selected_rows_impl.cc +++ b/paddle/phi/core/selected_rows_impl.cc @@ -13,6 +13,9 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/phi/core/selected_rows_impl.h" + +#include "glog/logging.h" + #include "paddle/phi/common/memory_utils.h" #include "paddle/phi/core/utils/data_type.h" diff --git a/paddle/phi/core/string_tensor.cc b/paddle/phi/core/string_tensor.cc index 6957d1fc1f9..e82915a38ab 100644 --- a/paddle/phi/core/string_tensor.cc +++ b/paddle/phi/core/string_tensor.cc @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/core/string_tensor.h" +#include "glog/logging.h" + #include "paddle/phi/common/memory_utils.h" #include "paddle/phi/common/pstring.h" diff --git a/paddle/phi/core/tensor_utils.cc b/paddle/phi/core/tensor_utils.cc index 4fd11df211f..79f8138222a 100644 --- a/paddle/phi/core/tensor_utils.cc +++ b/paddle/phi/core/tensor_utils.cc @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/core/tensor_utils.h" +#include "glog/logging.h" + #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/data_type.h" diff --git a/paddle/phi/infermeta/multiary.cc b/paddle/phi/infermeta/multiary.cc index 71fe149e7c0..bd38a2ec521 100644 --- a/paddle/phi/infermeta/multiary.cc +++ b/paddle/phi/infermeta/multiary.cc @@ -16,6 +16,8 @@ limitations under the License. */ #include +#include "glog/logging.h" + #include "paddle/phi/backends/device_memory_aligment.h" #include "paddle/phi/common/layout.h" #include "paddle/phi/common/scalar.h" diff --git a/paddle/phi/kernels/coalesce_tensor_kernel.cc b/paddle/phi/kernels/coalesce_tensor_kernel.cc index 5b9c1b4a3de..559c88eebbc 100644 --- a/paddle/phi/kernels/coalesce_tensor_kernel.cc +++ b/paddle/phi/kernels/coalesce_tensor_kernel.cc @@ -17,6 +17,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/backends/device_memory_aligment.h" #include "paddle/phi/backends/gpu/gpu_context.h" diff --git a/paddle/phi/kernels/cpu/adam_kernel.cc b/paddle/phi/kernels/cpu/adam_kernel.cc index bf8296f8418..083c9dab740 100644 --- a/paddle/phi/kernels/cpu/adam_kernel.cc +++ b/paddle/phi/kernels/cpu/adam_kernel.cc @@ -16,6 +16,8 @@ #include +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/tensor_utils.h" diff --git a/paddle/phi/kernels/cpu/adamw_kernel.cc b/paddle/phi/kernels/cpu/adamw_kernel.cc index c21c04e6826..f8b8ea67e23 100644 --- a/paddle/phi/kernels/cpu/adamw_kernel.cc +++ b/paddle/phi/kernels/cpu/adamw_kernel.cc @@ -16,6 +16,8 @@ #include +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/common/float16.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/cpu/add_n_kernel.cc b/paddle/phi/kernels/cpu/add_n_kernel.cc index 54506ccd54f..650d33755dc 100644 --- a/paddle/phi/kernels/cpu/add_n_kernel.cc +++ b/paddle/phi/kernels/cpu/add_n_kernel.cc @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/impl/add_n_kernel_impl.h" +#include "glog/logging.h" + namespace phi { template diff --git a/paddle/phi/kernels/cpu/batch_norm_grad_kernel.cc b/paddle/phi/kernels/cpu/batch_norm_grad_kernel.cc index 9eec65e92a3..4740dddab33 100644 --- a/paddle/phi/kernels/cpu/batch_norm_grad_kernel.cc +++ b/paddle/phi/kernels/cpu/batch_norm_grad_kernel.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/batch_norm_kernel.h" diff --git a/paddle/phi/kernels/cpu/eigvals_kernel.cc b/paddle/phi/kernels/cpu/eigvals_kernel.cc index 555dbfb71df..48da00b8a70 100644 --- a/paddle/phi/kernels/cpu/eigvals_kernel.cc +++ b/paddle/phi/kernels/cpu/eigvals_kernel.cc @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/eigvals_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/common/complex.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/cpu/gelu_grad_kernel.cc b/paddle/phi/kernels/cpu/gelu_grad_kernel.cc index 254c4ea5716..65ee3c18510 100644 --- a/paddle/phi/kernels/cpu/gelu_grad_kernel.cc +++ b/paddle/phi/kernels/cpu/gelu_grad_kernel.cc @@ -17,6 +17,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/blas/blas.h" diff --git a/paddle/phi/kernels/cpu/gelu_kernel.cc b/paddle/phi/kernels/cpu/gelu_kernel.cc index 4d23470aa4e..dbab3bd3266 100644 --- a/paddle/phi/kernels/cpu/gelu_kernel.cc +++ b/paddle/phi/kernels/cpu/gelu_kernel.cc @@ -17,6 +17,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/blas/blas.h" diff --git a/paddle/phi/kernels/cpu/index_add_impl.h b/paddle/phi/kernels/cpu/index_add_impl.h index d9a1b93d721..0a0671951b3 100644 --- a/paddle/phi/kernels/cpu/index_add_impl.h +++ b/paddle/phi/kernels/cpu/index_add_impl.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/funcs/blas/blas.h" diff --git a/paddle/phi/kernels/cpu/index_sample_kernel.cc b/paddle/phi/kernels/cpu/index_sample_kernel.cc index 4ab51161350..f9e1721a696 100644 --- a/paddle/phi/kernels/cpu/index_sample_kernel.cc +++ b/paddle/phi/kernels/cpu/index_sample_kernel.cc @@ -21,6 +21,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/common/data_type.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/cpu/index_select_impl.h b/paddle/phi/kernels/cpu/index_select_impl.h index 02cc2b4bdb9..1b2842ee666 100644 --- a/paddle/phi/kernels/cpu/index_select_impl.h +++ b/paddle/phi/kernels/cpu/index_select_impl.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/funcs/blas/blas.h" diff --git a/paddle/phi/kernels/cpu/roll_kernel_impl.h b/paddle/phi/kernels/cpu/roll_kernel_impl.h index e2d96b896ac..f177afec120 100644 --- a/paddle/phi/kernels/cpu/roll_kernel_impl.h +++ b/paddle/phi/kernels/cpu/roll_kernel_impl.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/common/int_array.h" #include "paddle/phi/core/dense_tensor.h" diff --git a/paddle/phi/kernels/funcs/batch_norm_utils.h b/paddle/phi/kernels/funcs/batch_norm_utils.h index 513266cb423..64a20ee5d2e 100644 --- a/paddle/phi/kernels/funcs/batch_norm_utils.h +++ b/paddle/phi/kernels/funcs/batch_norm_utils.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/kernels/funcs/math_function.h" namespace phi { diff --git a/paddle/phi/kernels/funcs/blas/blas_impl.cu.h b/paddle/phi/kernels/funcs/blas/blas_impl.cu.h index 2568f88274f..35769d0e6e3 100644 --- a/paddle/phi/kernels/funcs/blas/blas_impl.cu.h +++ b/paddle/phi/kernels/funcs/blas/blas_impl.cu.h @@ -15,6 +15,8 @@ #pragma once #include "gflags/gflags.h" +#include "glog/logging.h" + #include "paddle/phi/backends/dynload/cublas.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/kernels/funcs/math_function.h" diff --git a/paddle/phi/kernels/funcs/blas/blaslt_impl.cu.h b/paddle/phi/kernels/funcs/blas/blaslt_impl.cu.h index 86a8b7eae0e..284d866d08f 100644 --- a/paddle/phi/kernels/funcs/blas/blaslt_impl.cu.h +++ b/paddle/phi/kernels/funcs/blas/blaslt_impl.cu.h @@ -16,6 +16,8 @@ limitations under the License. */ #if defined(PADDLE_WITH_CUDA) && CUDA_VERSION >= 11060 +#include "glog/logging.h" + #include // NOLINT #include "cuda.h" // NOLINT #include "paddle/phi/backends/dynload/cublasLt.h" diff --git a/paddle/phi/kernels/funcs/concat_and_split_functor.cu b/paddle/phi/kernels/funcs/concat_and_split_functor.cu index 2f75f42c2a7..5a7574b56a8 100644 --- a/paddle/phi/kernels/funcs/concat_and_split_functor.cu +++ b/paddle/phi/kernels/funcs/concat_and_split_functor.cu @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/kernels/funcs/concat_and_split_functor.h" +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_launch_config.h" #include "paddle/phi/common/memory_utils.h" #include "paddle/phi/common/place.h" diff --git a/paddle/phi/kernels/funcs/dims_simplifier.h b/paddle/phi/kernels/funcs/dims_simplifier.h index a52373c117e..fa0953ec46a 100644 --- a/paddle/phi/kernels/funcs/dims_simplifier.h +++ b/paddle/phi/kernels/funcs/dims_simplifier.h @@ -17,6 +17,8 @@ limitations under the License. */ #include "paddle/phi/core/ddim.h" #include "paddle/phi/core/dense_tensor.h" +#include "glog/logging.h" + namespace phi { namespace funcs { diff --git a/paddle/phi/kernels/funcs/elementwise_grad_base.h b/paddle/phi/kernels/funcs/elementwise_grad_base.h index 0b24031de35..858fc6766af 100644 --- a/paddle/phi/kernels/funcs/elementwise_grad_base.h +++ b/paddle/phi/kernels/funcs/elementwise_grad_base.h @@ -14,6 +14,8 @@ limitations under the License. */ #pragma once +#include "glog/logging.h" + #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/backends/gpu/gpu_info.h" #include "paddle/phi/common/memory_utils.h" diff --git a/paddle/phi/kernels/funcs/fused_gemm_epilogue.h b/paddle/phi/kernels/funcs/fused_gemm_epilogue.h index 8edfea5f078..b9b6854fd38 100644 --- a/paddle/phi/kernels/funcs/fused_gemm_epilogue.h +++ b/paddle/phi/kernels/funcs/fused_gemm_epilogue.h @@ -27,6 +27,7 @@ limitations under the License. */ #if CUDA_VERSION >= 11060 #include "gflags/gflags.h" +#include "glog/logging.h" #include "paddle/phi/backends/all_context.h" #include "paddle/phi/backends/dynload/cublasLt.h" #include "paddle/phi/backends/gpu/cuda/cuda_helper.h" diff --git a/paddle/phi/kernels/funcs/gather_scatter_functor.cc b/paddle/phi/kernels/funcs/gather_scatter_functor.cc index 67af6a3322d..db9e8a8247f 100644 --- a/paddle/phi/kernels/funcs/gather_scatter_functor.cc +++ b/paddle/phi/kernels/funcs/gather_scatter_functor.cc @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/kernels/funcs/gather_scatter_functor.h" +#include "glog/logging.h" + namespace phi { namespace funcs { diff --git a/paddle/phi/kernels/funcs/layer_norm_impl.cu.h b/paddle/phi/kernels/funcs/layer_norm_impl.cu.h index 0b78b074e81..d8ade4612c8 100644 --- a/paddle/phi/kernels/funcs/layer_norm_impl.cu.h +++ b/paddle/phi/kernels/funcs/layer_norm_impl.cu.h @@ -24,6 +24,8 @@ namespace cub = hipcub; #include +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_device_function.h" #include "paddle/phi/backends/gpu/gpu_dnn.h" diff --git a/paddle/phi/kernels/funcs/selected_rows_functor.cc b/paddle/phi/kernels/funcs/selected_rows_functor.cc index a7e8b1b4fdb..9fc69ddab4a 100644 --- a/paddle/phi/kernels/funcs/selected_rows_functor.cc +++ b/paddle/phi/kernels/funcs/selected_rows_functor.cc @@ -30,6 +30,8 @@ limitations under the License. */ #include "paddle/phi/backends/onednn/axpy_handler.h" #endif +#include "glog/logging.h" + namespace phi { namespace funcs { template diff --git a/paddle/phi/kernels/funcs/selected_rows_functor.cu b/paddle/phi/kernels/funcs/selected_rows_functor.cu index ccd0875dd9d..2947701befc 100644 --- a/paddle/phi/kernels/funcs/selected_rows_functor.cu +++ b/paddle/phi/kernels/funcs/selected_rows_functor.cu @@ -15,6 +15,8 @@ limitations under the License. */ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_primitives.h" #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/float16.h" diff --git a/paddle/phi/kernels/funcs/sparse/sparse_blas_impl.cu.h b/paddle/phi/kernels/funcs/sparse/sparse_blas_impl.cu.h index 7604008c4ae..fde5cb1768d 100644 --- a/paddle/phi/kernels/funcs/sparse/sparse_blas_impl.cu.h +++ b/paddle/phi/kernels/funcs/sparse/sparse_blas_impl.cu.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/backends/dynload/cusparse.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/float16.h" diff --git a/paddle/phi/kernels/funcs/stack_and_unstack.h b/paddle/phi/kernels/funcs/stack_and_unstack.h index d82cbd523f8..af45cfebc27 100644 --- a/paddle/phi/kernels/funcs/stack_and_unstack.h +++ b/paddle/phi/kernels/funcs/stack_and_unstack.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_launch_config.h" #include "paddle/phi/kernels/funcs/fast_divmod.h" #include "paddle/phi/kernels/funcs/segmented_array.h" diff --git a/paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.cu b/paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.cu index 63d9ffae3a8..c6480f6dbe5 100644 --- a/paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.cu +++ b/paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.cu @@ -16,6 +16,8 @@ #include "paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.h" +#include "glog/logging.h" + namespace phi { namespace fusion { namespace cutlass_internal { diff --git a/paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.h b/paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.h index 710de13a516..5a215a72369 100644 --- a/paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.h +++ b/paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_util.h @@ -17,6 +17,8 @@ #include #include "paddle/phi/kernels/fusion/cutlass/conv2d/conv2d_decl.h" +#include "glog/logging.h" + #include "cutlass/cutlass.h" #include "cutlass/gemm/device/gemm.h" diff --git a/paddle/phi/kernels/fusion/gpu/attn_gemm.h b/paddle/phi/kernels/fusion/gpu/attn_gemm.h index 4945a8a9a6d..01544436e4d 100644 --- a/paddle/phi/kernels/fusion/gpu/attn_gemm.h +++ b/paddle/phi/kernels/fusion/gpu/attn_gemm.h @@ -18,6 +18,8 @@ #include "paddle/phi/backends/dynload/cublasLt.h" #endif +#include "glog/logging.h" + #include "paddle/phi/kernels/funcs/blas/blas.h" #include "paddle/phi/kernels/funcs/blas/blaslt_impl.cu.h" #include "paddle/phi/kernels/funcs/broadcast_function.h" diff --git a/paddle/phi/kernels/fusion/gpu/conv_fusion_kernel.cu b/paddle/phi/kernels/fusion/gpu/conv_fusion_kernel.cu index a1957eab67f..da71c0bf7d3 100644 --- a/paddle/phi/kernels/fusion/gpu/conv_fusion_kernel.cu +++ b/paddle/phi/kernels/fusion/gpu/conv_fusion_kernel.cu @@ -22,6 +22,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/backends/dynload/cudnn.h" #include "paddle/phi/backends/gpu/cuda/cudnn_desc.h" diff --git a/paddle/phi/kernels/fusion/gpu/fmha_ref.h b/paddle/phi/kernels/fusion/gpu/fmha_ref.h index ff09d05a728..207be7b5d7b 100644 --- a/paddle/phi/kernels/fusion/gpu/fmha_ref.h +++ b/paddle/phi/kernels/fusion/gpu/fmha_ref.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/funcs/blas/blas.h" #include "paddle/phi/kernels/funcs/broadcast_function.h" diff --git a/paddle/phi/kernels/fusion/gpu/fused_dropout_helper.h b/paddle/phi/kernels/fusion/gpu/fused_dropout_helper.h index f381dcfde1c..57cbf678b92 100644 --- a/paddle/phi/kernels/fusion/gpu/fused_dropout_helper.h +++ b/paddle/phi/kernels/fusion/gpu/fused_dropout_helper.h @@ -18,6 +18,8 @@ #include "paddle/phi/backends/dynload/cublasLt.h" #endif +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/kernels/funcs/dropout_impl_util.h" diff --git a/paddle/phi/kernels/fusion/gpu/fused_layernorm_residual_dropout_bias.h b/paddle/phi/kernels/fusion/gpu/fused_layernorm_residual_dropout_bias.h index defc0b8112e..7df7a79fb68 100644 --- a/paddle/phi/kernels/fusion/gpu/fused_layernorm_residual_dropout_bias.h +++ b/paddle/phi/kernels/fusion/gpu/fused_layernorm_residual_dropout_bias.h @@ -14,6 +14,8 @@ limitations under the License. */ #pragma once +#include "glog/logging.h" + #include "paddle/phi/kernels/funcs/layer_norm_impl.cu.h" #include "paddle/phi/kernels/fusion/gpu/fused_residual_dropout_bias.h" diff --git a/paddle/phi/kernels/fusion/gpu/fused_linear_param_grad_add_kernel.cu b/paddle/phi/kernels/fusion/gpu/fused_linear_param_grad_add_kernel.cu index c562720ebee..f39cc8acdc3 100644 --- a/paddle/phi/kernels/fusion/gpu/fused_linear_param_grad_add_kernel.cu +++ b/paddle/phi/kernels/fusion/gpu/fused_linear_param_grad_add_kernel.cu @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/fusion/onednn/fused_transpose_kernel.cc b/paddle/phi/kernels/fusion/onednn/fused_transpose_kernel.cc index 10252cb9416..e4684f23f54 100644 --- a/paddle/phi/kernels/fusion/onednn/fused_transpose_kernel.cc +++ b/paddle/phi/kernels/fusion/onednn/fused_transpose_kernel.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "glog/logging.h" + #include "paddle/phi/backends/onednn/onednn_reuse.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/transpose_kernel.h" diff --git a/paddle/phi/kernels/fusion/xpu/fused_multi_transformer_xpu_kernel.cc b/paddle/phi/kernels/fusion/xpu/fused_multi_transformer_xpu_kernel.cc index 5f49c24ea71..0d27a398e44 100644 --- a/paddle/phi/kernels/fusion/xpu/fused_multi_transformer_xpu_kernel.cc +++ b/paddle/phi/kernels/fusion/xpu/fused_multi_transformer_xpu_kernel.cc @@ -13,6 +13,9 @@ // limitations under the License. #include "paddle/phi/backends/xpu/enforce_xpu.h" + +#include "glog/logging.h" + #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/memcpy_kernel.h" #ifdef PADDLE_WITH_XPU_XFT diff --git a/paddle/phi/kernels/gpu/activation_grad_kernel.cu b/paddle/phi/kernels/gpu/activation_grad_kernel.cu index e56c3cf4f42..04a414fd584 100644 --- a/paddle/phi/kernels/gpu/activation_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/activation_grad_kernel.cu @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/kernels/activation_grad_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_device_function.h" #include "paddle/phi/common/bfloat16.h" diff --git a/paddle/phi/kernels/gpu/adam_kernel.cu b/paddle/phi/kernels/gpu/adam_kernel.cu index 53d31b153d5..23dc6cdfd33 100644 --- a/paddle/phi/kernels/gpu/adam_kernel.cu +++ b/paddle/phi/kernels/gpu/adam_kernel.cu @@ -18,6 +18,8 @@ #include +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/float16.h" diff --git a/paddle/phi/kernels/gpu/adamw_kernel.cu b/paddle/phi/kernels/gpu/adamw_kernel.cu index 448153ed219..d40fdf392b1 100644 --- a/paddle/phi/kernels/gpu/adamw_kernel.cu +++ b/paddle/phi/kernels/gpu/adamw_kernel.cu @@ -18,6 +18,8 @@ #include +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/bfloat16.h" diff --git a/paddle/phi/kernels/gpu/affine_grid_grad_kernel.cu b/paddle/phi/kernels/gpu/affine_grid_grad_kernel.cu index 7619c73b3cc..f42d13df86a 100644 --- a/paddle/phi/kernels/gpu/affine_grid_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/affine_grid_grad_kernel.cu @@ -16,6 +16,8 @@ #include "paddle/phi/kernels/affine_grid_grad_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_device_function.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" diff --git a/paddle/phi/kernels/gpu/batch_norm_grad_kernel.cu b/paddle/phi/kernels/gpu/batch_norm_grad_kernel.cu index db7f3c3224a..c5ddd28e0da 100644 --- a/paddle/phi/kernels/gpu/batch_norm_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/batch_norm_grad_kernel.cu @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_dnn.h" #include "paddle/phi/common/layout.h" diff --git a/paddle/phi/kernels/gpu/batch_norm_kernel.cu b/paddle/phi/kernels/gpu/batch_norm_kernel.cu index fb1bca3daba..1a07e5f0d49 100644 --- a/paddle/phi/kernels/gpu/batch_norm_kernel.cu +++ b/paddle/phi/kernels/gpu/batch_norm_kernel.cu @@ -20,6 +20,8 @@ namespace cub = hipcub; #endif +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_dnn.h" #include "paddle/phi/common/layout.h" diff --git a/paddle/phi/kernels/gpu/elementwise_grad.h b/paddle/phi/kernels/gpu/elementwise_grad.h index 84047f14739..8440ed2b122 100644 --- a/paddle/phi/kernels/gpu/elementwise_grad.h +++ b/paddle/phi/kernels/gpu/elementwise_grad.h @@ -14,6 +14,8 @@ limitations under the License. */ #pragma once +#include "glog/logging.h" + #include "paddle/phi/common/place.h" #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/funcs/broadcast_function.h" diff --git a/paddle/phi/kernels/gpu/embedding_grad_kernel.cu b/paddle/phi/kernels/gpu/embedding_grad_kernel.cu index 130dc570e33..e2bcfa4d19e 100644 --- a/paddle/phi/kernels/gpu/embedding_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/embedding_grad_kernel.cu @@ -15,6 +15,7 @@ #include "paddle/phi/kernels/embedding_grad_kernel.h" #include "gflags/gflags.h" +#include "glog/logging.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" #include "paddle/phi/common/data_type.h" diff --git a/paddle/phi/kernels/gpu/gelu_funcs.h b/paddle/phi/kernels/gpu/gelu_funcs.h index 42b5322426f..a8f685c0ab0 100644 --- a/paddle/phi/kernels/gpu/gelu_funcs.h +++ b/paddle/phi/kernels/gpu/gelu_funcs.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/place.h" diff --git a/paddle/phi/kernels/gpu/grid_sample_kernel.cu b/paddle/phi/kernels/gpu/grid_sample_kernel.cu index ff657d9dc46..3809ae7d5c3 100644 --- a/paddle/phi/kernels/gpu/grid_sample_kernel.cu +++ b/paddle/phi/kernels/gpu/grid_sample_kernel.cu @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/grid_sample_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_info.h" #include "paddle/phi/backends/gpu/gpu_launch_config.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/gpu/index_add_kernel.cu b/paddle/phi/kernels/gpu/index_add_kernel.cu index e6d12e5c784..f4894fc6d93 100644 --- a/paddle/phi/kernels/gpu/index_add_kernel.cu +++ b/paddle/phi/kernels/gpu/index_add_kernel.cu @@ -15,6 +15,7 @@ #include "paddle/phi/kernels/index_add_kernel.h" #include "gflags/gflags.h" +#include "glog/logging.h" #include "paddle/phi/backends/gpu/gpu_info.h" #include "paddle/phi/backends/gpu/gpu_launch_config.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" diff --git a/paddle/phi/kernels/gpu/index_select_grad_kernel.cu b/paddle/phi/kernels/gpu/index_select_grad_kernel.cu index 9c99a12fc28..2fce40dbe73 100644 --- a/paddle/phi/kernels/gpu/index_select_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/index_select_grad_kernel.cu @@ -15,6 +15,7 @@ #include "paddle/phi/kernels/index_select_grad_kernel.h" #include "gflags/gflags.h" +#include "glog/logging.h" #include "paddle/phi/backends/gpu/gpu_info.h" #include "paddle/phi/backends/gpu/gpu_launch_config.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" diff --git a/paddle/phi/kernels/gpu/instance_norm_grad_kernel.cu b/paddle/phi/kernels/gpu/instance_norm_grad_kernel.cu index a121f9fb95b..0f17a1bcc31 100644 --- a/paddle/phi/kernels/gpu/instance_norm_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/instance_norm_grad_kernel.cu @@ -13,6 +13,9 @@ // limitations under the License. #include "paddle/phi/kernels/instance_norm_grad_kernel.h" + +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/layout.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/gpu/instance_norm_kernel.cu b/paddle/phi/kernels/gpu/instance_norm_kernel.cu index d4f421e62dd..7f10eac67c6 100644 --- a/paddle/phi/kernels/gpu/instance_norm_kernel.cu +++ b/paddle/phi/kernels/gpu/instance_norm_kernel.cu @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/instance_norm_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/layout.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/gpu/p_recv_kernel.cu b/paddle/phi/kernels/gpu/p_recv_kernel.cu index 88bb45b61fb..5e96c7319d4 100644 --- a/paddle/phi/kernels/gpu/p_recv_kernel.cu +++ b/paddle/phi/kernels/gpu/p_recv_kernel.cu @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/p_recv_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/all_context.h" #include "paddle/phi/common/memory_utils.h" #include "paddle/phi/core/ddim.h" diff --git a/paddle/phi/kernels/gpu/p_send_kernel.cu b/paddle/phi/kernels/gpu/p_send_kernel.cu index 747af01b260..c2bf4c68889 100644 --- a/paddle/phi/kernels/gpu/p_send_kernel.cu +++ b/paddle/phi/kernels/gpu/p_send_kernel.cu @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/p_send_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/all_context.h" #include "paddle/phi/common/memory_utils.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/gpu/prelu_kernel.cu b/paddle/phi/kernels/gpu/prelu_kernel.cu index d698d78a55c..679d7ba3f2e 100644 --- a/paddle/phi/kernels/gpu/prelu_kernel.cu +++ b/paddle/phi/kernels/gpu/prelu_kernel.cu @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/prelu_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/elementwise_base.h" diff --git a/paddle/phi/kernels/gpu/rnn_kernel.cu.cc b/paddle/phi/kernels/gpu/rnn_kernel.cu.cc index 66babdcecbb..d472b7c31d3 100644 --- a/paddle/phi/kernels/gpu/rnn_kernel.cu.cc +++ b/paddle/phi/kernels/gpu/rnn_kernel.cu.cc @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/rnn_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/core/generator.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/gpu/top_k_kernel.cu b/paddle/phi/kernels/gpu/top_k_kernel.cu index e2793955ef9..a791812432a 100644 --- a/paddle/phi/kernels/gpu/top_k_kernel.cu +++ b/paddle/phi/kernels/gpu/top_k_kernel.cu @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/top_k_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/gpudnn/conv_cudnn_frontend.h b/paddle/phi/kernels/gpudnn/conv_cudnn_frontend.h index c5fe47a2431..e53d5783048 100644 --- a/paddle/phi/kernels/gpudnn/conv_cudnn_frontend.h +++ b/paddle/phi/kernels/gpudnn/conv_cudnn_frontend.h @@ -17,6 +17,8 @@ limitations under the License. */ #include +#include "glog/logging.h" + #include "paddle/phi/backends/dynload/cudnn_frontend.h" #include "paddle/phi/backends/gpu/cuda/cudnn_desc.h" #include "paddle/phi/backends/gpu/gpu_context.h" diff --git a/paddle/phi/kernels/gpudnn/conv_cudnn_v7.h b/paddle/phi/kernels/gpudnn/conv_cudnn_v7.h index 852b0d77e5f..dfea9013ab0 100644 --- a/paddle/phi/kernels/gpudnn/conv_cudnn_v7.h +++ b/paddle/phi/kernels/gpudnn/conv_cudnn_v7.h @@ -14,6 +14,8 @@ limitations under the License. */ #pragma once +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/cuda/cuda_graph_with_memory_pool.h" #include "paddle/phi/kernels/autotune/switch_autotune.h" #include "paddle/phi/kernels/gpudnn/conv_gpudnn_base.h" diff --git a/paddle/phi/kernels/gpudnn/conv_gpudnn_base.h b/paddle/phi/kernels/gpudnn/conv_gpudnn_base.h index 59dc0bef21e..186bbd75fae 100644 --- a/paddle/phi/kernels/gpudnn/conv_gpudnn_base.h +++ b/paddle/phi/kernels/gpudnn/conv_gpudnn_base.h @@ -20,6 +20,8 @@ limitations under the License. */ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/memory_utils.h" #include "paddle/phi/kernels/autotune/cache.h" diff --git a/paddle/phi/kernels/gpudnn/conv_grad_kernel.cu b/paddle/phi/kernels/gpudnn/conv_grad_kernel.cu index a41144c5ee7..2c6e898fa25 100644 --- a/paddle/phi/kernels/gpudnn/conv_grad_kernel.cu +++ b/paddle/phi/kernels/gpudnn/conv_grad_kernel.cu @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/conv_grad_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/core/dense_tensor.h" diff --git a/paddle/phi/kernels/gpudnn/conv_kernel.cu b/paddle/phi/kernels/gpudnn/conv_kernel.cu index d5ba3301cdd..15161dd61c6 100644 --- a/paddle/phi/kernels/gpudnn/conv_kernel.cu +++ b/paddle/phi/kernels/gpudnn/conv_kernel.cu @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/conv_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/core/dense_tensor.h" diff --git a/paddle/phi/kernels/gpudnn/conv_miopen_helper.h b/paddle/phi/kernels/gpudnn/conv_miopen_helper.h index 9cdbcc12654..be2c09bf8d1 100644 --- a/paddle/phi/kernels/gpudnn/conv_miopen_helper.h +++ b/paddle/phi/kernels/gpudnn/conv_miopen_helper.h @@ -14,6 +14,8 @@ limitations under the License. */ #pragma once +#include "glog/logging.h" + #include "paddle/phi/kernels/gpudnn/conv_gpudnn_base.h" namespace phi { diff --git a/paddle/phi/kernels/impl/activation_grad_impl.h b/paddle/phi/kernels/impl/activation_grad_impl.h index ffe9ac26c69..8be4d1c39d6 100644 --- a/paddle/phi/kernels/impl/activation_grad_impl.h +++ b/paddle/phi/kernels/impl/activation_grad_impl.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/backends/all_context.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/kernels/activation_kernel.h" diff --git a/paddle/phi/kernels/impl/addmm_grad_kernel_impl.h b/paddle/phi/kernels/impl/addmm_grad_kernel_impl.h index bd775110f3a..a72fb6062ce 100644 --- a/paddle/phi/kernels/impl/addmm_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/addmm_grad_kernel_impl.h @@ -16,6 +16,8 @@ limitations under the License. */ #include +#include "glog/logging.h" + #include "paddle/phi/kernels/addmm_grad_kernel.h" #include "paddle/phi/kernels/funcs/blas/blas.h" #include "paddle/phi/kernels/funcs/eigen/common.h" diff --git a/paddle/phi/kernels/impl/addmm_kernel_impl.h b/paddle/phi/kernels/impl/addmm_kernel_impl.h index 151e8f7420a..c86cea80e47 100644 --- a/paddle/phi/kernels/impl/addmm_kernel_impl.h +++ b/paddle/phi/kernels/impl/addmm_kernel_impl.h @@ -16,6 +16,8 @@ limitations under the License. */ #include +#include "glog/logging.h" + #include "paddle/phi/kernels/addmm_kernel.h" #include "paddle/phi/kernels/funcs/blas/blas.h" #include "paddle/phi/kernels/funcs/eigen/common.h" diff --git a/paddle/phi/kernels/impl/determinant_grad_kernel_impl.h b/paddle/phi/kernels/impl/determinant_grad_kernel_impl.h index 248305b7fc0..3f463e1d9e0 100644 --- a/paddle/phi/kernels/impl/determinant_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/determinant_grad_kernel_impl.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/determinant_grad_kernel.h" #include "paddle/phi/kernels/elementwise_multiply_kernel.h" diff --git a/paddle/phi/kernels/impl/determinant_kernel_impl.h b/paddle/phi/kernels/impl/determinant_kernel_impl.h index 5c7a16045c5..36e47c78c83 100644 --- a/paddle/phi/kernels/impl/determinant_kernel_impl.h +++ b/paddle/phi/kernels/impl/determinant_kernel_impl.h @@ -20,6 +20,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/phi/core/enforce.h" #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/determinant_kernel.h" diff --git a/paddle/phi/kernels/impl/dot_grad_kernel_impl.h b/paddle/phi/kernels/impl/dot_grad_kernel_impl.h index 7e49465ec61..6bfe6d65245 100644 --- a/paddle/phi/kernels/impl/dot_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/dot_grad_kernel_impl.h @@ -14,6 +14,8 @@ limitations under the License. */ #pragma once +#include "glog/logging.h" + #include "paddle/phi/common/complex.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/kernels/complex_kernel.h" diff --git a/paddle/phi/kernels/impl/einsum_grad_impl.h b/paddle/phi/kernels/impl/einsum_grad_impl.h index 78d61bcfd6a..2b11e9eda66 100644 --- a/paddle/phi/kernels/impl/einsum_grad_impl.h +++ b/paddle/phi/kernels/impl/einsum_grad_impl.h @@ -13,6 +13,8 @@ // limitations under the License. #pragma once +#include "glog/logging.h" + #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/kernels/complex_kernel.h" #include "paddle/phi/kernels/impl/einsum_impl.h" diff --git a/paddle/phi/kernels/impl/elementwise_grad_kernel_impl.h b/paddle/phi/kernels/impl/elementwise_grad_kernel_impl.h index a7c8ecc2234..98849ca60d4 100644 --- a/paddle/phi/kernels/impl/elementwise_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/elementwise_grad_kernel_impl.h @@ -14,6 +14,8 @@ limitations under the License. */ #pragma once +#include "glog/logging.h" + #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/complex.h" #include "paddle/phi/common/float16.h" diff --git a/paddle/phi/kernels/impl/lamb_kernel_impl.h b/paddle/phi/kernels/impl/lamb_kernel_impl.h index 7a0fab69118..e0850b8aef0 100644 --- a/paddle/phi/kernels/impl/lamb_kernel_impl.h +++ b/paddle/phi/kernels/impl/lamb_kernel_impl.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once +#include "glog/logging.h" + #include "paddle/phi/common/data_type.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/kernels/funcs/lamb_functors.h" diff --git a/paddle/phi/kernels/impl/matmul_grad_kernel_impl.h b/paddle/phi/kernels/impl/matmul_grad_kernel_impl.h index b840a803b6d..885827a36be 100644 --- a/paddle/phi/kernels/impl/matmul_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/matmul_grad_kernel_impl.h @@ -14,6 +14,8 @@ limitations under the License. */ #pragma once +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/kernels/complex_kernel.h" diff --git a/paddle/phi/kernels/impl/matmul_kernel_impl.h b/paddle/phi/kernels/impl/matmul_kernel_impl.h index 454263fcb7f..acc7affc00e 100644 --- a/paddle/phi/kernels/impl/matmul_kernel_impl.h +++ b/paddle/phi/kernels/impl/matmul_kernel_impl.h @@ -14,6 +14,8 @@ limitations under the License. */ #pragma once +#include "glog/logging.h" + #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/kernels/autotune/cache_base.h" #include "paddle/phi/kernels/funcs/blas/blas.h" diff --git a/paddle/phi/kernels/impl/merged_momentum_impl.h b/paddle/phi/kernels/impl/merged_momentum_impl.h index de974131c46..40364507e8b 100644 --- a/paddle/phi/kernels/impl/merged_momentum_impl.h +++ b/paddle/phi/kernels/impl/merged_momentum_impl.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/hostdevice.h" diff --git a/paddle/phi/kernels/impl/momentum_kernel_impl.h b/paddle/phi/kernels/impl/momentum_kernel_impl.h index a9178262d6a..932cdfe57da 100644 --- a/paddle/phi/kernels/impl/momentum_kernel_impl.h +++ b/paddle/phi/kernels/impl/momentum_kernel_impl.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/float16.h" #include "paddle/phi/kernels/funcs/algorithm.h" diff --git a/paddle/phi/kernels/impl/set_value_grad_kernel_impl.h b/paddle/phi/kernels/impl/set_value_grad_kernel_impl.h index 02e5323c5b6..1292a3af363 100644 --- a/paddle/phi/kernels/impl/set_value_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/set_value_grad_kernel_impl.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/common/int_array.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/tensor_utils.h" diff --git a/paddle/phi/kernels/impl/slogdeterminant_grad_kernel_impl.h b/paddle/phi/kernels/impl/slogdeterminant_grad_kernel_impl.h index 9f629ab4bd1..e7fa5edf9ad 100644 --- a/paddle/phi/kernels/impl/slogdeterminant_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/slogdeterminant_grad_kernel_impl.h @@ -14,6 +14,8 @@ #pragma once +#include "glog/logging.h" + #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/complex_kernel.h" #include "paddle/phi/kernels/elementwise_multiply_kernel.h" diff --git a/paddle/phi/kernels/impl/slogdeterminant_kernel_impl.h b/paddle/phi/kernels/impl/slogdeterminant_kernel_impl.h index 6f590f62463..6a4f707b898 100644 --- a/paddle/phi/kernels/impl/slogdeterminant_kernel_impl.h +++ b/paddle/phi/kernels/impl/slogdeterminant_kernel_impl.h @@ -18,6 +18,8 @@ #include #include +#include "glog/logging.h" + #include "paddle/phi/core/enforce.h" #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/impl/determinant_kernel_impl.h" diff --git a/paddle/phi/kernels/npu_identity_kernel.cc b/paddle/phi/kernels/npu_identity_kernel.cc index c9fb7a97285..9a96c149637 100644 --- a/paddle/phi/kernels/npu_identity_kernel.cc +++ b/paddle/phi/kernels/npu_identity_kernel.cc @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/npu_identity_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/empty_kernel.h" diff --git a/paddle/phi/kernels/onednn/transpose_kernel.cc b/paddle/phi/kernels/onednn/transpose_kernel.cc index c9302ba4f80..e76d33fc786 100644 --- a/paddle/phi/kernels/onednn/transpose_kernel.cc +++ b/paddle/phi/kernels/onednn/transpose_kernel.cc @@ -13,6 +13,9 @@ // limitations under the License. #include "paddle/phi/kernels/transpose_kernel.h" + +#include "glog/logging.h" + #include "paddle/phi/backends/onednn/onednn_reuse.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/selected_rows/cpu/adam_kernel.cc b/paddle/phi/kernels/selected_rows/cpu/adam_kernel.cc index a9cc821aaaf..40c9fb37c4c 100644 --- a/paddle/phi/kernels/selected_rows/cpu/adam_kernel.cc +++ b/paddle/phi/kernels/selected_rows/cpu/adam_kernel.cc @@ -15,6 +15,7 @@ #include "paddle/phi/kernels/selected_rows/adam_kernel.h" #include "gflags/gflags.h" +#include "glog/logging.h" #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/selected_rows/cpu/adamw_kernel.cc b/paddle/phi/kernels/selected_rows/cpu/adamw_kernel.cc index d2cd9f06174..ad1c27df1b3 100644 --- a/paddle/phi/kernels/selected_rows/cpu/adamw_kernel.cc +++ b/paddle/phi/kernels/selected_rows/cpu/adamw_kernel.cc @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/selected_rows/adamw_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/common/float16.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/selected_rows/gpu/adam_kernel.cu b/paddle/phi/kernels/selected_rows/gpu/adam_kernel.cu index 555562cfac5..084721a721e 100644 --- a/paddle/phi/kernels/selected_rows/gpu/adam_kernel.cu +++ b/paddle/phi/kernels/selected_rows/gpu/adam_kernel.cu @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/selected_rows/adam_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/float16.h" diff --git a/paddle/phi/kernels/selected_rows/gpu/adamw_kernel.cu b/paddle/phi/kernels/selected_rows/gpu/adamw_kernel.cu index 0e24b5f71ed..ee7eab85522 100644 --- a/paddle/phi/kernels/selected_rows/gpu/adamw_kernel.cu +++ b/paddle/phi/kernels/selected_rows/gpu/adamw_kernel.cu @@ -18,6 +18,8 @@ #include +#include "glog/logging.h" + #include "paddle/phi/backends/gpu/gpu_context.h" #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/common/float16.h" diff --git a/paddle/phi/kernels/selected_rows/impl/lamb_kernel_impl.h b/paddle/phi/kernels/selected_rows/impl/lamb_kernel_impl.h index 4830f39c01d..4323a23e0e6 100644 --- a/paddle/phi/kernels/selected_rows/impl/lamb_kernel_impl.h +++ b/paddle/phi/kernels/selected_rows/impl/lamb_kernel_impl.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once +#include "glog/logging.h" + #include "paddle/phi/common/data_type.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/selected_rows.h" diff --git a/paddle/phi/kernels/selected_rows/xpu/adam_kernel.cc b/paddle/phi/kernels/selected_rows/xpu/adam_kernel.cc index 77ac944167d..b2a81885b88 100644 --- a/paddle/phi/kernels/selected_rows/xpu/adam_kernel.cc +++ b/paddle/phi/kernels/selected_rows/xpu/adam_kernel.cc @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/selected_rows/adam_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/xpu/xpu_context.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/tensor_utils.h" diff --git a/paddle/phi/kernels/share_buffer_kernel.cc b/paddle/phi/kernels/share_buffer_kernel.cc index 2a25495b8d6..d428de38637 100644 --- a/paddle/phi/kernels/share_buffer_kernel.cc +++ b/paddle/phi/kernels/share_buffer_kernel.cc @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/share_buffer_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/visit_type.h" diff --git a/paddle/phi/kernels/strings/gpu/strings_copy_kernel.cu b/paddle/phi/kernels/strings/gpu/strings_copy_kernel.cu index fb9d32264b0..cfee8d56690 100644 --- a/paddle/phi/kernels/strings/gpu/strings_copy_kernel.cu +++ b/paddle/phi/kernels/strings/gpu/strings_copy_kernel.cu @@ -14,6 +14,8 @@ limitations under the License. */ #include "paddle/phi/kernels/strings/strings_copy_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/all_context.h" #include "paddle/phi/backends/gpu/gpu_helper.h" #include "paddle/phi/backends/gpu/gpu_launch_config.h" diff --git a/paddle/phi/kernels/transfer_layout_kernel.cc b/paddle/phi/kernels/transfer_layout_kernel.cc index ae9c5d3092e..df3d0ef4617 100644 --- a/paddle/phi/kernels/transfer_layout_kernel.cc +++ b/paddle/phi/kernels/transfer_layout_kernel.cc @@ -17,6 +17,8 @@ limitations under the License. */ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/all_context.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/visit_type.h" diff --git a/paddle/phi/kernels/xpu/adam_kernel.cc b/paddle/phi/kernels/xpu/adam_kernel.cc index 3e2a6471c1f..f2e9fccc58d 100644 --- a/paddle/phi/kernels/xpu/adam_kernel.cc +++ b/paddle/phi/kernels/xpu/adam_kernel.cc @@ -14,6 +14,8 @@ #include "paddle/phi/kernels/adam_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/xpu/xpu_context.h" #include "paddle/phi/common/float16.h" #include "paddle/phi/core/enforce.h" diff --git a/paddle/phi/kernels/xpu/adamw_kernel.cc b/paddle/phi/kernels/xpu/adamw_kernel.cc index 92583481177..a74fd2aa9bd 100644 --- a/paddle/phi/kernels/xpu/adamw_kernel.cc +++ b/paddle/phi/kernels/xpu/adamw_kernel.cc @@ -16,6 +16,8 @@ #include +#include "glog/logging.h" + #include "paddle/phi/backends/xpu/enforce_xpu.h" #include "paddle/phi/backends/xpu/xpu_context.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/xpu/amp_kernel.cc b/paddle/phi/kernels/xpu/amp_kernel.cc index 52f81a4f828..0c00baf9170 100644 --- a/paddle/phi/kernels/xpu/amp_kernel.cc +++ b/paddle/phi/kernels/xpu/amp_kernel.cc @@ -18,6 +18,8 @@ limitations under the License. */ #include #include +#include "glog/logging.h" + #include "paddle/phi/backends/xpu/enforce_xpu.h" #include "paddle/phi/backends/xpu/xpu_context.h" #include "paddle/phi/common/amp_type_traits.h" diff --git a/paddle/phi/kernels/xpu/set_value_grad_kernel.cc b/paddle/phi/kernels/xpu/set_value_grad_kernel.cc index affc6b0fe94..d7e1ed8114e 100644 --- a/paddle/phi/kernels/xpu/set_value_grad_kernel.cc +++ b/paddle/phi/kernels/xpu/set_value_grad_kernel.cc @@ -14,12 +14,13 @@ #include "paddle/phi/kernels/set_value_grad_kernel.h" +#include "glog/logging.h" + #include "paddle/phi/backends/xpu/enforce_xpu.h" #include "paddle/phi/backends/xpu/xpu_context.h" -#include "paddle/phi/core/kernel_registry.h" - #include "paddle/phi/common/int_array.h" #include "paddle/phi/core/dense_tensor.h" +#include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/tensor_utils.h" #include "paddle/phi/kernels/full_kernel.h" #include "paddle/phi/kernels/funcs/eigen/common.h" diff --git a/test/cpp/phi/core/test_sparse_csr_tensor.cc b/test/cpp/phi/core/test_sparse_csr_tensor.cc index 001c4bd7c7e..56f671a7fc7 100644 --- a/test/cpp/phi/core/test_sparse_csr_tensor.cc +++ b/test/cpp/phi/core/test_sparse_csr_tensor.cc @@ -12,6 +12,7 @@ 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. */ +#include "glog/logging.h" #include "gtest/gtest.h" #include "paddle/phi/api/lib/utils/allocator.h" #include "paddle/phi/core/dense_tensor.h" diff --git a/test/cpp/phi/core/test_string_tensor.cc b/test/cpp/phi/core/test_string_tensor.cc index 0883e5b671f..fe0154e4e37 100644 --- a/test/cpp/phi/core/test_string_tensor.cc +++ b/test/cpp/phi/core/test_string_tensor.cc @@ -16,6 +16,7 @@ limitations under the License. */ #include #include +#include "glog/logging.h" #include "gtest/gtest.h" #include "paddle/phi/api/lib/utils/allocator.h" #include "paddle/phi/backends/context_pool.h" diff --git a/test/cpp/phi/core/test_tensor_array.cc b/test/cpp/phi/core/test_tensor_array.cc index 87cadafdca6..201790a7bc0 100644 --- a/test/cpp/phi/core/test_tensor_array.cc +++ b/test/cpp/phi/core/test_tensor_array.cc @@ -86,7 +86,7 @@ TEST(tensor_array, tensor_array_not_init) { EXPECT_TRUE(ex_msg.find("valid") != std::string::npos); } - CHECK_EQ(tensor_array.initialized(), false); + EXPECT_TRUE(!tensor_array.initialized()); } TEST(tensor_array, tensor_array_init) { @@ -115,7 +115,7 @@ TEST(tensor_array, tensor_array_init) { TensorArray tensor_array(tensors); tensor_array.AllocateFrom(alloc, DataType::INT8); - CHECK_EQ(tensor_array.initialized(), true); + EXPECT_TRUE(tensor_array.initialized()); } } // namespace tests diff --git a/test/cpp/phi/kernels/test_strings_lower_upper_dev_api.cc b/test/cpp/phi/kernels/test_strings_lower_upper_dev_api.cc index 2f056182e44..2a7aa5cdaf7 100644 --- a/test/cpp/phi/kernels/test_strings_lower_upper_dev_api.cc +++ b/test/cpp/phi/kernels/test_strings_lower_upper_dev_api.cc @@ -18,6 +18,8 @@ limitations under the License. */ #include #include +#include "glog/logging.h" + #include "paddle/phi/api/lib/utils/allocator.h" #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/common/data_type.h" -- GitLab