1. 问题描述
今天跑实验的时候,代码报错:
RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'
感觉有点莫名奇妙,经检索,发现将fp16改为fp32可以解决我的问题,但是运行速度太慢了。后来发现,是系统内核自动升级,导致显卡驱动与内核驱动不匹配。验证是否是该问题,可在命令行输入nvidia-smi来验证,若出现:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
即是内核版本自动升级导致的(是不是也有可能是显卡驱动升级的问题)。
2. 解决方案:回退系统内核版本
我用的系统版本是Ubuntu20.04
2.1 查看当前系统内核
uname -a

2.2 查看系统现存的内核版本
grep menuentry /boot/grub/gru

最低0.47元/天 解锁文章
1万+

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



