未验证 提交 7a06fc7a 编写于 作者: 石晓伟 提交者: GitHub

support dynamic cuda libs, test=release/1.7 (#22419)

* update external lite, test=develop

* switch WITH_TESTING to OFF, test=develop
上级 4e53be82
...@@ -25,7 +25,7 @@ if (NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR) ...@@ -25,7 +25,7 @@ if (NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
set(LITE_INSTALL_DIR ${THIRD_PARTY_PATH}/install/lite) set(LITE_INSTALL_DIR ${THIRD_PARTY_PATH}/install/lite)
# No quotes, so cmake can resolve it as a command with arguments. # No quotes, so cmake can resolve it as a command with arguments.
set(LITE_BUILD_COMMAND $(MAKE) -j) set(LITE_BUILD_COMMAND $(MAKE) publish_inference -j)
set(LITE_OPTIONAL_ARGS -DWITH_MKL=ON set(LITE_OPTIONAL_ARGS -DWITH_MKL=ON
-DLITE_WITH_CUDA=${WITH_GPU} -DLITE_WITH_CUDA=${WITH_GPU}
-DWITH_MKLDNN=OFF -DWITH_MKLDNN=OFF
...@@ -34,9 +34,10 @@ if (NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR) ...@@ -34,9 +34,10 @@ if (NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
-DWITH_LITE=OFF -DWITH_LITE=OFF
-DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=OFF -DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=OFF
-DWITH_PYTHON=OFF -DWITH_PYTHON=OFF
-DWITH_TESTING=ON -DWITH_TESTING=OFF
-DLITE_BUILD_EXTRA=ON -DLITE_BUILD_EXTRA=ON
-DCUDNN_ROOT=${CUDNN_ROOT} -DCUDNN_ROOT=${CUDNN_ROOT}
-DLITE_WITH_STATIC_CUDA=OFF
-DLITE_WITH_ARM=OFF) -DLITE_WITH_ARM=OFF)
ExternalProject_Add( ExternalProject_Add(
...@@ -74,7 +75,7 @@ include_directories(${LITE_SOURCE_DIR}) ...@@ -74,7 +75,7 @@ include_directories(${LITE_SOURCE_DIR})
include_directories(${LITE_BINARY_DIR}) include_directories(${LITE_BINARY_DIR})
function(external_lite_static_libs alias path) function(external_lite_static_libs alias path)
add_library(${alias} STATIC IMPORTED GLOBAL) add_library(${alias} SHARED IMPORTED GLOBAL)
SET_PROPERTY(TARGET ${alias} PROPERTY IMPORTED_LOCATION SET_PROPERTY(TARGET ${alias} PROPERTY IMPORTED_LOCATION
${path}) ${path})
if (LITE_PROJECT) if (LITE_PROJECT)
...@@ -82,6 +83,6 @@ function(external_lite_static_libs alias path) ...@@ -82,6 +83,6 @@ function(external_lite_static_libs alias path)
endif() endif()
endfunction() endfunction()
external_lite_static_libs(lite_full_static ${LITE_BINARY_DIR}/lite/api/libapi_full_static.a) external_lite_static_libs(lite_full_static ${LITE_BINARY_DIR}/inference_lite_lib/cxx/lib/libpaddle_full_api_shared.so)
add_definitions(-DPADDLE_WITH_LITE) add_definitions(-DPADDLE_WITH_LITE)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册