让 Torch 识别 GPU
Getting Torch to recognize GPU
如何让 Torch 识别您视频卡上的 CUDA?
我有一个 Nvidia GeForce GT 1030 运行 Ubuntu 18.04,它声称 support CUDA,但当我第一次用它测试 Torch 时 运行:
virtualenv -p python3.7 .env
. .env/bin/activate
pip install torch
python -c "import torch; print(torch.cuda.is_available())"
它返回 False 以及警告:
The NVIDIA driver on your system is too old (found version 9010).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
所以我 运行 所有系统更新并使用 Ubuntu 的专有驱动程序安装程序为我的卡安装最新的 Nvidia-435 驱动程序。
然而,torch.cuda.is_available()
仍然returns错误,但现在它没有给我任何警告。
是我错误配置了 Torch 还是我的 GPU 不支持 CUDA?
是的,我检查过这个 link GT 1030 不兼容。
没关系。我说得太快了。切换驱动程序后我没有重新启动,显然这破坏了 nvidia-smi 和加载 CUDA 驱动程序的其他一些东西。重启后,Torch 现在可以识别 CUDA 10.1 支持。
如何让 Torch 识别您视频卡上的 CUDA?
我有一个 Nvidia GeForce GT 1030 运行 Ubuntu 18.04,它声称 support CUDA,但当我第一次用它测试 Torch 时 运行:
virtualenv -p python3.7 .env
. .env/bin/activate
pip install torch
python -c "import torch; print(torch.cuda.is_available())"
它返回 False 以及警告:
The NVIDIA driver on your system is too old (found version 9010).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
所以我 运行 所有系统更新并使用 Ubuntu 的专有驱动程序安装程序为我的卡安装最新的 Nvidia-435 驱动程序。
然而,torch.cuda.is_available()
仍然returns错误,但现在它没有给我任何警告。
是我错误配置了 Torch 还是我的 GPU 不支持 CUDA?
是的,我检查过这个 link GT 1030 不兼容。
没关系。我说得太快了。切换驱动程序后我没有重新启动,显然这破坏了 nvidia-smi 和加载 CUDA 驱动程序的其他一些东西。重启后,Torch 现在可以识别 CUDA 10.1 支持。