[报错] [TensorFlow] failed call to cuInit: CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE: forward compatib

报错信息

在使用 TensorFlow 2.2.0 版本跑程序的时候,发现 GPU 没有在工作,而是使用 CPU 在跑,结果发现如下报错:

2020-06-26 09:47:17.150572: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-06-26 09:47:17.152852: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE: forward compatibility was attempted on non supported HW
2020-06-26 09:47:17.152871: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: xovee-MS-7B48
2020-06-26 09:47:17.152876: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: xovee-MS-7B48
2020-06-26 09:47:17.152915: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:200] libcuda reported version is: 440.100.0
2020-06-26 09:47:17.152932: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:204] kernel reported version is: 440.64.0
2020-06-26 09:47:17.152936: E tensorflow/stream_executor/cuda/cuda_diagnostics.cc:313] kernel version 440.64.0 does not match DSO version 440.100.0 -- cannot find working devices in this configuration

环境

  • TensorFlow 2.0
  • Python 3.7
  • Cuda 10.1
  • Cudnn 7.6.5

解决之道

重启!

你可能感兴趣的:(报错,日常问题)