blob: 1e9388ff17a69cca510e10fcf495e1654270c60a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Don't hardcode the library path. Leave it to the dynamic loader.
Index: pytorch-1.6.0/torch/__init__.py
===================================================================
--- pytorch-1.6.0.orig/torch/__init__.py
+++ pytorch-1.6.0/torch/__init__.py
@@ -138,7 +138,7 @@ def _load_global_deps():
here = os.path.abspath(__file__)
lib_path = os.path.join(os.path.dirname(here), 'lib', lib_name)
- ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
+ ctypes.CDLL(lib_name, mode=ctypes.RTLD_GLOBAL)
if (USE_RTLD_GLOBAL_WITH_LIBTORCH or os.getenv('TORCH_USE_RTLD_GLOBAL')) and \
|