Please have a look at the following screenshot:
I had a conda env named ai
with a working cuda-enabled pytorch installation:
>>> torch.cuda.is_available()
True
Just before the last command I ran conda update --all
(for env ai
, but in another shell). From the messages I see that the cpu
pytorch versions got installed:
...
pytorch-1.12.1 |cpu_py39h5e1f01c_0 80.6 MB
...
torchvision-0.13.1 |cpu_py39h378ed51_0 6.1 MB
...
As you can see, after the update, CUDA is no longer available:
(ai) F:\2022-12>python
Python 3.9.15 (main, Nov 24 2022, 14:39:17) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
False
>>>
I had to re-install pytorch using the conda instruction on the official website. Now CUDA is detected again.
Is this behaviour normal? How am I supposed to update the packages in an environment?
PS. This is a new installation on a new machine. I noticed that import torch
is incredibly slow wrt to the (less powerful) old PC.