最近一直在研究python+cuda实现的机器学习,发现了一些好玩的问题。
例如某程序在3080可以跑,但是A40不行。还会报错
NVIDIA RTX A40 with CUDA capability sm_86 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.
翻遍了各种网站,论坛,都说什么更新驱动啊,之类的。
但是实际上呢,从上面的
current PyTorch installation
这段可以看出,其实是python模块torch的问题。
由于服务器不能联网,下载了无数的cuda版本及无数个驱动版本,都不行。。。
后来终于发现,原来torch也有cuda专用的版本。。
网上给出的方案都是
conda install ****
或者
pip install *** -i 某某源
其实都需要联网,于是想着能不能下载下来具体的包,然后离线pip呢。
努力到最后,终于找到了对应的包,包名如下:
torch-1.13.0.dev20220815+cu116-cp38-cp38-linux_x86_64.whl
解释如下:
torch:模块名
1.13.0:版本号
dev20220815:编译时间
+cu116:支持cuda11.6版本的驱动
cp38:支持python3.8版本
linux:linux版本的模块
x86_64:64位的程序
whl:不解释,python模块通用后缀
以后找适配的模块就简单多了!~~~~~日常记录,请勿吐槽
网友留言: