benoitsteiner / tensorflow-opencl

OpenCL support for TensorFlow
Apache License 2.0
472 stars 86 forks source link

Issue with running Tensorflow with OpenCL - Ubuntu 14.04.3 (Trusty) - AMD R5 Radeon M335 GPU #66

Open rahasayantan opened 7 years ago

rahasayantan commented 7 years ago

System information

I have compiled CPP programs, they work fine.

-- Python: I am using Anaconda distribution Python for 2.7.2. (Anaconda - 2.4.3)

Describe the problem

I have compile tensorflow, and deployed the same -> No issues here. when I try to run the code I run into the following error:

2017-04-23 14:01:15.180795: W ./tensorflow/core/common_runtime/sycl/sycl_util.h:44] No OpenCL GPU found that is supported by ComputeCpp, trying OpenCL CPU 2017-04-23 14:01:15.180843: F ./tensorflow/core/common_runtime/sycl/sycl_util.h:53] No OpenCL GPU nor CPU found that is supported by ComputeCpp Aborted (core dumped)

I have attached the code file. Please note this is a simplified version of the file. The logic is:

  1. Read data from files,
  2. Pass it through a NN I am using Keras as the Functional programming API on top of Tensorflow.

tensorflow-code-throwing-error.txt Please let me know if there are any fixes or if I can do something to get round this issue. Thanks and regards Sayantan

rahasayantan commented 7 years ago

More details: Output of Computecpp_info:


ComputeCpp Info (CE 0.1.1)


Toolchain information:

GLIBCXX: 20150426 This version of libstdc++ is supported.


Device Info:

Discovered 1 devices matching: platform : device type :


Device 0:

Device is supported : NO - Vendor is supported, device not CL_DEVICE_NAME : Hainan CL_DEVICE_VENDOR : Advanced Micro Devices, Inc. CL_DRIVER_VERSION : 1800.11 (VM) CL_DEVICE_TYPE : CL_DEVICE_TYPE_GPU




I dont think Compute cpp supports Hainan AMD GPU. Not sure if this is a tensorflow issues at all. If possible please advice how, of at all, can I proceed with this issue.

Regards

rahasayantan commented 7 years ago

Further updates: I upgraded ComputeCPP to 0.1.4 version. But I still have the same error. Please advise.

Regards Sayantan

Zakor94 commented 7 years ago

Hello @rahasayantan,

It is indeed an issue with computecpp so you could probably have more help here: https://github.com/lukeiwanski/tensorflow

Just a quick question though did you install ocl-icd-opencl-dev opencl-headers? Also the issue may come from your kernel version as this page advises to downgrade to 3.19: http://deep-beta.co.uk/setting-up-tensorflow-with-opencl-using-sycl/

rahasayantan commented 7 years ago

@Zakor I did install ocl-icd-opencl-dev opencl-headers. I will see if I find any help on the sites you shared. Thanks for your help.

Regards Sayantan

thornhale commented 7 years ago

@rahasayantan : Could you share performance numbers in relation to pip-only tensorflow and optimized tensorflow? I am interested to see how much more performant tensorflow-opencl is with a beefier dGPU. Thank you ahead of time! For my iGPU, since all computation was shifted from CPU to the tiny iGPU, it turned out to be less performant. But there is hope for you :-)

rahasayantan commented 7 years ago

@thornhale: Currently the Tensorflow on GPU I have is crashing because of Device unsupported error. Raised an issue on Tensorflow Git. They have asked me to wait till the latest merge is complete and then I need to recompile and retest. I will let you know my findings once I have GPU setup and working.

Regards Sayantan

rahasayantan commented 7 years ago

Updates: I downloaded the latest version from https://github.com/lukeiwanski/tensorflow-opencl. This one gives coredump. There are challenges installing from tensorflow's main git repo and there seems to be issues on compiling protobuf.

p4vook commented 3 years ago

@rahasayantan do you have any updates on this?