From 4fec182d24e17675b59d1b19b3417e67e04de998 Mon Sep 17 00:00:00 2001 From: Wilber Date: Mon, 30 Nov 2020 19:20:36 +0800 Subject: [PATCH] [Lite-Subgraph] Fix compile error for lite subgraph. (#29146) --- cmake/external/lite.cmake | 8 ++++++-- paddle/fluid/inference/lite/engine.cc | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmake/external/lite.cmake b/cmake/external/lite.cmake index 9cf305a4421..70d0259e6c6 100644 --- a/cmake/external/lite.cmake +++ b/cmake/external/lite.cmake @@ -82,10 +82,8 @@ if (NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR) ${EXTERNAL_OPTIONAL_ARGS} ${LITE_OPTIONAL_ARGS} ) - set(LITE_OUTPUT_BIN_DIR inference_lite_lib.armlinux.armv8) else() set(LITE_BUILD_COMMAND $(MAKE) publish_inference -j) - set(LITE_OUTPUT_BIN_DIR inference_lite_lib) set(LITE_OPTIONAL_ARGS -DWITH_MKL=ON -DLITE_WITH_CUDA=${WITH_GPU} -DWITH_MKLDNN=OFF @@ -133,6 +131,12 @@ if (NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR) endif() +if (WITH_ARM) + set(LITE_OUTPUT_BIN_DIR inference_lite_lib.armlinux.armv8) +else() + set(LITE_OUTPUT_BIN_DIR inference_lite_lib) +endif() + message(STATUS "Paddle-lite BINARY_DIR: ${LITE_BINARY_DIR}") message(STATUS "Paddle-lite SOURCE_DIR: ${LITE_SOURCE_DIR}") include_directories(${LITE_SOURCE_DIR}) diff --git a/paddle/fluid/inference/lite/engine.cc b/paddle/fluid/inference/lite/engine.cc index ccc655ee41c..478ef892ebd 100644 --- a/paddle/fluid/inference/lite/engine.cc +++ b/paddle/fluid/inference/lite/engine.cc @@ -55,8 +55,7 @@ paddle::lite_api::PaddlePredictor* EngineManager::Create( #ifdef PADDLE_WITH_ARM lite_cxx_config.set_threads(cfg.cpu_math_library_num_threads); #else - lite_cxx_config.set_x86_math_library_num_threads( - cfg.cpu_math_library_num_threads); + lite_cxx_config.set_x86_math_num_threads(cfg.cpu_math_library_num_threads); #endif #ifdef LITE_SUBGRAPH_WITH_XPU -- GitLab