From d0413e58d30bc40b4df2f617bdc5dcf3843b5805 Mon Sep 17 00:00:00 2001 From: xujiaqi01 <173596896@qq.com> Date: Thu, 26 Mar 2020 18:37:38 +0800 Subject: [PATCH] support get pslib version (#22835) * get pslib version * test=develop --- cmake/external/pslib.cmake | 1 + python/setup.py.in | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cmake/external/pslib.cmake b/cmake/external/pslib.cmake index 532255bc29b..bdfd335172d 100644 --- a/cmake/external/pslib.cmake +++ b/cmake/external/pslib.cmake @@ -31,6 +31,7 @@ SET(PSLIB_ROOT ${PSLIB_INSTALL_DIR}) SET(PSLIB_INC_DIR ${PSLIB_ROOT}/include) SET(PSLIB_LIB_DIR ${PSLIB_ROOT}/lib) SET(PSLIB_LIB ${PSLIB_LIB_DIR}/libps.so) +SET(PSLIB_VERSION_PY ${PSLIB_DOWNLOAD_DIR}/pslib/version.py) SET(PSLIB_IOMP_LIB ${PSLIB_LIB_DIR}/libiomp5.so) #todo what is this SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}" "${PSLIB_ROOT}/lib") diff --git a/python/setup.py.in b/python/setup.py.in index d2f4571b115..5e8ed5544ac 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -196,6 +196,8 @@ else: if '${WITH_PSLIB}' == 'ON': shutil.copy('${PSLIB_LIB}', libs_path) + if os.path.exists('${PSLIB_VERSION_PY}'): + shutil.copy('${PSLIB_VERSION_PY}', '${PADDLE_BINARY_DIR}/python/paddle/fluid/incubate/fleet/parameter_server/pslib/') package_data['paddle.libs'] += ['libps' + ext_name] if '${WITH_MKLDNN}' == 'ON': -- GitLab