From 45bc4542aa54e6fbbb0d9cb55956fb2a00ddc78e Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Mon, 7 Nov 2022 18:16:41 +0800 Subject: [PATCH] remove hardcoded -Wunused-variable compiler flags (#47706) --- .../api/manual/eager_manual/forwards/add_n_fwd_func.cc | 1 - .../eager_manual/forwards/conv2d_fwd_function.cc | 1 - .../fluid_manual/forwards/fused_attention_fwd_func.cc | 2 -- .../forwards/fused_feedforward_fwd_func.cc | 2 -- .../forwards/fused_gate_attention_fwd_func.cc | 2 -- .../forwards/fused_gemm_epilogue_fwd_func.cc | 2 -- .../fluid/eager/auto_code_generator/eager_generator.cc | 4 ++-- paddle/fluid/operators/dlnne/CMakeLists.txt | 3 +-- paddle/fluid/pybind/CMakeLists.txt | 10 +++++----- 9 files changed, 8 insertions(+), 19 deletions(-) diff --git a/paddle/fluid/eager/api/manual/eager_manual/forwards/add_n_fwd_func.cc b/paddle/fluid/eager/api/manual/eager_manual/forwards/add_n_fwd_func.cc index fc42340211..a6bc082715 100644 --- a/paddle/fluid/eager/api/manual/eager_manual/forwards/add_n_fwd_func.cc +++ b/paddle/fluid/eager/api/manual/eager_manual/forwards/add_n_fwd_func.cc @@ -20,7 +20,6 @@ #include "paddle/fluid/eager/nan_inf_utils.h" #include "paddle/fluid/platform/profiler/event_tracing.h" -#pragma GCC diagnostic ignored "-Wunused-variable" DECLARE_bool(check_nan_inf); paddle::experimental::Tensor add_n_ad_func( diff --git a/paddle/fluid/eager/api/manual/eager_manual/forwards/conv2d_fwd_function.cc b/paddle/fluid/eager/api/manual/eager_manual/forwards/conv2d_fwd_function.cc index 842ff4822d..52a2bd12f0 100644 --- a/paddle/fluid/eager/api/manual/eager_manual/forwards/conv2d_fwd_function.cc +++ b/paddle/fluid/eager/api/manual/eager_manual/forwards/conv2d_fwd_function.cc @@ -21,7 +21,6 @@ #include "paddle/fluid/eager/nan_inf_utils.h" #include "paddle/fluid/platform/profiler/event_tracing.h" -#pragma GCC diagnostic ignored "-Wunused-variable" DECLARE_bool(check_nan_inf); paddle::experimental::Tensor conv2d_ad_func( diff --git a/paddle/fluid/eager/api/manual/fluid_manual/forwards/fused_attention_fwd_func.cc b/paddle/fluid/eager/api/manual/fluid_manual/forwards/fused_attention_fwd_func.cc index d733dbf8b7..334cdc6736 100644 --- a/paddle/fluid/eager/api/manual/fluid_manual/forwards/fused_attention_fwd_func.cc +++ b/paddle/fluid/eager/api/manual/fluid_manual/forwards/fused_attention_fwd_func.cc @@ -20,8 +20,6 @@ #include "paddle/fluid/eager/api/utils/global_utils.h" #include "paddle/fluid/platform/profiler/event_tracing.h" -#pragma GCC diagnostic ignored "-Wunused-variable" - std::tuple