8000 [CUDA] Change slim-wheel libraries load order (#145638) · pytorch/pytorch@d544858 · GitHub
[go: up one dir, main page]

Skip to content

Commit d544858

Browse files
nWEIdiamalfet
authored andcommitted
[CUDA] Change slim-wheel libraries load order (#145638)
There is no libnvjitlink in CUDA-11.x , so attempts to load it first will abort the execution and prevent the script from preloading nvrtc Fixes issues reported in #145614 (comment) Pull Request resolved: #145638 Approved by: https://github.com/atalman, https://github.com/kit1980, https://github.com/malfet Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com> (cherry picked from commit 2a70de7)
1 parent 3207040 commit d544858

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

torch/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,10 @@ def _load_global_deps() -> None:
328328
# libtorch_global_deps.so always depends in cudart, check if its installed via wheel
329329
if "nvidia/cuda_runtime/lib/libcudart.so" not in _maps:
330330
return
331-
# If all abovementioned conditions are met, preload nvjitlink and nvrtc
332-
_preload_cuda_deps("nvjitlink", "libnvJitLink.so.*[0-9]")
331+
# If all above-mentioned conditions are met, preload nvrtc and nvjitlink
332+
# Please note that order are important for CUDA-11.8 , as nvjitlink does not exist there
333333
_preload_cuda_deps("cuda_nvrtc", "libnvrtc.so.*[0-9]")
334+
_preload_cuda_deps("nvjitlink", "libnvJitLink.so.*[0-9]")
334335
except Exception:
335336
pass
336337

0 commit comments

Comments
 (0)
0