This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1590 - No way to control half-float definitions
Summary: No way to control half-float definitions
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Interoperability (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-27 16:20 UTC by Jake Kesinger
Modified: 2019-12-04 17:53 UTC (History)
5 users (show)



Attachments

Description Jake Kesinger 2018-08-27 16:20:32 UTC
We're trying to compile Eigen on a platform whose system headers have #define'd "FP32" for its own use, which means the "union FP32" in src/Core/arch/CUDA/Half.h causes compilation errors.  I went looking for flags to control the inclusion of this, and was not able to.  What worked for us is to add an #ifdef guard around some include statements in Eigen/Core:

diff --git a/Eigen/Core b/Eigen/Core
index c74340b..7846877 100644
--- a/Eigen/Core
+++ b/Eigen/Core
@@ -432,10 +432,12 @@ using std::ptrdiff_t;
   #include "src/Core/arch/ZVector/Complex.h"
 #endif
 
+#if defined EIGEN_CUDACC
 // Half float support
 #include "src/Core/arch/CUDA/Half.h"
 #include "src/Core/arch/CUDA/PacketMathHalf.h"
 #include "src/Core/arch/CUDA/TypeCasting.h"
+#endif
 
 #if defined EIGEN_VECTORIZE_CUDA
   #include "src/Core/arch/CUDA/PacketMath.h"
-- 
 
Thank you.
Comment 1 Gael Guennebaud 2018-08-28 11:22:21 UTC
I renamed it in default and 3.3 branches:

https://bitbucket.org/eigen/eigen/commits/4cf582860c16/
https://bitbucket.org/eigen/eigen/commits/5d81ad9778d8/
Comment 2 Jake Kesinger 2018-08-28 13:37:10 UTC
Thanks!
Comment 3 Nobody 2019-12-04 17:53:08 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1590.

Note You need to log in before you can comment on or make changes to this bug.