存在问题
4090 无法支持旧版本的cuda跳error:
RuntimeError: CuDA error: no kernel image is available for execution on the device
NVIDIA GeForce RTX 4090 with CUDA capability sm_89 is not compatible with the current PyTorch installation.
解决方法
参考程序员行者孙的方法:
解决办法
- 查看显卡算力
CUDA GPUs - Compute Capability | NVIDIA Developer
找到你的显卡对应算力,如4090对应8.9
- 算力对应的cuda版本
NVIDIA Datacenter Drivers :: NVIDIA Data Center GPU Driver Documentation
对应8.9是cuda11.8,只能高不能低。
- 最后安装需求重新下载torch,具体命令可以参考Previous Pytorch
pip uninstall torch
conda install pytorch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 pytorch-cuda=11.8 -c pytorch -c nvidia