diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2023-04-05 21:35:41 +0200 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2023-04-05 21:35:58 +0200 |
commit | d2a5c15046bab11f3e70927d6b053ab98870acf0 (patch) | |
tree | 88e6fc2702c92a034432f441e32aa07f987f795e /sci-libs/pytorch/files | |
parent | dev-libs/mimalloc: add 2.1.1, drop 2.1.0 (diff) | |
download | gentoo-d2a5c15046bab11f3e70927d6b053ab98870acf0.tar.gz gentoo-d2a5c15046bab11f3e70927d6b053ab98870acf0.tar.bz2 gentoo-d2a5c15046bab11f3e70927d6b053ab98870acf0.zip |
sci-libs/pytorch: add 2.0.0
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-libs/pytorch/files')
-rw-r--r-- | sci-libs/pytorch/files/pytorch-2.0.0-emptyso.patch | 15 | ||||
-rw-r--r-- | sci-libs/pytorch/files/pytorch-2.0.0-global-dlopen.patch | 20 |
2 files changed, 35 insertions, 0 deletions
diff --git a/sci-libs/pytorch/files/pytorch-2.0.0-emptyso.patch b/sci-libs/pytorch/files/pytorch-2.0.0-emptyso.patch new file mode 100644 index 000000000000..e4703894308a --- /dev/null +++ b/sci-libs/pytorch/files/pytorch-2.0.0-emptyso.patch @@ -0,0 +1,15 @@ +--- a/setup.py 2023-04-05 11:23:00.713405789 +0200 ++++ b/setup.py 2023-04-05 11:23:36.900876249 +0200 +@@ -960,12 +960,6 @@ + name=str('caffe2.python.caffe2_pybind11_state_hip'), + sources=[]), + ) +- if cmake_cache_vars['BUILD_FUNCTORCH']: +- extensions.append( +- Extension( +- name=str('functorch._C'), +- sources=[]), +- ) + if cmake_cache_vars['BUILD_NVFUSER']: + extensions.append( + Extension( diff --git a/sci-libs/pytorch/files/pytorch-2.0.0-global-dlopen.patch b/sci-libs/pytorch/files/pytorch-2.0.0-global-dlopen.patch new file mode 100644 index 000000000000..0f1b400e234d --- /dev/null +++ b/sci-libs/pytorch/files/pytorch-2.0.0-global-dlopen.patch @@ -0,0 +1,20 @@ +--- a/torch/__init__.py 2023-04-05 11:12:25.682681130 +0200 ++++ b/torch/__init__.py 2023-04-05 11:13:00.640170307 +0200 +@@ -165,7 +165,7 @@ + lib_path = os.path.join(os.path.dirname(here), 'lib', lib_name) + + try: +- ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL) ++ ctypes.CDLL(lib_name, mode=ctypes.RTLD_GLOBAL) + except OSError as err: + # Can only happen for wheel with cuda libs as PYPI deps + # As PyTorch is not purelib, but nvidia-*-cu11 is +@@ -187,7 +187,7 @@ + raise err + for lib_folder, lib_name in cuda_libs.items(): + _preload_cuda_deps(lib_folder, 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 \ |