解决CUDA error: no kernel image is available for execution on the device

The cuda version of the installed PyTorch is too low. If the hardware cuda version is 116, the software cuda version needs to be at least 113, otherwise an error will be reported.

Version installation link: https://pytorch.org/get-started/previous-versions/
You can choose to install:pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

Guess you like

Origin blog.csdn.net/qq_15821487/article/details/130510017