I noticed that PyTorch couldn’t find the CUDA installation after upgrading to CUDA 9.1 and checking via torch.cuda.is_available(). However, when I downgraded to CUDA 9.0 it worked all fine though. For the pip installer, on the PyTorch page, I noticed that it says “cu90”:
I am just wondering if this really is just a “path” issue regarding CUDA 9.1 or if this intended by design (e.g., breaking changes). Not that I need CUDA 9.1, I am just wondering if this is done on purpose, i.e., that the installer only specifically supports CUDA 9.0 and not the consequent patch version (assuming NVIDIA uses semantic versioning)
Thanks for the answer! I had a little misconception when I asked this question. I didn’t know that PyTorch (the binary installers via conda and pip wheels) already ship the necessary CUDA and cuDNN parts.
For some reason, PyTorch did not detect cuda via “torch.cuda.is_available” first. When I tried with a fresh OS install (via Amazon AWS EC2), I noticed that even though I had the correct NVIDIA drivers for the given graphics card installed, it wouldn’t work. What fixed the problem was downloading CUDA 9.0 and running the installer without installing CUDA itself (during the installation, it asks you to install the NVIDIA display driver, which I answered with “yes” and the CUDA 9.0 toolkit, which I answered with “no”). After installing the graphics card drivers through the CUDA installer, it all worked fine (even without CUDA installed as PyTorch already comes with it).
I have been using pytorch 0.3 with CUDA 9.1 for a few weeks now on ubuntu 16.04 and non-anaconda - just using the tensorflow-gpu-py3 docker image with nvidia-docker and it works fine.
Also this is a non-anaconda install - just used pip and the cu90 installer.
Hm, are you installing it via pip wheels or source code? Because as far as I understood, PyTorch would be using it’s own CUDA parts when you do the regular pip install (i.e., wheels; pip3 install http://download.pytorch.org/whl/cu90/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl ). So, my understanding is that even if you have locally CUDA 9.1 installed, it would be using the CUDA 9.0 parts that it comes with. Based on
conda binary has its own cuda, it doesn’t use system CUDA at all.
(There’s probably no way to tell which CUDA version PyTorch is using via the Python interpreter?)
Hi @jrzaurin
I am doing a new installation and I have the same Cuda version that you showed above; Cuda compilation tools, release 9.1, V9.1.85, same Ubuntu and Python.
However, I am thinking to pick Cuda 9.2 from the PyTorch installation options, something like:
It says CUDA 8.0, but my system does not have CUDA 8.0 at all (I have cuda 9.0 and cuda 9.1)?
And I checked the source file, /usr/local/lib/python3.5/dist-packages/torch/version.py, it has a line cuda = ‘8.0.61’.