CUDA driver version is insufficient for CUDA runtime version

在运行基于tensorflow-gpu的python程序的时候,出现了如下的问题:

CUDA driver version is insufficient for CUDA runtime version

(1) Internal: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version;

(2)tensorflow.python.framework.errors_impl.InternalError: Failed to create session.

解决方法:

(1)查看了一下自己的tensorflow(GPU版本)的版本是1.7.0,tensorflow 1.7需要CUDA 9.0+, 而我用的服务器(系统:Ubuntu)上装的是CUDA 8.0 +;

(2)解决的方法有两个,一个是降低tensorflow的版本(<tensorflow 1.4);另一个是将CUDA升级到9.0+。