Hello, Im trying to use pytorch with GPU in my ubuntu 18.04. The GPU is a GeForce GTX 1070
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
I installed pytorch using:
pip install torch torchvision torchaudio
PyTorch Version: 1.8.0
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
If I try to get the GPU, I get the following:
>>> import torch
Can anyone advice me please
Did the logs show that the CUDA runtime was also installed?
If so, what does
Note that the binaries ship with their own CUDA runtime (as well as cudnn, NCCL etc.), so your local CUDA toolkit won’t be used unless you build PyTorch from source or any custom CUDA extension.
I would say use anaconda enovirement and install torch using conda .
Look out for command like
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
you can see the command in https://pytorch.org/
conda command will install all CUDA libraries required.
Now if you still don’t want to use anaconda then you have to check for PyTorch version compatibility with installed system CUDA.
I can see your command is compatible with CUDA 10.2
but you have CUDA 11.2 installed.
i don’t know compatible PyTorch version of CUDA 11.2
I would suggest use anaconda, it will save lot of time.
Hey, thanks for your reply. Using conda solved my problems!!
Thanks for your reply. Problem solved