|
|
|
@ -39,6 +39,20 @@ get_property(fluid_modules GLOBAL PROPERTY FLUID_MODULES)
|
|
|
|
|
get_property(cuda_modules GLOBAL PROPERTY CUDA_MODULES)
|
|
|
|
|
|
|
|
|
|
add_subdirectory(api)
|
|
|
|
|
|
|
|
|
|
# Create static inference library if needed
|
|
|
|
|
# All static libs in inference/api
|
|
|
|
|
set(STATIC_INFERENCE_API paddle_inference_api analysis_predictor zero_copy_tensor reset_tensor_array
|
|
|
|
|
analysis_config paddle_pass_builder activation_functions ${mkldnn_quantizer_cfg})
|
|
|
|
|
create_static_lib(paddle_fluid ${fluid_modules} ${STATIC_INFERENCE_API})
|
|
|
|
|
|
|
|
|
|
if(NOT APPLE)
|
|
|
|
|
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
|
|
|
|
|
set(LINK_FLAGS "-Wl,--retain-symbols-file ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.sym")
|
|
|
|
|
set_target_properties(paddle_fluid PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# C inference API
|
|
|
|
|
add_subdirectory(capi)
|
|
|
|
|
|
|
|
|
|
if(WITH_TESTING)
|
|
|
|
@ -53,17 +67,6 @@ if(NOT ON_INFER)
|
|
|
|
|
return()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Create static inference library if needed
|
|
|
|
|
# All static libs in inference/api
|
|
|
|
|
set(STATIC_INFERENCE_API paddle_inference_api analysis_predictor zero_copy_tensor reset_tensor_array
|
|
|
|
|
analysis_config paddle_pass_builder activation_functions ${mkldnn_quantizer_cfg})
|
|
|
|
|
create_static_lib(paddle_fluid ${fluid_modules} ${STATIC_INFERENCE_API})
|
|
|
|
|
if(NOT APPLE)
|
|
|
|
|
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
|
|
|
|
|
set(LINK_FLAGS "-Wl,--retain-symbols-file ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.sym")
|
|
|
|
|
set_target_properties(paddle_fluid PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
set(SHARED_INFERENCE_SRCS
|
|
|
|
|
io.cc
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../framework/data_feed.cc
|
|
|
|
|