-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
module: binariesAnything related to official binaries that we release to usersAnything related to official binaries that we release to userstopic: binariestopic: buildtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Describe the bug
For in-tree installation, there is a pytorch-xxx.pth which contains:
Lines 762 to 771 in 5deca07
| @timed("Writing pytorch-nightly.pth") | |
| def write_pth(venv: Venv) -> None: | |
| """Writes Python path file for this dir.""" | |
| (venv.site_packages() / "pytorch-nightly.pth").write_text( | |
| "# This file was autogenerated by PyTorch's tools/nightly.py\n" | |
| "# Please delete this file if you no longer need the following development\n" | |
| "# version of PyTorch to be importable\n" | |
| f"{REPO_ROOT}\n", | |
| encoding="utf-8", | |
| ) |
points to the git repository.
The torch package is not installed in the site-packages directory.
$ make setup-env-cuda PYTHON="/home/linuxbrew/.linuxbrew/bin/python3.12"
$ source venv/bin/activate
$ patchelf --print-rpath torch/_C.*.so | tr ':' '\n'
$ORIGIN/../../nvidia/cublas/lib
$ORIGIN/../../nvidia/cuda_cupti/lib
$ORIGIN/../../nvidia/cuda_nvrtc/lib
$ORIGIN/../../nvidia/cuda_runtime/lib
$ORIGIN/../../nvidia/cudnn/lib
$ORIGIN/../../nvidia/cufft/lib
$ORIGIN/../../nvidia/curand/lib
$ORIGIN/../../nvidia/cusolver/lib
$ORIGIN/../../nvidia/cusparse/lib
$ORIGIN/../../cusparselt/lib
$ORIGIN/../../nvidia/nccl/lib
$ORIGIN/../../nvidia/nvtx/lib
$ORIGIN
$ORIGIN/libFor CUDA builds, the PyPI wheels require the torch package to be installed in the site-packages directory:
$ python3 -c 'import torch'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/PanXuehai/Projects/pytorch/torch/__init__.py", line 378, in <module>
from torch._C import * # noqa: F403
^^^^^^^^^^^^^^^^^^^^^^
ImportError: libcudnn.so.9: cannot open shared object file: No such file or directorypytorch/.ci/manywheel/build_cuda.sh
Lines 178 to 195 in 5deca07
| echo "Using nvidia libs from pypi." | |
| CUDA_RPATHS=( | |
| '$ORIGIN/../../nvidia/cublas/lib' | |
| '$ORIGIN/../../nvidia/cuda_cupti/lib' | |
| '$ORIGIN/../../nvidia/cuda_nvrtc/lib' | |
| '$ORIGIN/../../nvidia/cuda_runtime/lib' | |
| '$ORIGIN/../../nvidia/cudnn/lib' | |
| '$ORIGIN/../../nvidia/cufft/lib' | |
| '$ORIGIN/../../nvidia/curand/lib' | |
| '$ORIGIN/../../nvidia/cusolver/lib' | |
| '$ORIGIN/../../nvidia/cusparse/lib' | |
| '$ORIGIN/../../cusparselt/lib' | |
| '$ORIGIN/../../nvidia/nccl/lib' | |
| '$ORIGIN/../../nvidia/nvtx/lib' | |
| ) | |
| CUDA_RPATHS=$(IFS=: ; echo "${CUDA_RPATHS[*]}") | |
| export C_SO_RPATH=$CUDA_RPATHS':$ORIGIN:$ORIGIN/lib' | |
| export LIB_SO_RPATH=$CUDA_RPATHS':$ORIGIN' |
pytorch/.ci/manywheel/build_xpu.sh
Lines 90 to 95 in 5deca07
| echo "Using xpu runtime libs from pypi." | |
| XPU_RPATHS=( | |
| '$ORIGIN/../../../..' | |
| ) | |
| XPU_RPATHS=$(IFS=: ; echo "${XPU_RPATHS[*]}") | |
| export C_SO_RPATH=$XPU_RPATHS':$ORIGIN:$ORIGIN/lib' |
Maybe related:
Versions
nightly
Metadata
Metadata
Assignees
Labels
module: binariesAnything related to official binaries that we release to usersAnything related to official binaries that we release to userstopic: binariestopic: buildtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module