I installed pytorch 0.5 using the setup.py following the official guide.
My system has cuda 9.2 installed and it is included into my bash env by setting
LD_LIBRARY_PATH and PATH like described in the CUDA installation guide from nvidia.
NOTE: I upgraded from CUDA 8.0 to CUDA 9.2. The files of CUDA 8.0 are not deleted but
my bash env does not export any of CUDA 8.0 related directories:
(pyt_gh) chofer@eisbaer:~$ env | grep cuda
However, after compilation I get an import error:
>>> import torch Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/scratch2/chofer/opt/anaconda3/envs/pyt_gh/lib/python3.6/site-packages/torch/__init__.py", line 78, in <module> from torch._C import * ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory
LD_LIBRARY_PATH resolves the problems.
**It seems to me that pytorch 0.5 links against two CUDA versions, i.e., 8.0 + 9.2, is this a bug? **
(It would mean that one has to have installed both versions in order for pytorch to run)
Is this just happening because the cuda 8.0 directories are not deleted?
May be related to https://github.com/pytorch/pytorch/issues/1941
My Modification of the installation routine:
- I installed into a virtual env created by conda (env_name = pyt_gh)
conda install -c pytorch magma-cuda91