Automated g4 rollback of changelist 320674736.

*** Reason for rollback ***

This change moves the CPU implementation and definition of bfloat16 to Eigen. Intel provided a vectorized implementation for AVX512 (AVX / AVX2 version is in review).

This PR/CL makes the necessary changes to use the new Eigen version (which was mostly copied verbatim from TensorFlow) in google3.

Remove bfloat16.cc and get rid of injection of methods for bfloat16 into namespace std, which caused an ambiguous dependent name lookup error on Windows. Standard numerical utilities for Eigen types are in namespace Eigen::numext. For standard types like float, this usually forwards to std:: or the equivalent C99 function (e.g. for CUDA).

Consequently, a few call sites had to be updated, e.g., to call Eigen::numext::isnan instead of std::isnan.

*** Original change description ***

Automated g4 rollback of changelist 320645237.

*** Reason for rollback ***

Breaks at least on Windows due to ADL

```
T:\tmp\nsz6drem\execroot\org_tensorflow\external\eigen_archive\Eigen\src/Core/MathFunctions.h(1360): error C2668: 'std::sqrt': ambiguous call to overloaded function

.\tensorflow/core/lib/bfloat16/bfloat16.h(54): note: could be 'tensorflow::bfloat16 std::sqrt(const tensorflow::bfloat16 &)'

T:\tmp\nsz6drem\execroot\org_tensorflow\external\eigen_archive\Eigen\src/Core/arch/Defau...

***

BEGIN_PUBLIC
PR #40962: [INTEL MKL] Replace tensorflow::bfloat16 with Eigen::bfloat16

Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/40962

This PR mainly changes tensorflow::bfloat16 to Eigen::bfloat16 to get benefit from its vectorization
Copybara import of the project:

--
3451f21c1e243f262b24b85205b3d19504419b09 by ShengYang1 <yang.sheng@intel.com>:

Replace tensorflow::bfloat16 with Eigen::bfloat16

END_PUBLIC

PiperOrigin-RevId: 321267626
1 file changed