RTX5060Ti的pytorch安装,解决如下

发现在开发TTS过程中,无法利用GPU加速,经检查报错如下:

python -c "import torch; print(torch.version.cuda); print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0))"
12.1
True
C:\Users\honey\miniconda3\envs\torch121\lib\site-packages\torch\cuda\__init__.py:235: UserWarning:
NVIDIA GeForce RTX 5060 Ti with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5060 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(
NVIDIA GeForce RTX 5060 Ti

(torch121)

解决过程如下:

下载最新的CUDA Toolkit 12.9

https://developer.nvidia.com/cuda-toolkit


下载成功后如下目录所示。CUDA的工具包有3G以上,而对应的驱动程序也才800M大小。