tensorflow: tensorflow not working with RTX 3070 cuda 11.1+cudnn 8.0 and 11.2+cudnn 8.1

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

I have first installed cuda 11.1 and cudnn 8.0 but i was getting error could not find file libcusolver.so.10 to solve this i run command sudo ln -s /usr/local/cuda-11.1/lib64/libcusolver.so.11 /usr/local/cuda-11.1/lib64/libcusolver.so.10 error was resolved and showed message Successfully opened dynamic library libcusolver.so.10 but now i got another error shown below I also tried cuda 11.2 and cudnn 8.1 there with the same error could not find file libcusolver.so.10 i am getting error could not find libcudnn.so.8

Please help me i just re installed multiple cuda versions cudnn versions and nvidia drivers but could not resolve the issue

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
  • TensorFlow installed from (source or binary): pip install tensorflow-gpu
  • TensorFlow version (use command below): 2.4.1
  • Python version:3.8
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version: cuda 11.1 cudnn 8.0
  • GPU model and memory: RTX 3070

You can collect some of this information using our environment capture script You can also obtain the TensorFlow version with:

  1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
  2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior

2021-02-07 02:05:18.468688: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 x_train shape: (60000, 28, 28, 1) 60000 train samples 10000 test samples 2021-02-07 02:05:19.608268: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set 2021-02-07 02:05:19.608796: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1 2021-02-07 02:05:19.636743: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-02-07 02:05:19.637151: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties: pciBusID: 0000:01:00.0 name: Graphics Device computeCapability: 8.6 coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s 2021-02-07 02:05:19.637166: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 2021-02-07 02:05:19.638801: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11 2021-02-07 02:05:19.638838: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11 2021-02-07 02:05:19.639414: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10 2021-02-07 02:05:19.639618: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10 2021-02-07 02:05:19.835524: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10 2021-02-07 02:05:19.837327: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11 2021-02-07 02:05:19.837692: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8 2021-02-07 02:05:19.837958: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-02-07 02:05:19.839606: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-02-07 02:05:19.851728: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0 2021-02-07 02:05:19.852873: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2021-02-07 02:05:19.854566: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set 2021-02-07 02:05:19.854939: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-02-07 02:05:19.856558: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties: pciBusID: 0000:01:00.0 name: Graphics Device computeCapability: 8.6 coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s 2021-02-07 02:05:19.856623: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 2021-02-07 02:05:19.856695: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11 2021-02-07 02:05:19.856746: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11 2021-02-07 02:05:19.856795: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10 2021-02-07 02:05:19.856844: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10 2021-02-07 02:05:19.856893: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10 2021-02-07 02:05:19.856942: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11 2021-02-07 02:05:19.856991: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8 2021-02-07 02:05:19.857186: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-02-07 02:05:19.858869: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-02-07 02:05:19.860412: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0 2021-02-07 02:05:19.866190: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 2021-02-07 02:05:22.758155: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix: 2021-02-07 02:05:22.758203: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267] 0 2021-02-07 02:05:22.758221: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0: N 2021-02-07 02:05:22.758447: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-02-07 02:05:22.759222: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-02-07 02:05:22.759935: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-02-07 02:05:22.760605: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6864 MB memory) -> physical GPU (device: 0, name: Graphics Device, pci bus id: 0000:01:00.0, compute capability: 8.6) 2021-02-07 02:05:22.990187: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2) 2021-02-07 02:05:23.007092: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2899885000 Hz Epoch 1/12 2021-02-07 02:05:23.350598: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11 2021-02-07 02:05:27.235033: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11 2021-02-07 02:05:27.282436: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8 2021-02-07 02:05:29.037626: E tensorflow/stream_executor/cuda/cuda_dnn.cc:336] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR 2021-02-07 02:05:29.061028: E tensorflow/stream_executor/cuda/cuda_dnn.cc:336] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR Traceback (most recent call last): File “main.py”, line 63, in <module> validation_data=(x_test, y_test)) File “/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py”, line 1100, in fit tmp_logs = self.train_function(iterator) File “/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py”, line 828, in call result = self._call(*args, **kwds) File “/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py”, line 888, in _call return self._stateless_fn(*args, **kwds) File “/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py”, line 2943, in call filtered_flat_args, captured_inputs=graph_function.captured_inputs) # pylint: disable=protected-access File “/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py”, line 1919, in _call_flat ctx, args, cancellation_manager=cancellation_manager)) File “/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py”, line 560, in call ctx=ctx) File “/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/execute.py”, line 60, in quick_execute inputs, attrs, num_outputs) tensorflow.python.framework.errors_impl.UnknownError: 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. [[node sequential/conv2d/Conv2D (defined at main.py:63) ]] [Op:__inference_train_function_790]

Function call stack: train_function

Describe the expected behavior

Standalone code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/Jupyter/any notebook.

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 33 (3 by maintainers)

Most upvoted comments

Looking at the TF build docs I noticed that TF 2.4.0 is tested for compatibility with CUDA 11.0 and cuDNN 8.0 … so I downgraded to those versions and things went a lot smoother 😃
11.2 != 11.0 … What I learned:

  • stick to the versions of TF/CUDA/cuDNN mentioned in the docs … go beyond at your own risk 😃
  • ignore nvidia-smi when it comes to CUDA version … do this instead: nvcc --version | grep cuda

hey @game-sys FWIW I have TensorFlow running with cuda 11.0 + cudnn 8.0.4 installed via conda using the nvidia channel.

Perhaps cuda 11.1 would bring performance improvements, but if you’re blocked from working at all because of this, there are options. Cheers

Still issue is not solved waiting for your reply 😦