| commit | db5691ff2b537ef003b192b5cbd871f0eb9309ba | [log] [tgz] |
|---|---|---|
| author | Antonio Sanchez <cantonios@google.com> | Fri Feb 19 08:52:31 2021 -0800 |
| committer | Rasmus Munk Larsen <rmlarsen@google.com> | Wed Feb 24 00:16:31 2021 +0000 |
| tree | 90c6b8faf224d63ea8b7f692ecb5b0bf789b95db | |
| parent | 88d4c6d4c870f53d129ab5f8b43e01812d9b500e [diff] |
Fix some CUDA warnings. Added `EIGEN_HAS_STD_HASH` macro, checking for C++11 support and not running on GPU. `std::hash<float>` is not a device function, so cannot be used by `std::hash<bfloat16>`. Removed `EIGEN_DEVICE_FUNC` and only define if `EIGEN_HAS_STD_HASH`. Same for `half`. Added `EIGEN_CUDA_HAS_FP16_ARITHMETIC` to improve readability, eliminate warnings about `EIGEN_CUDA_ARCH` not being defined. Replaced a couple C-style casts with `reinterpret_cast` for aligned loading of `half*` to `half2*`. This eliminates `-Wcast-align` warnings in clang. Although not ideal due to potential type aliasing, this is how CUDA handles these conversions internally.
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.