0

I'm a tensorflow beginner. When I run the test.py. There is an error:

2018-05-13 10:00:03.012495: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2018-05-13 10:00:03.312772: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1344] Found device 0 with properties: 
name: TITAN Xp major: 6 minor: 1 memoryClockRate(GHz): 1.911
pciBusID: 0000:05:00.0
totalMemory: 11.90GiB freeMemory: 11.58GiB
2018-05-13 10:00:03.591350: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1344] Found device 1 with properties: 
name: TITAN Xp major: 6 minor: 1 memoryClockRate(GHz): 1.911
pciBusID: 0000:06:00.0
totalMemory: 11.90GiB freeMemory: 11.74GiB
2018-05-13 10:00:03.862648: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1344] Found device 2 with properties: 
name: TITAN Xp major: 6 minor: 1 memoryClockRate(GHz): 1.911
pciBusID: 0000:09:00.0
totalMemory: 11.90GiB freeMemory: 11.74GiB
2018-05-13 10:00:04.117984: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1344] Found device 3 with properties: 
name: TITAN Xp major: 6 minor: 1 memoryClockRate(GHz): 1.911
pciBusID: 0000:0a:00.0
totalMemory: 11.90GiB freeMemory: 11.74GiB
2018-05-13 10:00:04.123222: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1423] Adding visible gpu devices: 0, 1, 2, 3
2018-05-13 10:00:04.123350: E tensorflow/core/common_runtime/direct_session.cc:167] Internal: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    sess = tf.Session()
  File "/home/zhe/anaconda3/envs/tf_env/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1509, in __init__
super(Session, self).__init__(target, graph, config=config)
  File "/home/zhe/anaconda3/envs/tf_env/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 638, in __init__
self._session = tf_session.TF_NewDeprecatedSession(opts, status)
  File "/home/zhe/anaconda3/envs/tf_env/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 516, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InternalError: Failed to create session.

tensorflow-gpu version 1.7.0

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

test.py:

import tensorflow as tf
import os
#os.environ["CUDA_VISIBLE_DEVICES"]="3"
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

My lab colleague didn't have this problem. I tried to use the commented line of code, but it didn't work, and it was the same error.

Thanks for your help!

1 Answer 1

1

The problem is specified in this line of your error message:

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

You need to update the CUDA driver. Alternatively, just reinstall the whole CUDA toolkit.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.