Go to file
Deven Desai 1a96d49afe Changing the Eigen::half implementation for HIP
Currently, when compiling with HIP, Eigen::half is derived from the `__half_raw` struct that is defined within the hip_fp16.h header file. This is true for both the "host" compile phase and the "device" compile phase. This was causing a very hard to detect bug in the ROCm TensorFlow build.

In the ROCm Tensorflow build,
* files that do not contain ant GPU code get compiled via gcc, and
* files that contnain GPU code get compiled via hipcc.

In certain case, we have a function that is defined in a file that is compiled by hipcc, and is called in a file that is compiled by gcc. If such a function had Eigen::half has a "pass-by-value" argument, its value was getting corrupted, when received by the function.

The reason for this seems to be that for the gcc compile, Eigen::half is derived from a `__half_raw` struct that has `uint16_t` as the data-store, and for hipcc the `__half_raw` implementation uses `_Float16` as the data store. There is some ABI incompatibility between gcc / hipcc (which is essentially latest clang), which results in the Eigen::half value (which is correct at the call-site) getting randomly corrupted when passed to the function.

Changing the Eigen::half argument to be "pass by reference" seems to workaround the error.

In order to fix it such that we do not run into it again in TF, this commit changes the Eigne::half implementation to use the same `__half_raw` implementation as the non-GPU compile, during host compile phase of the hipcc compile.
2021-03-05 19:27:13 +00:00
bench Eliminate CMake FindPackageHandleStandardArgs warnings. 2021-02-24 09:52:05 +00:00
blas Replace language_support module with builtin CheckLanguage 2021-01-27 13:26:40 +00:00
ci Deactive CI for Power due to problems with GitLab runner 2021-03-04 17:33:40 +01:00
cmake Eliminate CMake FindPackageHandleStandardArgs warnings. 2021-02-24 09:52:05 +00:00
debug MIsc. source and comment typos 2018-03-11 10:01:44 -04:00
demos Make file formatting comply with POSIX and Unix standards 2020-03-23 18:09:02 +00:00
doc Define EIGEN_CPLUSPLUS and replace most __cplusplus checks. 2021-03-05 18:33:18 +00:00
Eigen Changing the Eigen::half implementation for HIP 2021-03-05 19:27:13 +00:00
failtest Make file formatting comply with POSIX and Unix standards 2020-03-23 18:09:02 +00:00
lapack Replace language_support module with builtin CheckLanguage 2021-01-27 13:26:40 +00:00
scripts Replace calls to "hg" by calls to "git" 2019-12-04 11:24:06 +01:00
test Define EIGEN_CPLUSPLUS and replace most __cplusplus checks. 2021-03-05 18:33:18 +00:00
unsupported Define EIGEN_CPLUSPLUS and replace most __cplusplus checks. 2021-03-05 18:33:18 +00:00
.gitignore New CI infrastructure, including AArch64 runners 2020-09-11 18:11:49 +00:00
.gitlab-ci.yml New CI infrastructure, including AArch64 runners 2020-09-11 18:11:49 +00:00
.hgeol
CMakeLists.txt Remove code checking for CMake < 3.5 2020-12-14 09:57:44 +00:00
COPYING.APACHE Add Apache 2.0 license text in COPYING.APACHE. 2020-06-18 12:45:27 -07:00
COPYING.BSD Make file formatting comply with POSIX and Unix standards 2020-03-23 18:09:02 +00:00
COPYING.GPL
COPYING.LGPL
COPYING.MINPACK Make file formatting comply with POSIX and Unix standards 2020-03-23 18:09:02 +00:00
COPYING.MPL2
COPYING.README
CTestConfig.cmake STYLE: Convert CMake-language commands to lower case 2019-10-31 11:36:37 -05:00
CTestCustom.cmake.in Allow to filter out build-error messages 2018-07-24 20:12:49 +02:00
eigen3.pc.in
INSTALL
README.md Update old links to bitbucket to point to gitlab.com 2019-12-04 10:57:07 +01:00
signature_of_eigen3_matrix_library

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.