PyTorch可支持的CUDA版本以及对应的安装命令
CUDA可下载包
先安装CUDA然后再用PyTorch命令安装torch(不知道反过来能否成功)
检测CUDA当前版本号
nvcc -V
检测是否已成功安装对应的Torch和CUDA
import torch
print("torch.cuda.is_available() =", torch.cuda.is_available())
结果应该是:
torch.cuda.is_available() = TRUE
先安装CUDA然后再用PyTorch命令安装torch(不知道反过来能否成功)
nvcc -V
import torch
print("torch.cuda.is_available() =", torch.cuda.is_available())
结果应该是:
torch.cuda.is_available() = TRUE