@@ -278,6 +278,11 @@ else:
278278 # copy the openblas.dll
279279 shutil.copy('${OPENBLAS_SHARED_LIB}', libs_path)
280280 package_data['paddle.libs'] += ['openblas' + ext_name]
281+ elif os.name == 'posix' and platform.machine() == 'aarch64':
282+ # copy the libopenblas.so on linux+aarch64
283+ # special: core_noavx.so depends on 'libopenblas.so.0', not 'libopenblas.so'
284+ shutil.copy('${OPENBLAS_LIB}' + '.0', libs_path)
285+ package_data['paddle.libs'] += ['libopenblas.so.0']
281286
282287if '${WITH_LITE}' == 'ON':
283288 shutil.copy('${LITE_SHARED_LIB}', libs_path)
@@ -350,10 +355,8 @@ if '${CMAKE_BUILD_TYPE}' == 'Release':
350355 command = "install_name_tool -id \"@loader_path/../libs/\" ${PADDLE_BINARY_DIR}/python/paddle/fluid/${FLUID_CORE_NAME}" + '.so'
351356 else:
352357 command = "patchelf --set-rpath '$ORIGIN/../libs/' ${PADDLE_BINARY_DIR}/python/paddle/fluid/${FLUID_CORE_NAME}" + '.so'
353- # The dynamic library compiled under aarch64 is greater than 64M,
354- # and an oversize error will be reported when using patchelf.
355358 # The sw_64 not suppot patchelf, so we just disable that.
356- if platform.machine() != 'aarch64' and platform.machine() != ' sw_64' and platform.machine() != 'mips64':
359+ if platform.machine() != 'sw_64' and platform.machine() != 'mips64':
357360 if os.system(command) != 0:
358361 raise Exception("patch ${FLUID_CORE_NAME}.%s failed, command: %s" % (ext_name, command))
359362
0 commit comments