TensorFlow™ is an artificial intelligence framework that can be used for executing machine learning algorithms. While a computation expressed using TensorFlow can be executed across heterogeneous systems, support has so far been limited to NVIDIA ® processors using CUDA ® . In order to enable developers to access a wider range of processors, we are working to bring support for OpenCL™ devices to the TensorFlow framework using SYCL™. OpenCL is a framework for writing programs that execute across heterogeneous platforms, and SYCL is a royalty-free, cross-platform C++ abstraction layer that builds on the underlying concepts, portability and efficiency of OpenCL, while adding the ease-of-use and flexibility of modern C++ 14.
ComputeCpp™ is Codeplay's implementation of SYCL and currently offers support for AMD and Intel processors that support OpenCL 1.2 with SPIR™, with plans to add more in the future (particularly as the demand for machine learning applications on embedded and mobile devices grows).
TensorFlow can be used to build deep neural networks capable of machine learning, and these networks rely heavily on linear algebra where matrix calculations are key to building up predictions based on the input data set.
In addition to enabling parallelization of the Eigen libraries on OpenCL devices, we are also supporting the most common TensorFlow operations such as basic math functions. A full list of what is implemented and what is yet to be done is available on the shared Google Doc.
Parallelization is also important from a processing and power management perspective. Since tensors are n-dimensional vectors, having access to parallelization of your TensorFlow code is important not just at the training stage, but also when performing inference on new data sets and this could well be happening on embedded hardware with low power requirements.
Our implementation is still experimental and not yet complete, but we are making some great progress.
If you want to try out ComputeCpp CE, our implementation of SYCL, with TensorFlow to make use of OpenCL devices you can now build the TensorFlow project with the OpenCL option turned on. Full instructions are available in the project documentation.
We are also looking for collaborators who can help to work on the project to bring the power of OpenCL devices to TensorFlow, you can email us at
You'll also find me at the TensorFlow Dev Summit in Mountain View, California on February 15th if you want to talk more about how we are bringing OpenCL to TensorFlow.