Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 392181e9 authored by hhakim's avatar hhakim
Browse files

Fix the bug of issue #141 (libtorch/openmp loading).

parent 3ba758cb
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,11 @@ download_uncompress(uncompress_dir=DOWNLOAD_PATH, base_url=BASE_URL, ...@@ -36,6 +36,11 @@ download_uncompress(uncompress_dir=DOWNLOAD_PATH, base_url=BASE_URL,
already_downloaded_msg=False, already_downloaded_msg=False,
extra_file_to_check_dl='libtorch') extra_file_to_check_dl='libtorch')
from os import system
# modify the rpath of libtorch in order for the linker to find the libiomp5 to
# load from libtorch lib directory (so we're not using OpenMP from MacPorts
# here)
system('install_name_tool -add_rpath "/Users/$USER/libtorch/lib" /Users/$USER/libtorch/lib/libtorch.dylib 2>/dev/null')
# load shared libraries in memory # load shared libraries in memory
for libname in [C10_LIB, TORCH_LIB]: #, GOMP_LIB]: for libname in [C10_LIB, TORCH_LIB]: #, GOMP_LIB]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment