
更新版本:
pip uninstall torch torchvision torchaudio -y
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
#https://pytorch.org/get-started/locally/
验证:
安装好之后可以试试是否安装成功
python -c "import torch; print(torch.__version__); print(torch.version.cuda)"
#2.9.0.dev20250729+cu128
#12.8
确认 GPU 是否能被 PyTorch 识别,有类似输出就大功告成啦。
python -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0))"
#True
#NVIDIA GeForce RTX 5060 Ti
但会导致vllm版本与pytorch版本不适配
原因见:https://github.com/xorbitsai/inference/issues/3866
NVIDIA RTX PRO 6000 Blackwell Workstation Edition with CUDA capability sm_120 is not compatible with the current PyTorch installation. #3866
NVIDIA RTX PRO 6000 Blackwell Workstation Edition with CUDA sm_120 与当前的 PyTorch 安装不兼容。 #3866
links
https://blog.csdn.net/m0_62596826/article/details/149807782
907

被折叠的 条评论
为什么被折叠?



