No GPU devices found

197 views
Skip to first unread message

Atilio Sbrana

unread,
Aug 29, 2018, 8:51:14 AM8/29/18
to google-dl-platform
Hi,

I've been using a Deep Learning VM image, and I noticed that I don't have GPU devices loaded in my Jupyter Lab.

When I use:
K.get_session().list_devices()

I get only the following:
[_DeviceAttributes(/job:localhost/replica:0/task:0/device:CPU:0, CPU, 268435456)]

And when I try to run the Tensorflow classical GPU test
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

I get the following:
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'MatMul': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.
	 [[Node: MatMul = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/device:GPU:0"](a, b)]]

How can I make sure that I'm running Tensorflow in a GPU?

Best,
Atilio

Viacheslav Kovalevskyi

unread,
Aug 29, 2018, 3:39:24 PM8/29/18
to google-dl-platform
Hi Atilio,

There might be that instance that you are using does not have GPU. How have you created the instance?

Can I ask you to run "nvidia-smi" tool in the terminal and paste the output here.

If you are using GCE OS list by default there is NO GPU attached to the instance and you need to specify GPU during the creation of the instance.
Reply all
Reply to author
Forward
0 new messages