Closed PandaBalls closed 2 years ago
Looks like you're using conda for your env. I expect this prints false for you:
import torch
print(torch.cuda.is_available())
If that's the case, you probably have a bad torch/cudatoolkit installation. In your conda env, run this:
conda install pytorch cudatoolkit=11.3 -c pytorch -y
This is assuming your cuda version is 11.3.
Then try again. I had to do the same on a new cloud machine last night, and after running the above, everything worked just fine.
hi, i'm having the same problem but i couldn't make it work with the solution you suggested (im using the VSCode notebook), i tried to run "conda install pytorch cudatoolkit=11.3 -c pytorch -y" in the terminal but it does not recognize the "conda" command, btw anaconda is the selected kernel in my notebook
i tried running the install in a powershell outside vscode and it worked but in the notebook it keeps saying "Torch not complied with CUDA enabled"
if im understanding correctly its because its a different enviroment but anyway i wanted to clear that
maybe this is a newbie error and i apologize for that
i tried not using anaconda and selecting python for the kernel but it keeps waiting for "the jupyter session to be inactive"