| commit | 17268b155d54422f1294130c0fb8c178757d911a | [log] [tgz] |
|---|---|---|
| author | Antonio Sanchez <cantonios@google.com> | Tue Nov 17 15:32:44 2020 -0800 |
| committer | Antonio Sánchez <cantonios@google.com> | Wed Nov 18 20:32:35 2020 +0000 |
| tree | 2be3d541729f3e9be6a180a58270bae10156df4f | |
| parent | 41d5d5334b8a4e364dfd88dcd91f6cd38834b8ed [diff] |
Add bit_cast for half/bfloat to/from uint16_t, fix TensorRandom The existing `TensorRandom.h` implementation makes the assumption that `half` (`bfloat16`) has a `uint16_t` member `x` (`value`), which is not always true. This currently fails on arm64, where `x` has type `__fp16`. Added `bit_cast` specializations to allow casting to/from `uint16_t` for both `half` and `bfloat16`. Also added tests in `half_float`, `bfloat16_float`, and `cxx11_tensor_random` to catch these errors in the future.
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
For more information go to http://eigen.tuxfamily.org/.
For pull request, bug reports, and feature requests, go to https://gitlab.com/libeigen/eigen.