Strip AMD libraries bundled with Python package due to libonnxruntime_providers_rocm.so change (#9679)

* remove AMD library depedence from libonnxruntime_providers_rocm.so

* fix flake error

* remove rocm dependency from original library as well
This commit is contained in:
Suffian Khan 2021-11-11 09:32:09 -08:00 committed by GitHub
parent acb5459268
commit e6f0fdd653
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -163,9 +163,11 @@ try:
check=True, stdout=subprocess.PIPE, universal_newlines=True)
cuda_dependencies = ['libcublas.so', 'libcublasLt.so', 'libcudnn.so', 'libcudart.so',
'libcurand.so', 'libcufft.so', 'libnvToolsExt.so']
rocm_dependencies = ['librccl.so', 'libamdhip64.so', 'librocblas.so', 'libMIOpen.so',
'libhsa-runtime64.so', 'libhsakmt.so']
args = ['patchelf', '--debug']
for line in result.stdout.split('\n'):
for dependency in cuda_dependencies:
for dependency in (cuda_dependencies + rocm_dependencies):
if dependency in line:
if dependency not in to_preload:
to_preload_cuda.append(line)