From efa54629fbcb6622db19c28b7d0c0f1d0634a5e4 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: Tue, 12 Jan 2021 00:33:40 +0800 Subject: [PATCH] fix header file paths of gflags, commit 3, test=develop (#30273) --- paddle/fluid/inference/tests/api/trt_quant_int8_test.cc | 2 +- .../inference/tests/api/trt_quant_int8_yolov3_r50_test.cc | 2 +- paddle/fluid/inference/tests/api/trt_resnet50_test.cc | 2 +- paddle/fluid/inference/tests/api/trt_resnext_test.cc | 2 +- .../fluid/inference/tests/api/trt_split_converter_test.cc | 2 +- paddle/fluid/memory/allocation/allocator_facade.cc | 3 +-- .../auto_growth_best_fit_allocator_facade_test.cc | 2 +- paddle/fluid/operators/distributed/communicator.cc | 2 +- paddle/fluid/operators/distributed/heart_beat_monitor.h | 2 +- paddle/fluid/operators/distributed/large_scale_kv.h | 2 +- paddle/fluid/operators/index_sample_op.h | 2 +- paddle/fluid/operators/jit/gen_base.h | 2 +- paddle/fluid/operators/optimizers/adam_op_xpu.cc | 6 +++--- paddle/fluid/operators/tdm_child_op.h | 2 +- paddle/fluid/operators/tdm_sampler_op.h | 2 +- 15 files changed, 17 insertions(+), 18 deletions(-) diff --git a/paddle/fluid/inference/tests/api/trt_quant_int8_test.cc b/paddle/fluid/inference/tests/api/trt_quant_int8_test.cc index 6adf3cf743b..ca25967b59a 100644 --- a/paddle/fluid/inference/tests/api/trt_quant_int8_test.cc +++ b/paddle/fluid/inference/tests/api/trt_quant_int8_test.cc @@ -12,10 +12,10 @@ 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 #include #include #include +#include "gflags/gflags.h" #include "paddle/fluid/inference/tests/api/trt_test_helper.h" diff --git a/paddle/fluid/inference/tests/api/trt_quant_int8_yolov3_r50_test.cc b/paddle/fluid/inference/tests/api/trt_quant_int8_yolov3_r50_test.cc index 4239c138aef..1fa24dddead 100644 --- a/paddle/fluid/inference/tests/api/trt_quant_int8_yolov3_r50_test.cc +++ b/paddle/fluid/inference/tests/api/trt_quant_int8_yolov3_r50_test.cc @@ -9,10 +9,10 @@ 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 #include #include #include +#include "gflags/gflags.h" #include "paddle/fluid/inference/tests/api/trt_test_helper.h" diff --git a/paddle/fluid/inference/tests/api/trt_resnet50_test.cc b/paddle/fluid/inference/tests/api/trt_resnet50_test.cc index 9f70a58a0c0..2975967e0c0 100644 --- a/paddle/fluid/inference/tests/api/trt_resnet50_test.cc +++ b/paddle/fluid/inference/tests/api/trt_resnet50_test.cc @@ -12,9 +12,9 @@ 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 #include #include +#include "gflags/gflags.h" #include "paddle/fluid/inference/tests/api/trt_test_helper.h" diff --git a/paddle/fluid/inference/tests/api/trt_resnext_test.cc b/paddle/fluid/inference/tests/api/trt_resnext_test.cc index 588b5bffd74..b525a1b7068 100644 --- a/paddle/fluid/inference/tests/api/trt_resnext_test.cc +++ b/paddle/fluid/inference/tests/api/trt_resnext_test.cc @@ -12,9 +12,9 @@ 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 #include #include +#include "gflags/gflags.h" #include "paddle/fluid/inference/tests/api/trt_test_helper.h" diff --git a/paddle/fluid/inference/tests/api/trt_split_converter_test.cc b/paddle/fluid/inference/tests/api/trt_split_converter_test.cc index 7cf50f21948..9ae0527bd97 100644 --- a/paddle/fluid/inference/tests/api/trt_split_converter_test.cc +++ b/paddle/fluid/inference/tests/api/trt_split_converter_test.cc @@ -12,9 +12,9 @@ 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 #include #include +#include "gflags/gflags.h" #include "paddle/fluid/inference/tests/api/trt_test_helper.h" diff --git a/paddle/fluid/memory/allocation/allocator_facade.cc b/paddle/fluid/memory/allocation/allocator_facade.cc index 03c252909d9..a124a56ef89 100644 --- a/paddle/fluid/memory/allocation/allocator_facade.cc +++ b/paddle/fluid/memory/allocation/allocator_facade.cc @@ -14,14 +14,13 @@ #include "paddle/fluid/memory/allocation/allocator_facade.h" -#include - #include #include #include #include #include +#include "gflags/gflags.h" #include "paddle/fluid/memory/allocation/allocator.h" #include "paddle/fluid/memory/allocation/allocator_strategy.h" #include "paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.h" diff --git a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator_facade_test.cc b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator_facade_test.cc index 69de0273402..1dcc820b26d 100644 --- a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator_facade_test.cc +++ b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator_facade_test.cc @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include // NOLINT #include // NOLINT #include // NOLINT #include #include // NOLINT +#include "gflags/gflags.h" #include "paddle/fluid/memory/allocation/allocator_facade.h" #include "paddle/fluid/platform/gpu_info.h" diff --git a/paddle/fluid/operators/distributed/communicator.cc b/paddle/fluid/operators/distributed/communicator.cc index 54dd4208fdb..4ee27a64146 100644 --- a/paddle/fluid/operators/distributed/communicator.cc +++ b/paddle/fluid/operators/distributed/communicator.cc @@ -14,7 +14,6 @@ limitations under the License. */ #include "paddle/fluid/operators/distributed/communicator.h" -#include #include #include @@ -23,6 +22,7 @@ limitations under the License. */ #include // NOLINT #include +#include "gflags/gflags.h" #include "paddle/fluid/framework/eigen.h" #include "paddle/fluid/framework/selected_rows.h" #include "paddle/fluid/framework/tensor_util.h" diff --git a/paddle/fluid/operators/distributed/heart_beat_monitor.h b/paddle/fluid/operators/distributed/heart_beat_monitor.h index 5df14c5a51b..d96433c318b 100644 --- a/paddle/fluid/operators/distributed/heart_beat_monitor.h +++ b/paddle/fluid/operators/distributed/heart_beat_monitor.h @@ -15,7 +15,6 @@ #pragma once #include -#include #include #include // NOLINT #include @@ -25,6 +24,7 @@ #include #include #include +#include "gflags/gflags.h" #include "paddle/fluid/platform/enforce.h" diff --git a/paddle/fluid/operators/distributed/large_scale_kv.h b/paddle/fluid/operators/distributed/large_scale_kv.h index 52b76b7bfe7..da2281231fc 100644 --- a/paddle/fluid/operators/distributed/large_scale_kv.h +++ b/paddle/fluid/operators/distributed/large_scale_kv.h @@ -15,7 +15,6 @@ #pragma once #include -#include #include #include // NOLINT #include @@ -25,6 +24,7 @@ #include #include #include +#include "gflags/gflags.h" #include "paddle/fluid/framework/generator.h" #include "paddle/fluid/framework/lod_tensor.h" diff --git a/paddle/fluid/operators/index_sample_op.h b/paddle/fluid/operators/index_sample_op.h index 6ba197d5c66..1e6b4a457ed 100644 --- a/paddle/fluid/operators/index_sample_op.h +++ b/paddle/fluid/operators/index_sample_op.h @@ -14,13 +14,13 @@ limitations under the License. */ #pragma once -#include #include #include #include #include #include #include +#include "gflags/gflags.h" #include "paddle/fluid/framework/op_registry.h" namespace paddle { diff --git a/paddle/fluid/operators/jit/gen_base.h b/paddle/fluid/operators/jit/gen_base.h index 27b85763415..c22a7f3ec92 100644 --- a/paddle/fluid/operators/jit/gen_base.h +++ b/paddle/fluid/operators/jit/gen_base.h @@ -14,10 +14,10 @@ #pragma once -#include #include // for unique_ptr #include #include +#include "gflags/gflags.h" #include "paddle/fluid/operators/jit/kernel_base.h" diff --git a/paddle/fluid/operators/optimizers/adam_op_xpu.cc b/paddle/fluid/operators/optimizers/adam_op_xpu.cc index 2abc690fc51..1740f2982b6 100644 --- a/paddle/fluid/operators/optimizers/adam_op_xpu.cc +++ b/paddle/fluid/operators/optimizers/adam_op_xpu.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/fluid/operators/optimizers/adam_op.h" -#include +#include "gflags/gflags.h" namespace paddle { namespace operators { @@ -74,7 +74,7 @@ class AdamOpXPUKernel : public framework::OpKernel { "output size is 1, but received " "value is:%d.", beta2_pow_out->numel())); - + T beta1 = static_cast(ctx.Attr("beta1")); if (ctx.HasInput("Beta1Tensor")) { auto* beta1_tensor = ctx.Input("Beta1Tensor"); @@ -109,7 +109,7 @@ class AdamOpXPUKernel : public framework::OpKernel { mom2_out.template mutable_data(ctx.GetPlace()), param_out.template mutable_data(ctx.GetPlace()), param.numel()); - //update in cpu and then copy to xpu + // update in cpu and then copy to xpu if (beta1_pow.place() == platform::CPUPlace() && beta2_pow.place() == platform::CPUPlace()) { const T* beta1_pow_p = beta1_pow.template data(); diff --git a/paddle/fluid/operators/tdm_child_op.h b/paddle/fluid/operators/tdm_child_op.h index 8640478cf4f..3549fc6c45e 100644 --- a/paddle/fluid/operators/tdm_child_op.h +++ b/paddle/fluid/operators/tdm_child_op.h @@ -14,13 +14,13 @@ #pragma once -#include #include #include #include #include #include #include +#include "gflags/gflags.h" #include "paddle/fluid/framework/mixed_vector.h" #include "paddle/fluid/framework/op_registry.h" diff --git a/paddle/fluid/operators/tdm_sampler_op.h b/paddle/fluid/operators/tdm_sampler_op.h index d172016415b..b740f34b0a3 100644 --- a/paddle/fluid/operators/tdm_sampler_op.h +++ b/paddle/fluid/operators/tdm_sampler_op.h @@ -14,13 +14,13 @@ #pragma once -#include #include #include #include #include #include #include +#include "gflags/gflags.h" #include "paddle/fluid/framework/mixed_vector.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/operators/math/sampler.h" -- GitLab