安装支持 SYCL 的 Tensorflow
Install Tensorflow with SYCL support
我正在尝试使用 gdb 来跟踪支持 Eigen SYCL 的 Tensorflow 操作内核实现。
但是,当我尝试安装 .whl
软件包时,会弹出一些关于 fglrx
的错误消息。
错误信息
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 ....
配置
- CPU:英特尔酷睿 i7-4790
- 显卡:GeForce GT 630/PCIe/SSE2
- OS: ubuntu 15.04
- Driver: Nvidia binary driver nvidia-352
命令
这是我根据教程使用的命令。
https://www.codeplay.com/portal/03-30-17-setting-up-tensorflow-with-opencl-using-sycl
配置
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 -c dbg --config=sycl
//tensorflow/tools/pip_package:build_pip_package
- 构建 pip 包:
bazel-bin/tensorflow/tools/pip_package/build_pip_package
- 安装 pip 包
sudo pip install:
/tmp/tensorflow_pkg/tensorflow-1.0.1-cp27-none-linux_x86_64.whl
请帮我解决问题。
SYCL 变体目前需要支持 SPIR 或 SPIRV 的平台,例如 Intel 或 AMD。 NVIDIA平台目前不支持。
您不能(目前)在 Intel GPU 上将 SYCL 与 TensorFlow 一起使用。但是,它很快就会到来。您需要进行一些修复,然后它才能正常工作。您将需要等待新的英特尔 OpenCL GPU 驱动程序,然后在 TensorFlow 上进行一些兼容性提交,然后它才能在英特尔 GPU 上运行。您可能还想再等一段时间才能获得一些性能改进,因为我们一直更关注正确性,首先,性能会稍晚一些。
我正在尝试使用 gdb 来跟踪支持 Eigen SYCL 的 Tensorflow 操作内核实现。
但是,当我尝试安装 .whl
软件包时,会弹出一些关于 fglrx
的错误消息。
错误信息
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 ....
配置
- CPU:英特尔酷睿 i7-4790
- 显卡:GeForce GT 630/PCIe/SSE2
- OS: ubuntu 15.04
- Driver: Nvidia binary driver nvidia-352
命令
这是我根据教程使用的命令。
https://www.codeplay.com/portal/03-30-17-setting-up-tensorflow-with-opencl-using-sycl
配置
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 -c dbg --config=sycl //tensorflow/tools/pip_package:build_pip_package
- 构建 pip 包:
bazel-bin/tensorflow/tools/pip_package/build_pip_package
- 安装 pip 包
sudo pip install: /tmp/tensorflow_pkg/tensorflow-1.0.1-cp27-none-linux_x86_64.whl
请帮我解决问题。
SYCL 变体目前需要支持 SPIR 或 SPIRV 的平台,例如 Intel 或 AMD。 NVIDIA平台目前不支持。
您不能(目前)在 Intel GPU 上将 SYCL 与 TensorFlow 一起使用。但是,它很快就会到来。您需要进行一些修复,然后它才能正常工作。您将需要等待新的英特尔 OpenCL GPU 驱动程序,然后在 TensorFlow 上进行一些兼容性提交,然后它才能在英特尔 GPU 上运行。您可能还想再等一段时间才能获得一些性能改进,因为我们一直更关注正确性,首先,性能会稍晚一些。