|
|
|
@ -165,9 +165,9 @@ if '${WITH_MKL}' == 'ON':
|
|
|
|
|
shutil.copy('${MKLML_LIB}', libs_path)
|
|
|
|
|
shutil.copy('${MKLML_IOMP_LIB}', libs_path)
|
|
|
|
|
package_data['paddle.libs']+=['libmklml_intel' + ext_name,'libiomp5' + ext_name]
|
|
|
|
|
if '${CMAKE_BUILD_TYPE}' == 'Release':
|
|
|
|
|
# only change rpath in Release mode.
|
|
|
|
|
if '${WITH_MKLDNN}' == 'ON':
|
|
|
|
|
if '${WITH_MKLDNN}' == 'ON':
|
|
|
|
|
if '${CMAKE_BUILD_TYPE}' == 'Release':
|
|
|
|
|
# only change rpath in Release mode.
|
|
|
|
|
# TODO(typhoonzero): use install_name_tool to patch mkl libs once
|
|
|
|
|
# we can support mkl on mac.
|
|
|
|
|
#
|
|
|
|
@ -177,14 +177,19 @@ if '${CMAKE_BUILD_TYPE}' == 'Release':
|
|
|
|
|
command = "patchelf --set-rpath '$ORIGIN/' ${MKLDNN_SHARED_LIB}"
|
|
|
|
|
if os.system(command) != 0:
|
|
|
|
|
raise Exception("patch libmkldnn.so failed, command: %s" % command)
|
|
|
|
|
package_data['paddle.libs']+=['libmkldnn.so.0']
|
|
|
|
|
shutil.copy('${MKLDNN_SHARED_LIB}', libs_path)
|
|
|
|
|
package_data['paddle.libs']+=['libmkldnn.so.0']
|
|
|
|
|
shutil.copy('${MKLDNN_SHARED_LIB}', libs_path)
|
|
|
|
|
if '${WITH_NGRAPH}' == 'ON':
|
|
|
|
|
# only change rpath in Release mode,
|
|
|
|
|
# since in Debug mode, nGraph lib may be too large to be changed?
|
|
|
|
|
if '${CMAKE_BUILD_TYPE}' == 'Release':
|
|
|
|
|
# only change rpath in Release mode.
|
|
|
|
|
command = "patchelf --set-rpath '$ORIGIN/' ${NGRAPH_SHARED_LIB}"
|
|
|
|
|
if os.system(command) != 0:
|
|
|
|
|
raise Exception("patch ${NGRAPH_SHARED_LIB_NAME} failed, command: %s" % command)
|
|
|
|
|
if os.name != 'nt':
|
|
|
|
|
if "@APPLE@" == "1":
|
|
|
|
|
command = "install_name_tool -id \"@loader_path/\" ${NGRAPH_SHARED_LIB}"
|
|
|
|
|
else:
|
|
|
|
|
command = "patchelf --set-rpath '$ORIGIN/' ${NGRAPH_SHARED_LIB}"
|
|
|
|
|
if os.system(command) != 0:
|
|
|
|
|
raise Exception("patch ${NGRAPH_SHARED_LIB_NAME} failed, command: %s" % command)
|
|
|
|
|
shutil.copy('${NGRAPH_SHARED_LIB}', libs_path)
|
|
|
|
|
shutil.copy('${NGRAPH_CPU_LIB}', libs_path)
|
|
|
|
|
shutil.copy('${NGRAPH_TBB_LIB}', libs_path)
|
|
|
|
|