I think this is an Anacanda.Navigator question not a programming question since the same code does not run the same in all environments.
Problem is running in jupyter-lab from Navigator Environments the GPU is not detected by CUDA. The program is simple:
import torch
print(torch.cuda.is_available()) ←—- shows true
if (torch.cuda.is_available()):
print(“\r\n********* YAY: GPU IS AVAILABLE *************”)
print (f"Number of GPUS is -should be 1-: {torch.cuda.device_count()}" )
print(f"Current GPU name is: {torch.cuda.get_device_name(0)}\r\n")
else:
print(“\n\rGPU is NOT NOT NOT Available\r\n”) < show NOT NOT NOT Available
All other environments runs this fine:
- GPU is detected if I just set the environment in a Command Windows then run jupyter-lab
- GPU is detected in Spyder under Command Window
- GPU is detected running Spyder from anaconda.Navigator
Since cuda detects the GPU in spyder when run from Anaconda Navigator I believe that says all the modules are loaded and correct. And if I don’t use anaconda, just do a conda -env and then run jupyter-lab it works, also says the modules are loaded sufficiently.
I want to use Navigator since it is the easiest for me. Obviously, there is something I was suppose to set and didn’t. What is it?
Thanks in advance.