Open 69Vishal opened 3 years ago
Hi, this only seems to be a warning, not an error. So the program should continue. Does it raise an Error later?
thats the only thing it shows :(
You need to install pytorch. If you're using anaconda, run "conda install pytorch torchvision -c pytorch"
I'm not running it on anaconda, I'm just using terminal ;-;
@69Vishal Try and see if you have a CUDA device available for pytorch to use. Open up a Python terminal and try this, or run the one liner further down.
import torch
x = torch.cuda.get_device_name(0) if torch.cuda.is_available() else None
print(x)
One liner:
python -c "import torch; x = (torch.cuda.get_device_name(0) if torch.cuda.is_available() else None); print(x)"
This is the output for my Windows workstation for reference.
> python -c "import torch; x = (torch.cuda.get_device_name(0) if torch.cuda.is_available() else None); print(x)"
NVIDIA GeForce RTX 2070
If you have a CUDA device available it should print the name of it, otherwise pytorch isn't seeing it. Depending on your OS there are special drivers that are not part of the standard packages you need to install to have the CUDA support.
You can learn more by looking up your device name and "cuda drivers," in my case I'd google "RTX 2070 CUDA drivers."
Lol, I fucked up, I got no Cuda device available!
The issue in my case was due to my machine's CUDA Toolkit having version 10.1 but my pytorch installation CUDA toolkit was 11.3, Installing pytorch with cuda 10.1 solved the issue
@adiv5 How do you find out the pytotch cuda version?,
I know how to find out machine cuda toolkit version(nvidia-smi)