|
|
|
@ -29,6 +29,9 @@ if (APPLE)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WIN32 OR APPLE)
|
|
|
|
|
MESSAGE(STATUS "Disable XBYAK in Windows and MacOS")
|
|
|
|
|
SET(WITH_XBYAK OFF CACHE STRING "Disable XBYAK in Windows and MacOS" FORCE)
|
|
|
|
|
|
|
|
|
|
if(WITH_LIBXSMM)
|
|
|
|
|
MESSAGE(WARNING
|
|
|
|
|
"Windows, Mac are not supported with libxsmm in Paddle yet."
|
|
|
|
@ -49,6 +52,27 @@ if(WIN32 OR APPLE)
|
|
|
|
|
"Force WITH_BOX_PS=OFF")
|
|
|
|
|
SET(WITH_BOX_PS OFF CACHE STRING "Disable BOX_PS package in Windows and MacOS" FORCE)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_PSLIB)
|
|
|
|
|
MESSAGE(WARNING
|
|
|
|
|
"Windows or Mac is not supported with PSLIB in Paddle yet."
|
|
|
|
|
"Force WITH_PSLIB=OFF")
|
|
|
|
|
SET(WITH_PSLIB OFF CACHE STRING "Disable PSLIB package in Windows and MacOS" FORCE)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_LIBMCT)
|
|
|
|
|
MESSAGE(WARNING
|
|
|
|
|
"Windows or Mac is not supported with LIBMCT in Paddle yet."
|
|
|
|
|
"Force WITH_LIBMCT=OFF")
|
|
|
|
|
SET(WITH_LIBMCT OFF CACHE STRING "Disable LIBMCT package in Windows and MacOS" FORCE)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_PSLIB_BRPC)
|
|
|
|
|
MESSAGE(WARNING
|
|
|
|
|
"Windows or Mac is not supported with PSLIB_BRPC in Paddle yet."
|
|
|
|
|
"Force WITH_PSLIB_BRPC=OFF")
|
|
|
|
|
SET(WITH_PSLIB_BRPC OFF CACHE STRING "Disable PSLIB_BRPC package in Windows and MacOS" FORCE)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
set(WITH_MKLML ${WITH_MKL})
|
|
|
|
@ -75,18 +99,19 @@ include(external/threadpool)# download threadpool
|
|
|
|
|
include(external/dlpack) # download dlpack
|
|
|
|
|
include(external/xxhash) # download, build, install xxhash
|
|
|
|
|
include(external/warpctc) # download, build, install warpctc
|
|
|
|
|
include(external/rocprim) # download, build, install rocprim
|
|
|
|
|
include(external/xbyak) # download, build, install xbyak
|
|
|
|
|
|
|
|
|
|
set(third_party_deps eigen3 gflags glog boost xxhash zlib dlpack warpctc simple_threadpool)
|
|
|
|
|
set(third_party_deps)
|
|
|
|
|
list(APPEND third_party_deps extern_eigen3 extern_gflags extern_glog extern_boost extern_xxhash)
|
|
|
|
|
list(APPEND third_party_deps extern_zlib extern_dlpack extern_warpctc extern_threadpool)
|
|
|
|
|
|
|
|
|
|
if(WITH_AMD_GPU)
|
|
|
|
|
list(APPEND third_party_deps rocprim)
|
|
|
|
|
include(external/rocprim) # download, build, install rocprim
|
|
|
|
|
list(APPEND third_party_deps extern_rocprim)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_MKLML)
|
|
|
|
|
include(external/mklml) # download, install mklml package
|
|
|
|
|
list(APPEND third_party_deps mklml)
|
|
|
|
|
list(APPEND third_party_deps extern_mklml)
|
|
|
|
|
endif()
|
|
|
|
|
include(external/openblas) # find first, then download, build, install openblas
|
|
|
|
|
if(NOT CBLAS_FOUND)
|
|
|
|
@ -95,7 +120,7 @@ endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_MKLDNN)
|
|
|
|
|
include(external/mkldnn) # download, build, install mkldnn
|
|
|
|
|
list(APPEND third_party_deps mkldnn_shared_lib)
|
|
|
|
|
list(APPEND third_party_deps extern_mkldnn)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
include(external/protobuf) # find first, then download, build, install protobuf
|
|
|
|
@ -106,7 +131,7 @@ endif()
|
|
|
|
|
if(WITH_PYTHON)
|
|
|
|
|
include(external/python) # find python and python_module
|
|
|
|
|
include(external/pybind11) # download pybind11
|
|
|
|
|
list(APPEND third_party_deps pybind)
|
|
|
|
|
list(APPEND third_party_deps extern_pybind)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
IF(WITH_TESTING OR (WITH_DISTRIBUTE AND NOT WITH_GRPC))
|
|
|
|
@ -116,34 +141,41 @@ ENDIF()
|
|
|
|
|
|
|
|
|
|
if(WITH_GPU)
|
|
|
|
|
include(external/cub) # download cub
|
|
|
|
|
list(APPEND third_party_deps cub)
|
|
|
|
|
list(APPEND third_party_deps extern_cub)
|
|
|
|
|
endif(WITH_GPU)
|
|
|
|
|
|
|
|
|
|
if(WITH_PSLIB)
|
|
|
|
|
include(external/libmct)
|
|
|
|
|
include(external/pslib)
|
|
|
|
|
include(external/pslib_brpc)
|
|
|
|
|
include(external/pslib) # download, build, install pslib
|
|
|
|
|
list(APPEND third_party_deps extern_pslib)
|
|
|
|
|
if(WITH_LIBMCT)
|
|
|
|
|
include(external/libmct) # download, build, install libmct
|
|
|
|
|
list(APPEND third_party_deps extern_libxsmm)
|
|
|
|
|
endif()
|
|
|
|
|
if(WITH_PSLIB_BRPC)
|
|
|
|
|
include(external/pslib_brpc) # download, build, install pslib_brpc
|
|
|
|
|
list(APPEND third_party_deps extern_pslib_brpc)
|
|
|
|
|
endif()
|
|
|
|
|
endif(WITH_PSLIB)
|
|
|
|
|
|
|
|
|
|
if(WITH_BOX_PS)
|
|
|
|
|
include(external/box_ps)
|
|
|
|
|
list(APPEND third_party_deps box_ps)
|
|
|
|
|
list(APPEND third_party_deps extern_box_ps)
|
|
|
|
|
endif(WITH_BOX_PS)
|
|
|
|
|
|
|
|
|
|
if(WITH_DISTRIBUTE)
|
|
|
|
|
list(APPEND third_party_deps cares)
|
|
|
|
|
list(APPEND third_party_deps extern_cares)
|
|
|
|
|
if(WITH_GRPC)
|
|
|
|
|
list(APPEND third_party_deps grpc++_unsecure)
|
|
|
|
|
list(APPEND third_party_deps extern_grpc)
|
|
|
|
|
else()
|
|
|
|
|
list(APPEND third_party_deps leveldb)
|
|
|
|
|
list(APPEND third_party_deps brpc)
|
|
|
|
|
list(APPEND third_party_deps extern_leveldb)
|
|
|
|
|
list(APPEND third_party_deps extern_brpc)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_NGRAPH)
|
|
|
|
|
if(WITH_MKLDNN)
|
|
|
|
|
include(external/ngraph) # download, build, install nGraph
|
|
|
|
|
list(APPEND third_party_deps ngraph)
|
|
|
|
|
list(APPEND third_party_deps extern_ngraph)
|
|
|
|
|
else()
|
|
|
|
|
MESSAGE(WARNING
|
|
|
|
|
"nGraph needs mkl-dnn to be enabled."
|
|
|
|
@ -153,19 +185,20 @@ if(WITH_NGRAPH)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_XBYAK)
|
|
|
|
|
list(APPEND third_party_deps xbyak)
|
|
|
|
|
include(external/xbyak) # download, build, install xbyak
|
|
|
|
|
list(APPEND third_party_deps extern_xbyak)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_LIBXSMM)
|
|
|
|
|
include(external/libxsmm) # download, build, install libxsmm
|
|
|
|
|
list(APPEND third_party_deps libxsmm)
|
|
|
|
|
list(APPEND third_party_deps extern_libxsmm)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_DGC)
|
|
|
|
|
message(STATUS "add dgc lib.")
|
|
|
|
|
include(external/dgc) # download, build, install dgc
|
|
|
|
|
add_definitions(-DPADDLE_WITH_DGC)
|
|
|
|
|
list(APPEND third_party_deps dgc)
|
|
|
|
|
list(APPEND third_party_deps extern_dgc)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
add_custom_target(third_party DEPENDS ${third_party_deps})
|