failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error

created at 08-19-2021 views: 20

Problem

It was fine before, and I restarted the computer to run the program and reported this error:

failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
retrieving CUDA diagnositic information for host: ...

Then it started running with the slow and slow CPU.

environment

  • Ubuntu 20.04
  • TensorFlow 2.5
  • cudatoolkit 11.2
  • cudnn 8.1

solve

The high probability is that the graphics card driver has something to do with it.

Because I just happened to automatically update the system (Ubuntu) before, maybe some files of nvidia or something were moved. Then I restarted and it didn't work.

Then I opened the Software Updator to complete the update, restarted, and it was done.

created at:08-19-2021
edited at: 08-19-2021: