CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at /opt/conda/conda-bld/pytorch_1702400366987/work/c10/cuda/CUDAFunctions.cpp:108.)
RuntimeError: CUDA error: CUDA-capable device(s) is/are busy or unavailable
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
环境ubuntu 22.04系统,显卡驱动Driver Version: 535.171.04 CUDA Version: 12.2 ,cuda-toolkit版本520.61.05,为cuda 11.8,安装cuda 后,使用torch.cuda.is_available() 报上述错误,按照参考资料1的提示,安装了sudo apt install nvidia-modprobe,问题依旧,这个问题是系统刚开机时好用,过一段时间后就会报错
最后按照参考资料4里彻底卸载cuda然后重新安装cuda,再从参考资料2里下载cuda-samples,按照参考资料3的提示进行安装完毕后的测试,发现测试通过,但后续还会出现这样问题,即

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

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



