|
|
|
@ -38,6 +38,18 @@ endif(WIN32)
|
|
|
|
|
add_subdirectory(api)
|
|
|
|
|
add_subdirectory(capi)
|
|
|
|
|
|
|
|
|
|
if(WITH_TESTING)
|
|
|
|
|
# tests/book depends the models that generated by python/paddle/fluid/tests/book
|
|
|
|
|
add_subdirectory(tests/book)
|
|
|
|
|
if(WITH_INFERENCE_API_TEST)
|
|
|
|
|
add_subdirectory(tests/api)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(NOT ON_INFER)
|
|
|
|
|
return()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_MKLDNN)
|
|
|
|
|
set(mkldnn_quantizer_src ${CMAKE_CURRENT_SOURCE_DIR}/api/mkldnn_quantizer.cc)
|
|
|
|
|
set(mkldnn_quantizer_cfg mkldnn_quantizer_config)
|
|
|
|
@ -62,6 +74,7 @@ else(WIN32)
|
|
|
|
|
zero_copy_tensor reset_tensor_array analysis_config ${mkldnn_quantizer_cfg} paddle_pass_builder)
|
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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")
|
|
|
|
@ -78,6 +91,7 @@ else(WIN32)
|
|
|
|
|
DEPS ${fluid_modules} paddle_fluid_api reset_tensor_array
|
|
|
|
|
analysis_config ${mkldnn_quantizer_cfg} paddle_pass_builder)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
get_property(os_dependency_modules GLOBAL PROPERTY OS_DEPENDENCY_MODULES)
|
|
|
|
|
target_link_libraries(paddle_fluid_shared ${os_dependency_modules})
|
|
|
|
|
|
|
|
|
@ -99,11 +113,3 @@ if(NOT APPLE AND NOT WIN32)
|
|
|
|
|
DEPENDS paddle_fluid_shared)
|
|
|
|
|
add_custom_target(check_symbol ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/.check_symbol")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_TESTING)
|
|
|
|
|
# tests/book depends the models that generated by python/paddle/fluid/tests/book
|
|
|
|
|
add_subdirectory(tests/book)
|
|
|
|
|
if(WITH_INFERENCE_API_TEST)
|
|
|
|
|
add_subdirectory(tests/api)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|