From 6783441e70d12fb83ed62b5d0fa7f8e82b45be5c 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: Wed, 17 Jun 2020 15:18:21 +0800 Subject: [PATCH] fix repeat definitions in liengine.cc, test=develop (#25020) --- cmake/external/lite.cmake | 4 ++++ paddle/fluid/inference/lite/engine.cc | 4 ++++ paddle/fluid/inference/lite/engine.h | 3 --- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmake/external/lite.cmake b/cmake/external/lite.cmake index 70c11d37f91..451c621eac1 100644 --- a/cmake/external/lite.cmake +++ b/cmake/external/lite.cmake @@ -28,6 +28,10 @@ if (NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR) set(LITE_GIT_TAG 34c29406c27ee00cef033a98887403443eb2565f) endif() + if(NOT CUDA_ARCH_NAME) + set(CUDA_ARCH_NAME "Auto") + endif() + # No quotes, so cmake can resolve it as a command with arguments. set(LITE_BUILD_COMMAND $(MAKE) publish_inference -j) set(LITE_OPTIONAL_ARGS -DWITH_MKL=ON diff --git a/paddle/fluid/inference/lite/engine.cc b/paddle/fluid/inference/lite/engine.cc index 38230e4f18f..6dbe748879c 100644 --- a/paddle/fluid/inference/lite/engine.cc +++ b/paddle/fluid/inference/lite/engine.cc @@ -18,6 +18,10 @@ #include "paddle/fluid/inference/lite/engine.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 { namespace lite { diff --git a/paddle/fluid/inference/lite/engine.h b/paddle/fluid/inference/lite/engine.h index d30c2d31e12..5f11c51952b 100644 --- a/paddle/fluid/inference/lite/engine.h +++ b/paddle/fluid/inference/lite/engine.h @@ -24,9 +24,6 @@ #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" -- GitLab