|
|
|
@ -159,6 +159,8 @@ if '${WITH_MKL}' == 'ON':
|
|
|
|
|
shutil.copy('${MKLML_LIB}', libs_path)
|
|
|
|
|
shutil.copy('${MKLML_IOMP_LIB}', libs_path)
|
|
|
|
|
package_data['paddle.libs']+=['libmklml_intel.so','libiomp5.so']
|
|
|
|
|
if '${CMAKE_BUILD_TYPE}' == 'Release':
|
|
|
|
|
# only change rpath in Release mode.
|
|
|
|
|
if '${WITH_MKLDNN}' == 'ON':
|
|
|
|
|
# TODO(typhoonzero): use install_name_tool to patch mkl libs once
|
|
|
|
|
# we can support mkl on mac.
|
|
|
|
@ -179,6 +181,8 @@ package_dir['paddle.libs']=libs_path
|
|
|
|
|
# The reason is that libwarpctc.so, libiomp5.so etc are in paddle.libs, and
|
|
|
|
|
# core.so is in paddle.fluid, thus paddle/fluid/../libs will pointer to above libraries.
|
|
|
|
|
# This operation will fix https://github.com/PaddlePaddle/Paddle/issues/3213
|
|
|
|
|
if '${CMAKE_BUILD_TYPE}' == 'Release':
|
|
|
|
|
# only change rpath in Release mode, since in Debug mode, core.so is too large to be changed.
|
|
|
|
|
if "@APPLE@" == "1":
|
|
|
|
|
command = "install_name_tool -id \"@loader_path/../libs/\" ${PADDLE_BINARY_DIR}/python/paddle/fluid/core.so"
|
|
|
|
|
else:
|
|
|
|
|