hughperkins / tf-coriander

OpenCL 1.2 implementation for Tensorflow
Apache License 2.0
791 stars 90 forks source link

Tensorflow can't read GPU #19

Closed Whytehorse closed 7 years ago

Whytehorse commented 7 years ago

If I run a command to show me the gpus, I get the following error: Commands:

python3
import tensorflow as tf
# Creates a graph.
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)

Error:

CommandLine Error:
Option 'enable-value-profiling' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

It's on Ubuntu 16.04 using the pip3 install of the downloaded wheel.

hughperkins commented 7 years ago

I've never seen this error. Sorry :-( . The code looks like it should work. I might build an up to date wheel, and ask you if the problem still exists for you.

Whytehorse commented 7 years ago

We narrowed it down to a lack of support for Opencl 1.2+ in amd drivers. Please close this.

hughperkins commented 7 years ago

Opencl 1.2 should be supported by amd GPUs. What makes you feel that opencl 1.2 is not supported by AMD GPUs?

On 10 May 2017 05:56:46 GMT-04:00, Whytehorse notifications@github.com wrote:

We narrowed it down to a lack of support for Opencl 1.2+ in amd drivers. Please close this.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/hughperkins/tensorflow-cl/issues/19#issuecomment-300434700

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Whytehorse commented 7 years ago

Linus rejected the proprietary drivers(fglrx) from AMD and the open source driver(amdgpu) doesn't support opencl1.2+. I filed a bug for amdgpu. https://bugs.launchpad.net/ubuntu/+source/kde-baseapps/+bug/1659706 The drivers that AMD provides (amdgpu-pro) for Ubuntu 16.04 don't support my gpu. I filed a bug with AMD.

So basically I'll never buy AMD products ever again and tell thousands of people not to buy AMD and I'm really put off by tensorflow's product lock-in to nvidia, although this opencl branch is a move in the right direction. I'm also put off by the amdgpu devs for not updating to opencl1.2+... it seems like it would be really trivial to update the code and push it out...

hughperkins commented 7 years ago

Hi Whytehorse, dont suppose... do you mind confirming the exact model of GPU you have please?

Whytehorse commented 7 years ago

AMD A10-7850K

hughperkins commented 7 years ago

Thanks!

hughperkins commented 7 years ago

From the support page, looks like the drivers support Ubuntu 14.04, but not 16.04, is that approximately what you are saying? http://support.amd.com/en-us/download/desktop?os=Ubuntu%20x86%2064

Whytehorse commented 7 years ago

Yes

hughperkins commented 7 years ago

Ah. That's unfortunate :-( . So, what will you do?

Whytehorse commented 7 years ago

I'm getting all the other people affected to grab their pitchforks and torches and storm the ivory towers of AMD, drag their rulers out into the streets, and chop off their head... or something like that

Whytehorse commented 7 years ago

Or maybe we'll just use some NSA hacking tools to steal their source code, leak it, blame Russia... you know, the usual

hughperkins commented 7 years ago

Haha :-)

Ok, you mean, if they opensourced the old unsupported drivers, you'd feel less uncomfortable with their no longer supporting them?

VincentSC commented 7 years ago

Use at your own risk: https://bbs.archlinux.org/viewtopic.php?id=57084&p=295 - should make your GCN 1.1 GPU work with AMDGPU-PRO.

Whytehorse commented 7 years ago

I dunno. My options are to nag AMDdevs+FOSSdevs and wait... or downgrade to 14.04. I think it might be easier to add opencl 1.2 support to whatever package than to do that archlinux hack.

hughperkins commented 7 years ago

Ok. As far as your decision, I cant really provide any advice on that point: only you can make that decision really, though it's clearly not an ideal decision to have to make.

As far as tensorflow-cl itself, I dont know of any particular reason why it wouldnt work on Ubuntu 14.04. I dont personally test on 14.04, but given the above issue, happy to help out with any Ubuntu 14.04 issues that arise. You might need to dig a little bit on the install/build process initially. I think the 16.04 wheel might install ok-ish on 14.04?

Whytehorse commented 7 years ago

I'm too busy to reinstall my OS right now, plus I need a lot of the newer software in 16.04. Guess I'll just wait :(

hughperkins commented 7 years ago

Alright. Fair enough :-)