failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error

Question

It was good before. After restarting the computer running program, this error is reported:

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

Then it runs with the old slow CPU.

environment

Ubuntu 20.04TensorFlow 2.5cudatoolkit 11.2cudnn 8.1

solve

The probability is that the graphics card driver is stained with something.

Because I happened to update the system (Ubuntu) automatically before, I probably moved some NVIDIA files or something. Then I can’t restart.

Then I opened the Software Updater, completely updated it, restarted it, and finished it.

Read More: