未验证 提交 b0fdeba0 编写于 作者: H huzhiqiang 提交者: GitHub

X86 dynamic comp (#2270)

* we can build x86 dynamic library by `build.sh x86`
上级 4b4ff5fc
...@@ -87,6 +87,16 @@ if (LITE_WITH_PYTHON) ...@@ -87,6 +87,16 @@ if (LITE_WITH_PYTHON)
add_dependencies(publish_inference publish_inference_python_light_demo) add_dependencies(publish_inference publish_inference_python_light_demo)
endif() endif()
if (LITE_WITH_X86)
add_dependencies(publish_inference eigen3)
add_dependencies(publish_inference fluid_data_type)
add_dependencies(publish_inference bundle_full_api)
add_dependencies(publish_inference bundle_light_api)
add_dependencies(publish_inference test_model_bin)
add_dependencies(publish_inference paddle_full_api_shared)
add_dependencies(publish_inference paddle_light_api_shared)
endif()
if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM) if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM)
if (NOT LITE_ON_TINY_PUBLISH) if (NOT LITE_ON_TINY_PUBLISH)
# add cxx lib # add cxx lib
......
...@@ -237,6 +237,35 @@ function make_cuda { ...@@ -237,6 +237,35 @@ function make_cuda {
cd - cd -
} }
function make_x86 {
prepare_thirdparty
root_dir=$(pwd)
build_directory=$BUILD_DIR/build_x86
if [ -d $build_directory ]
then
rm -rf $build_directory
fi
mkdir -p $build_directory
cd $build_directory
prepare_workspace $root_dir $build_directory
cmake .. -DWITH_MKL=ON \
-DWITH_MKLDNN=OFF \
-DLITE_WITH_X86=ON \
-DLITE_WITH_PROFILE=OFF \
-DWITH_LITE=ON \
-DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=OFF \
-DLITE_WITH_ARM=OFF \
-DWITH_GPU=OFF \
-DLITE_BUILD_EXTRA=ON
make publish_inference -j4
cd -
}
function print_usage { function print_usage {
set +x set +x
echo -e "\nUSAGE:" echo -e "\nUSAGE:"
...@@ -355,6 +384,10 @@ function main { ...@@ -355,6 +384,10 @@ function main {
make_cuda make_cuda
shift shift
;; ;;
x86)
make_x86
shift
;;
*) *)
# unknown option # unknown option
print_usage print_usage
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册