Why `torch.cuda.is_available()` returns False even after installing pytorch with cuda?

后端 未结 2 1356
暖寄归人
暖寄归人 2020-11-30 10:32

On a Windows 10 PC with an NVidia GeForce 820M I installed CUDA 9.2 and cudnn 7.1 successfully, and then installed PyTorch using the instructions at pytorch.org.

Sp

2条回答
  •  攒了一身酷
    2020-11-30 11:21

    The same error can appear when the version of your Pytorch supports different CUDA. For example, my Pytorch version was with CUDA 8.0 support, but I had CUDA 9.0 installed. To fix that I had to upgrade my Pytorch to cu90 like this:

    pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cu90/torch_nightly.html
    

    Reference: here

提交回复
热议问题