2
votes

I am tring to use gdb to trace Tensorflow operation kernel implementation with Eigen SYCL support. However, when I try to install the .whl package, some error messages about fglrx pop up.

Error message

Compiling /tmp/pip-1vfYDJ-build/tensorflow-1.0.1.data/purelib/tensorflow/contrib/cudnn_rnn/ops/gen_cudnn_rnn_ops.py ...
  File "/tmp/pip-1vfYDJ-build/tensorflow-1.0.1.data/purelib/tensorflow/contrib/cudnn_rnn/ops/gen_cudnn_rnn_ops.py", line 1
    Error: Fail to load fglrx kernel module!
             ^
SyntaxError: invalid syntax ....

Configuration

Command

Here are commands I used according to the tutorial.

https://www.codeplay.com/portal/03-30-17-setting-up-tensorflow-with-opencl-using-sycl

  • configuration

    Please specify the location of python. [Default is /usr/local/bin/python]: 
    Please specify optimization flags to use during compilation [Default is -march=native]: 
    Do you wish to use jemalloc as the malloc implementation? (Linux only) [Y/n] 
    jemalloc enabled on Linux
    Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] 
    No Google Cloud Platform support will be enabled for TensorFlow
    Do you wish to build TensorFlow with Hadoop File System support? [y/N] 
    No Hadoop File System support will be enabled for TensorFlow
    Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] 
    No XLA support will be enabled for TensorFlow
    Found possible Python library paths: /usr/local/lib/python2.7/dist-packages
    /usr/lib/python2.7/dist-packages
    Please input the desired Python library path to use.  Default is [/usr/local/lib/python2.7/dist-packages]
    Using python library path: /usr/local/lib/python2.7/dist-packages
    Do you wish to build TensorFlow with OpenCL support? [y/N] y
    OpenCL support will be enabled for TensorFlow
    Do you wish to build TensorFlow with CUDA support? [y/N] 
    No CUDA support will be enabled for TensorFlow
    Please specify which C++ compiler should be used as the host C++ compiler. [Default is /usr/bin/clang++-3.6]: 
    Please specify which C compiler should be used as the host C compiler. [Default is /usr/bin/clang-3.6]: 
    
  • bazel build:

bazel build -c dbg --config=sycl //tensorflow/tools/pip_package:build_pip_package

  • build pip package:

bazel-bin/tensorflow/tools/pip_package/build_pip_package

  • install pip package

sudo pip install: /tmp/tensorflow_pkg/tensorflow-1.0.1-cp27-none-linux_x86_64.whl

Please help me in resolving the issues.

2

2 Answers

1
votes

The SYCL variant currently requires a platform that supports SPIR or SPIRV, like Intel or AMD. NVIDIA platform does not currently support neither.

1
votes

You can't (currently) use SYCL with TensorFlow on Intel GPUs. However, it is coming soon. There are a few fixes you will need and then it will work correctly. You will need to wait for a new Intel OpenCL GPU driver and then for a few compatibility commits to TensorFlow before it will work on Intel GPU. You may also want to wait a little longer for some performance improvements, because we have been focusing more on correctness, first, with performance coming a little later.