CUDA error: no kernel image is available for execution on the device解决办法 cuda版本11.7

这个问题是由于CUDA版本与torch版本不匹配导致的

解决方案:

1.查看CUDA版本

nvidia-smi

2.卸载pytorch

pip uninstall torch

pip uninstall torchaudio

pip uninstall torchvision

3.登录pytorch官网根据cuda版本查找对应的安装命令

https://pytorch.org/get-started/locally/

我的cuda版本是11.7,对应的安装命令如下

pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu117

4.等待安装

最终安装的pytorch版本是1.13,原来是1.8

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
张周阳子
张周阳子

4 篇文章

作家榜 »

  1. 解弘艺 17 文章
  2. 高曾谊 16 文章
  3. 胡中天 14 文章
  4. 旺仔牛奶opo 14 文章
  5. LH 14 文章
  6. 罗柏荣 13 文章
  7. Panda-admin 13 文章
  8. 林晨 12 文章