【问题标题】:Tensorflow GPU Check failed: stream‑>parent()‑>GetConvolveAlgorithmsTensorflow GPU 检查失败:stream->parent()->GetConvolveAlgorithms
【发布时间】:2022-03-04 12:07:44
【问题描述】:

我正在尝试使用带有 Tensorflow 后端的 Keras 训练我的 CNN 模型。

问题是,当我运行 fit_generator() 函数时,Spyder 中的 Python 内核崩溃了。为了添加一点上下文,我刚刚按照link 中的描述安装了 CUDA 和 tensorflow-gpu,以便我可以使用我的 GPU。在此之前,一切都很好。

这是完整的日志

启动内核时出错

2018???????? 20:44:44.791399: I C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2018???????? 20:44:45.084153: I C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1212] Found device 0 with properties: 
name: GeForce GTX 1050 major: 6 minor: 1 memoryClockRate(GHz): 1.493
pciBusID: 0000:01:00.0
totalMemory: 4.00GiB freeMemory: 3.30GiB
2018???????? 20:44:45.086132: I C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1312] Adding visible gpu devices: 0
2018???????? 20:44:45.906189: I C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:993] Creating TensorFlow device (/device:GPU:0 with 3033 MB memory) ‑> physical GPU (device: 0, name: GeForce GTX 1050, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018???????? 20:47:25.845646: I C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1312] Adding visible gpu devices: 0
2018???????? 20:47:25.846108: I C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:993] Creating TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 74 MB memory) ‑> physical GPU (device: 0, name: GeForce GTX 1050, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018???????? 20:47:26.499846: E C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\stream_executor\cuda\cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED
2018???????? 20:47:26.500247: E C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\stream_executor\cuda\cuda_dnn.cc:389] error retrieving driver version: Unimplemented: kernel reported driver version not implemented on Windows
2018???????? 20:47:26.500717: F C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\core\kernels\conv_ops.cc:717] Check failed: stream‑>parent()‑>GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo(), &algorithms) 
2018???????? 20:52:22.359428: E C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\stream_executor\cuda\cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED
2018???????? 20:52:22.359982: E C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\stream_executor\cuda\cuda_dnn.cc:389] error retrieving driver version: Unimplemented: kernel reported driver version not implemented on Windows
2018???????? 20:52:22.360678: F C:\tf_jenkins\workspace\rel‑win\M\windows‑gpu\PY\36\tensorflow\core\kernels\conv_ops.cc:717] Check failed: stream‑>parent()‑>GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo(), &algorithms) 

以前有人遇到过这个问题吗?

提前致谢

【问题讨论】:

    标签: python tensorflow


    【解决方案1】:

    我刚遇到同样的问题,发现了solution in a Github issue在安装 CUDA 9.0 之后,您需要更新您的 GPU 驱动程序,因为安装程序似乎正在将您恢复为旧驱动程序。他们还建议重新启动,但在我的情况下,这不是必需的。

    【讨论】:

    • 到底用什么方法更新驱动? .run 文件还是 .deb 包?
    • 我用的是deb包
    【解决方案2】:

    TL;DR) 升级您的 CUDA/CUDNN 安装。

    TensorFlow 的 CUDA/CUDNN 版本要求可能会随着新版本的发布而改变,并且您的 CUDA/CUDNN 版本很可能不兼容。由于 CUDA 和 CUDNN 版本,可能会发生这种情况。

    TF版本和CUDA/CUDNN版本兼容表如下:https://www.tensorflow.org/install/source#gpu

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-13
      • 1970-01-01
      • 2021-04-13
      • 1970-01-01
      • 1970-01-01
      • 2019-06-18
      相关资源
      最近更新 更多