python-2.7 - cudaGetDevice() 失败。状态 : CUDA driver version is insufficient for CUDA runtime version

标签 python-2.7 tensorflow cuda

当我在 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


tensorflow.python.framework.errors_impl.InternalError: 无法创建 session .

这样我的版本:

tensorflow 是:1.10
cat /proc/driver/nvidia/version

NVRM 版本:NVIDIA UNIX x86_64 内核模块 390.77 Tue Jul 10 18:28:52 PDT 2018

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

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

版权所有 (c) 2005-2016 NVIDIA Corporation

基于 Sun_Sep__4_22:14:01_CDT_2016

Cuda编译工具,发布8.0,V8.0.44

最佳答案

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

您可以检查您的 cuda 工具包兼容性 here .然后通过从 here 下载来更新您的 nvidia 驱动程序.

关于python-2.7 - cudaGetDevice() 失败。状态 : CUDA driver version is insufficient for CUDA runtime version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52346957/

相关文章:

python - 通过 Python Flask 从一个 HTML 输入中获取多个值

c++ - Tensorflow 服务 : Large model, protobuf 错误

python - get_variable 的自定义初始值设定项

c++ - CUDA 使用 CMake 在 x86 中卡住构建

c++ - 如何在下一个内核中从一个cuda内核访问一个类

c++ - e的计算验证

python - 有什么方法可以用列表理解来转换这个 for 循环?

python - 如何根据另一列的 NaN 值在 pandas 数据框中设置值?

python - 用值填充张量中的特定索引

c++ - 使用 cuda 从 RGBA 图像中分离 channel (无法显示完整图像)