I am new to using python and PyTorch, I am trying to make some arts using Deep Daze and Big Sleep however, and getting errors saying Cuda is not available even after reinstalling Cuda and Nvidia drivers.
Depending on the way you’ve installed PyTorch, either your local CUDA toolkit (if you’ve built PyTorch from source) or the shipped CUDA runtime will be used (if you’ve installed the conda binaries or pip wheels).
I’m not familiar with the “Deep Daze” and “Big Sleep” implementations and don’t know, if custom CUDA extensions are used. If so, then you would also need a working local CUDA toolkit in order to be able to compile it.
In any way, are you able to use the GPU in a PyTorch-only script?
I’m really new to using python and everything so how would I go about testing if I can use my gpu in a PyTorch Script? I use anaconda so would I have to create a new instance with only the PyTorch script and run some sort of test?
Thanks for your help so far!
You could run:
import torch x = torch.randn(1).cuda() print(x)
If this code snippet is showing a random tensor on a
cuda device, your environment looks alright.
Also, if that’s the case, we would need to get more information about the error you are seeing.
Could you post the complete stack trace here, please?
Ok I’m not sure if I am doing something wrong however anaconda does not recognize import as a command, I will post the error I have been getting
I have exactly the same problem, i hope someone knows the fix
Hey dark, I figured out how to solve my issue and I hope it works for you, I found a stack overflow post with the same problem as me “linux - Pytorch says that CUDA is not available - Stack Overflow” and it recommended going to the PyTorch website and installing a specific version of pytorch using their install command generator or whatever, let me know if that doesn’t work.
pip install deep-daze
I have the exact problem ? found a solution ?