Search code examples
tensorflowgoogle-colaboratoryobject-detectionobject-detection-apicudnn

Google Colab Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0


While training with Tensorflow 2 Object Detection API in Google Collab, I get the following errors:

2022-03-07 15:27:51.475298: E tensorflow/stream_executor/cuda/cuda_dnn.cc:359] Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0.  CuDNN library needs to have matching major version and equal or higher minor version. If using a binary install, upgrade your CuDNN library.  If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.
2022-03-07 15:27:51.477142: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at conv_ops.cc:1120 : UNKNOWN: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.

I have tried updating my CuDNN library in Google collab, using this StackOverflow answer: Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0. when using google colab. However, this does not solve the issue.

I am using Tensorflow 2.7.0.


Solution

  • The following is a workaround for the problem, as posted on the official Github

    This may not work always and may not be safe, but as a workaround for the time being, you may try running !apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2