Google-colaboratory: No backend with GPU available

Sören picture Sören · Jan 29, 2018 · Viewed 40.5k times · Source

Here it is described how to use gpu with google-colaboratory:

Simply select "GPU" in the Accelerator drop-down in Notebook Settings (either through the Edit menu or the command palette at cmd/ctrl-shift-P).

However, when I select gpu in Notebook Settings I get a popup saying:

Failed to assign a backend No backend with GPU available. Would you like to use a runtime with no accelerator?

When I run:

import tensorflow as tf
device_name = tf.test.gpu_device_name()
if device_name != '/device:GPU:0':
    raise SystemError('GPU device not found')
print('Found GPU at: {}'.format(device_name))

Of course, I get GPU device not found. It seems the description is incomplete. Any ideas what needs to be done?

Answer

Eric picture Eric · Feb 5, 2018

You need to configure the Notebook with GPU device

Click Edit->notebook settings->hardware accelerator->GPU