Zlatan Sičanica Zlatan Sičanica - 16 days ago 8
Python Question

Running tensorflow on GPU with fglrx driver

I'm not sure if this question belongs here or on tensorflow troubleshoot or on askubuntu, but I'll start here. I'm having problems with running tensorflow on my GPU, e.g. the following code:

import tensorflow as tf;

with tf.device('/gpu:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
# Creates a session with log_device_placement set to True.
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
# Runs the op.
print sess.run(c)


gives output:
Device mapping: no known devices.

There are no errors when I change the string in with statement with 'cpu:0'. I have a AMD Radeon HD 6650M GPU, running on Linux Mint 17.3, with fglrx-updates driver installed (the open-source one didn't work, the laptop would keep starting in software rendering mode when xserver-xorg-ati was selected). Could the error happen because tensorflow can't use the fglrx driver? Can this be fixed? Is there anyone out there, using fglrx driver on tensorflow without this issue? Any information is helpful.

Answer

Unfortunately, currently tensorflow only supports NVIDIA GPUs that support CUDA.

You can follow the issue, tracking the effort to support open-source OpenCL.

Comments