SOLVED: I had a global non-CUDA PyTorch installation that was interfering with the virtual environment. The key trick (suggested on StackOverflow) was to run torch.cuda.get_arch_list() - it returned an empty list, indicating the wrong torch was being picked up, in spite of being inside of the Anaconda environment!
I am facing a very similar issue, nvidia-smi outputs conda12.4, and I also ran torch.cuda.get_arch_list and got empty list. I would be very grateful if you can please help me debug this. Thank you
You need to make sure torch is coming from your Anaconda installation. It probably isn’t, such as was in my case. You can try troubleshooting further by finding out where Python is getting torch from:
import torch
print(torch. __ path __ )
If you’re getting something like [‘C:\Python310\lib\site-packages\torch’] then this is your problem - pip uninstall it and try again.
P.S. There should be no spaces next to the underscores but the editor decided to convert underscores to bold :(