From 76cdbb84b08518bc27def50a224e278e6ab0d36f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Thu, 4 Jun 2020 12:48:57 +0800 Subject: [PATCH] ignore warnings of external libraries, test=develop (#24193) --- paddle/fluid/inference/lite/engine.cc | 6 ------ paddle/fluid/inference/lite/engine.h | 11 +++++++++++ paddle/fluid/inference/lite/op_teller.cc | 3 +-- paddle/fluid/inference/lite/tensor_utils.h | 3 +-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/paddle/fluid/inference/lite/engine.cc b/paddle/fluid/inference/lite/engine.cc index edc4f5220aa..38230e4f18f 100644 --- a/paddle/fluid/inference/lite/engine.cc +++ b/paddle/fluid/inference/lite/engine.cc @@ -17,12 +17,6 @@ #endif #include "paddle/fluid/inference/lite/engine.h" -#include "lite/core/context.h" -#include "lite/core/device_info.h" - -#include "lite/api/paddle_use_kernels.h" -#include "lite/api/paddle_use_ops.h" -#include "lite/api/paddle_use_passes.h" namespace paddle { namespace inference { diff --git a/paddle/fluid/inference/lite/engine.h b/paddle/fluid/inference/lite/engine.h index f29607490ed..d30c2d31e12 100644 --- a/paddle/fluid/inference/lite/engine.h +++ b/paddle/fluid/inference/lite/engine.h @@ -20,7 +20,18 @@ #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" #include "lite/api/cxx_api.h" +#include "lite/api/paddle_place.h" +#include "lite/api/paddle_use_kernels.h" +#include "lite/api/paddle_use_ops.h" +#include "lite/api/paddle_use_passes.h" +#include "lite/core/context.h" +#include "lite/core/device_info.h" +#include "lite/core/op_registry.h" +#include "lite/core/tensor.h" +#pragma GCC diagnostic pop namespace paddle { namespace inference { diff --git a/paddle/fluid/inference/lite/op_teller.cc b/paddle/fluid/inference/lite/op_teller.cc index c5f1eccc333..f461da89fec 100644 --- a/paddle/fluid/inference/lite/op_teller.cc +++ b/paddle/fluid/inference/lite/op_teller.cc @@ -16,10 +16,9 @@ #include "paddle/fluid/framework/block_desc.h" #include "paddle/fluid/framework/program_desc.h" +#include "paddle/fluid/inference/lite/engine.h" #include "paddle/fluid/inference/lite/op_teller.h" -#include "lite/core/op_registry.h" - namespace paddle { namespace inference { namespace lite { diff --git a/paddle/fluid/inference/lite/tensor_utils.h b/paddle/fluid/inference/lite/tensor_utils.h index 95fe8ae903f..21c5e794d41 100644 --- a/paddle/fluid/inference/lite/tensor_utils.h +++ b/paddle/fluid/inference/lite/tensor_utils.h @@ -14,9 +14,8 @@ #pragma once -#include "lite/api/paddle_place.h" -#include "lite/core/tensor.h" #include "paddle/fluid/framework/lod_tensor.h" +#include "paddle/fluid/inference/lite/engine.h" namespace paddle { namespace inference { -- GitLab