Bringing OpenCL support to TensorFlow

618 views
Skip to first unread message

Rod Burns

unread,
Feb 15, 2017, 9:54:05 AM2/15/17
to Discuss
We've been working for a while on bringing OpenCL support to TensorFlow to enable a wider range of options for accelerating both training and inference. We've posted an update here, it would be great to hear what you think and from anyone who wants to contribute to the efforts.

https://www.codeplay.com/portal/02-14-17-bringing-the-acceleration-of-opencl-to-tensorflow-with-sycl

M Edward Borasky

unread,
Oct 1, 2017, 4:22:57 AM10/1/17
to Discuss


On Wednesday, February 15, 2017 at 6:54:05 AM UTC-8, Rod Burns wrote:
We've been working for a while on bringing OpenCL support to TensorFlow to enable a wider range of options for accelerating both training and inference. We've posted an update here, it would be great to hear what you think and from anyone who wants to contribute to the efforts.

https://www.codeplay.com/portal/02-14-17-bringing-the-acceleration-of-opencl-to-tensorflow-with-sycl

I have an AMD "Bonaire" GPU on a Linux workstation (currently Arch Linux). I recently got interested in Deep Learning and TensorFlow and want to test TensorFlow on the Bonaire using OpenCL.

There is virtually no documentation that I could find - I only discovered the OpenCL option when building TensorFlow from source about two days ago. Is there some test script I can run to verify that TensorFlow can access the OpenCL GPU? I have clpeak and clinfo and they both talk to the GPU. 

Toby Boyd

unread,
Oct 2, 2017, 12:30:50 PM10/2/17
to M Edward Borasky, Discuss
OpenCL is not well supported.  I prefer to bring good news rather than bad news but in this case you are better off training on CPU or getting an NVIDIA based card, e.g. GTX 1080 or even a 1070.  The 980s are also useful but they are often priced similar to newer cards and only have 4GB of memory.  With the new relationship between Baidu and AMD there might be hope for better support but I would suspect that would start with the latest generation of cards and might be months maybe even a year away.  

For perspective.  NVIDIA owns CUDA and cuDNN and they often contribute the key the integration to TensorFlow and do a large amount of performance testing.  Intel owns the MKL-DNN integration with TensorFlow.  In a long way, what I am saying is that the TensorFlow core team would help (and does) with hardware implementations but does not actively build the integrations in most cases.  

If you decided to do some CPU based training or "playing" check out my CPU guide so you get the best performance possible from your CPU.  Compling from source for your CPU could increase throughput by 4x+.  

Toby

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/4cce0b0a-d430-451f-a7ba-44f08ea1e552%40tensorflow.org.

M. Edward (Ed) Borasky

unread,
Oct 2, 2017, 3:12:29 PM10/2/17
to Discuss
I agree - OpenCL is not well-supported. But there *are* people working with AMD GPUs and the code exists. It's a matter of getting clean documentation and functioning demos now, not coding a bunch of stuff from scratch. Moreover, nearly every other major deep learning Python package supports OpenCL.

P.S.: Monopolies suck ;-).

To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.

--
How many people can stand on the shoulders of a giant before the giant collapses?
Reply all
Reply to author
Forward
0 new messages