Problems of Pytorch installation on Ubuntu 17.10 (GPU)
I would like to use PyTorch and its GPU computations on my computer.

I have a computer running with Ubuntu 17.10. The computer (Alienware m17x) has two graphic cards:


An integrated Intel Ivybridge Mobile
A Nvidia Geforce 675M.


In order to install PyTorch, I followed the instructions on the PyTorch website pytorch.org

1) I installed CUDA 9 with the deb file: https://developer.nvidia.com/cuda-downloads

=&gt; Linux/x86_64/Ubuntu/17.04/deb (local)


2) I installed Pytorch using the conda command line: conda install pytorch torchvision cuda90 -c pytorch

None of these two steps returned me any type of errors. 

I restarted my computer. Apparently the two cards are detected:

$ lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core    processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF114M [GeForce GTX 675M] (rev a1)


But apparently there is something wrong with the drivers or CUDA itself. nvidia-detector does not return me anything:

$ nvidia-detector 
none


And pytorch can not use cuda:

[1]: import torch
In [2]: torch.cuda.is_available()
Out[2]: False


Could you help me? I can provide additional informations if necessary, but I am not sure what could be relevant.

You do not need to install cuda to use a GPU with pytorch, if you install pytorch like this: pytorch binaries include all the necessary cuda libraries. 

Therefore it also does not matter which cuda version flavour you choose when installing pytorch. Usually one will probably want the latest version, but in cases where an old GPU needs to get used, the pytorch binary that comes with the older cuda version may be the only one still supporting that GPU.

If no GPU is detected then this is probably not related to the CUDA library but to your kernel driver. Make sure that your system has the latest tested NVIDIA proprietary kernel driver installed.

What is maybe a bit confusing is that one can install pytorch binaries with cuda support on any system, including one without a GPU or with a GPU but without the system driver installed. This works fine until you try to actually use the GPU and invoke .cuda() 
