Open watertianyi opened 1 year ago
After upgrading the graphics card driver, the above tensorflow-gpu can be used, but the following results appear when running the code:
2023-03-17 18:08:02.767249: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcublas.so.12 2023-03-17 18:08:03.411129: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudnn.so.8 2023-03-17 18:08:03.897246: E tensorflow/stream_executor/cuda/cuda_dnn.cc:367] Loaded runtime CuDNN library: 8.6.0 but source was compiled with: 8.7.0. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later 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. 2023-03-17 18:08:03.898479: E tensorflow/stream_executor/cuda/cuda_dnn.cc:367] Loaded runtime CuDNN library: 8.6.0 but source was compiled with: 8.7.0. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later 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. 2023-03-17 18:08:03.898792: E tensorflow/stream_executor/cuda/cuda_dnn.cc:367] Loaded runtime CuDNN library: 8.6.0 but source was compiled with: 8.7.0. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later 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. 2023-03-17 18:08:03.899075: E tensorflow/stream_executor/cuda/cuda_dnn.cc:367] Loaded runtime CuDNN library: 8.6.0 but source was compiled with: 8.7.0. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later 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. Traceback (most recent call last): File "/home/h/.local/lib/python3.8/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/h/.local/lib/python3.8/site-packages/tensorflow_core/python/client/session.py", line 1349, in _run_fn return self._call_tf_sessionrun(options, feed_dict, fetch_list, File "/home/h/.local/lib/python3.8/site-packages/tensorflow_core/python/client/session.py", line 1441, in _call_tf_sessionrun return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict, tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found. (0) Unknown: Failed to get convolution execution plan. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [[{{node generator/G_MODEL/A/Conv/Conv2D}}]] [[add_16/_883]] (1) Unknown: Failed to get convolution execution plan. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [[{{node generator/G_MODEL/A/Conv/Conv2D}}]]
the same problem
As the error notes:
Loaded runtime CuDNN library: 8.6.0 but source was compiled with: 8.7.0. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later 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.
Have you tried upgrading your installed cuDNN version to 8.7 or newer?
I found a solution to the problem. You need to download a specific version of tensorflow for drivers. Or update nvidia drivers.
I followed the first path. Go to the website and look for the tensorflow build version for our driver and the cuda version https://docs.nvidia.com/deeplearning/frameworks/tensorflow-wheel-release-notes/tf-wheel-rel.html
Then install the new version using pip install nvidia-tensorflow==1.15.5+nv{your new version of tensorflow}
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
NVIDIA GeForce RTX 3060 conda create -n tf15 python=3.8 conda activate tf15 pip install nvidia-pyindex pip install nvidia-tensorflow[horovod]
Python 3.8.16 (default, Mar 2 2023, 03:21:46) [GCC 11.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.