cudaGetDevice() 失败。状态:CUDA 驱动程序版本不足以满足 CUDA 运行时版本

2024-03-25

当我在 GPU 中运行 TensorFlow 时,出现以下错误。

2018-09-15 18:56:51.011724: E tensorflow/core/common_runtime/direct_session.cc:158] Internal: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version
Traceback (most recent call last):
  File "evaluate_sample.py", line 160, in <module>
    tf.app.run(main)
  File "/anaconda3/envs/tf/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "evaluate_sample.py", line 123, in main
    with tf.Session() as sess:
  File "/anaconda3/envs/tf/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1494, in __init__
    super(Session, self).__init__(target, graph, config=config)
  File "/anaconda3/envs/tf/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 626, in __init__
    self._session = tf_session.TF_NewSession(self._graph._c_graph, opts)
tensorflow.python.framework.errors_impl.InternalError: Failed to create session.

下面的错误从何而来?

E tensorflow/core/common_runtime/direct_session.cc:158] Internal: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version

and tensorflow.python.framework.errors_impl.InternalError:无法创建会话.

这样我的版本:

张量流是:1.10

cat /proc/driver/nvidia/version

NVRM 版本:NVIDIA UNIX x86_64 内核模块 390.77 2018 年 7 月 10 日星期二 18:28:52 PDT

GCC版本:gcc版本7.3.0(Debian 7.3.0-28)

nvcc --version

nvcc:NVIDIA (R) Cuda 编译器驱动程序

版权所有 (c) 2005-2016 NVIDIA 公司

建于 Sun_Sep__4_22:14:01_CDT_2016

Cuda编译工具,版本8.0,V8.0.44


更新 nvidia 驱动程序解决了这个问题。

您可以检查您的cuda工具包兼容性here https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver。然后通过下载更新您的 nvidia 驱动程序here https://www.nvidia.in/Download/index.aspx?lang=en-in.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

cudaGetDevice() 失败。状态:CUDA 驱动程序版本不足以满足 CUDA 运行时版本 的相关文章

随机推荐