Utilizar GPU con Torch
Hay que instalar CUDA con
cuda_12.0.0_windows_network
También
nsight_visual_studio_edition-windows-x86_64-2022.4.0.22326_32103514
Y después se sigue esto:
If you've ever ran pip install torch without the -f https://download.pytorch.org/whl/torch_stable.html argument, chances are, you have the corrupt cpu only version in your pip cache. whatever reinstall you do, doesn't matter because pip will just pull the same bad version from cache. to solve:
pip uninstall torch
pip cache purge
pip install torch -f https://download.pytorch.org/whl/torch_stable.html
Se comprueba con:
(base) C:\Users\Jose>python
Python 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True
>>>
Comentarios
Publicar un comentario