CUDA、cuDNN 与 PyTorch 版本为什么不能只看一个号
CUDA、cuDNN 与 PyTorch 版本为什么不能只看一个号
难度:进阶。本文为中文技术整理,保留来源中的技术边界;示例只用于阅读,未在本服务器执行。
框架有编译时和运行时依赖。容器中的动态库、框架 wheel 和宿主机驱动共同决定结果;nvidia-smi 显示的 CUDA Version 不能单独证明 PyTorch 构建兼容。
示例
import torch
print(torch.version.cuda)
print(torch.cuda.get_device_name(0))
来源
- https://pytorch.org/get-started/locally/
CUDA、cuDNN 与 PyTorch 版本为什么不能只看一个号
https://blog.529808.xyz//archives/tech-9a251c5b4f44