问题描述
RuntimeError: CUDA error: no kernel image is available for execution on the device
cuda 12.0 需要使用torch1.7.1。
pip install torch1.7.1
pip install torch1.7.0
pip install torch
包括从https://download.pytorch.org/whl/torch_stable.html下载wheel本地安装
死活都报错,一气之下跑去问gpt,然后居然就不报错了!!!!!!!!!!!!!!!!!
解决方案:
把对应的torchvision、torchaudio装了
pip install torch1.7.1+cu110 torchvision0.8.2+cu110 torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html