我在我的Linux服务器上运行一个深度学习程序,突然收到了这个错误。
UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at /opt/conda/conda-bld/pytorch_1603729096996/work/c10/cuda/CUDAFunctions.cpp:100.)
早些时候,当我刚刚创建这个conda环境时,torch.cuda.is_available()
返回了true
,我可以使用CUDA和GPU。但是突然间我不能使用CUDA了,torch.cuda.is_available()
返回了false
。我该怎么办?
ps。我使用GeForce RTX3080和CUDA11.0+pytorch1.7.0。它以前是有效的,但现在不行了。
发布于 2021-02-26 19:38:03
我刚试过重启。问题解决了。原来这是由NVIDIA NVML驱动程序/库版本不匹配造成的。
https://stackoverflow.com/questions/66371130
复制相似问题