Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why was Eigen chosen for TensorFlow? [closed]

The TensorFlow white paper mentions that Eigen is used. Are there public explanations for how Eigen was chosen, and are they motivation for using Eigen in TensorFlow C++ op kernels?

like image 217
Noah Smith Avatar asked Jan 07 '17 06:01

Noah Smith


People also ask

Does Tensorflow use Eigen?

tensorflow uses the Tensor module of Eigen (which is mostly maintained by the main author of tensorflow).

Is Eigen open source?

Eigen is open-source software licensed under the Mozilla Public License 2.0 since version 3.1.

How do I check Eigen version?

On Debian or similar: cat /usr/include/eigen3/Eigen/src/Core/util/Macros. h | grep VERSION will show you the version.


1 Answers

I think that one of the key feature that drove the use of Eigen in the first place is because Eigen features its own highly optimized matrix product kernels whereas all other competitors have to be linked to some BLAS libraries. Moreover, the code of Eigen's product kernel is C++ with easy access to low-level internal kernels, so it was 'easy' for them to tweak and extend it to match their needs. This way Google has been able to develop the Tensor module with high CPU performance in a pure header-only fashion. The support for CUDA and now OpenCL via SyCL came later, those are not intrinsic features of Eigen that drove the initial choice.

like image 91
ggael Avatar answered Oct 05 '22 23:10

ggael