2

I installed Tensorflow with GPU support and want to check it if I really installed it properly.
I tried simple check provided by Tensorflow which says:

$ python
...
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42

it produced the same results. However I faced many errors during the installation and solved them somehow. Is it really enough to make sure that I can go on and use Tensorflow? Thank you

Thomas
  • 6,223

2 Answers2

4

To check if you're using the gpu with tensorflow, run the following on a python console:

import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

and it'll dump a verbose description of your gpu

Amith KK
  • 13,412
0

Here are requirements from NVIDIA for using NVIDIA GPU with tensorflow:

The GPU-enabled version of TensorFlow has the following requirements:

64-bit Linux

Python 2.7

NVIDIA CUDA® 7.5 (CUDA 8.0 required for Pascal GPUs)

NVIDIA cuDNN v4.0 (minimum) or v5.1 (recommended)

You will also need an NVIDIA GPU supporting computer capability 3.0 or higher.

See more at: www.nvidia.com/object/gpu-accelerated-applications-tensorflow-installation.html#sthash.eaN8w5me.dpuf

..from http://www.nvidia.com/object/gpu-accelerated-applications-tensorflow-installation.html

In an earlier question, you stated your system has an NVIDIA GeForce GTX 980M: Need a solution to a blinking screen

Manufacturer specs show "CUDA: yes" ( from geforce.com/hardware/notebook-gpus/geforce-gtx-980m/specifications ).

"Yes" is not a number. Chances are there was only one number when the card was made ie "1".

The only way to know for sure if the GPU option is compatible with your system is to try. However, the outcome is not in your favor. CPU may be your only stable option.

best wishes