|
|
@ -278,6 +278,11 @@ else:
|
|
|
|
# copy the openblas.dll
|
|
|
|
# copy the openblas.dll
|
|
|
|
shutil.copy('${OPENBLAS_SHARED_LIB}', libs_path)
|
|
|
|
shutil.copy('${OPENBLAS_SHARED_LIB}', libs_path)
|
|
|
|
package_data['paddle.libs'] += ['openblas' + ext_name]
|
|
|
|
package_data['paddle.libs'] += ['openblas' + ext_name]
|
|
|
|
|
|
|
|
elif os.name == 'posix' and platform.machine() == 'aarch64':
|
|
|
|
|
|
|
|
# copy the libopenblas.so on linux+aarch64
|
|
|
|
|
|
|
|
# special: core_noavx.so depends on 'libopenblas.so.0', not 'libopenblas.so'
|
|
|
|
|
|
|
|
shutil.copy('${OPENBLAS_LIB}' + '.0', libs_path)
|
|
|
|
|
|
|
|
package_data['paddle.libs'] += ['libopenblas.so.0']
|
|
|
|
|
|
|
|
|
|
|
|
if '${WITH_LITE}' == 'ON':
|
|
|
|
if '${WITH_LITE}' == 'ON':
|
|
|
|
shutil.copy('${LITE_SHARED_LIB}', libs_path)
|
|
|
|
shutil.copy('${LITE_SHARED_LIB}', libs_path)
|
|
|
@ -351,10 +356,8 @@ if '${CMAKE_BUILD_TYPE}' == 'Release':
|
|
|
|
command = "install_name_tool -id \"@loader_path/../libs/\" ${PADDLE_BINARY_DIR}/python/paddle/fluid/${FLUID_CORE_NAME}" + '.so'
|
|
|
|
command = "install_name_tool -id \"@loader_path/../libs/\" ${PADDLE_BINARY_DIR}/python/paddle/fluid/${FLUID_CORE_NAME}" + '.so'
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
command = "patchelf --set-rpath '$ORIGIN/../libs/' ${PADDLE_BINARY_DIR}/python/paddle/fluid/${FLUID_CORE_NAME}" + '.so'
|
|
|
|
command = "patchelf --set-rpath '$ORIGIN/../libs/' ${PADDLE_BINARY_DIR}/python/paddle/fluid/${FLUID_CORE_NAME}" + '.so'
|
|
|
|
# The dynamic library compiled under aarch64 is greater than 64M,
|
|
|
|
|
|
|
|
# and an oversize error will be reported when using patchelf.
|
|
|
|
|
|
|
|
# The sw_64 not suppot patchelf, so we just disable that.
|
|
|
|
# The sw_64 not suppot patchelf, so we just disable that.
|
|
|
|
if platform.machine() != 'aarch64' and platform.machine() != 'sw_64' and platform.machine() != 'mips64':
|
|
|
|
if platform.machine() != 'sw_64' and platform.machine() != 'mips64':
|
|
|
|
if os.system(command) != 0:
|
|
|
|
if os.system(command) != 0:
|
|
|
|
raise Exception("patch ${FLUID_CORE_NAME}.%s failed, command: %s" % (ext_name, command))
|
|
|
|
raise Exception("patch ${FLUID_CORE_NAME}.%s failed, command: %s" % (ext_name, command))
|
|
|
|
|
|
|
|
|
|
|
|