aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/GPU
diff options
context:
space:
mode:
authorGravatar Deven Desai <deven.desai.amd@gmail.com>2019-05-24 14:25:32 +0000
committerGravatar Deven Desai <deven.desai.amd@gmail.com>2019-05-24 14:25:32 +0000
commit2c389301610a0c60a5760fec7a362803a680ff60 (patch)
tree7f84f094d4b9e309208083da9f0f72871ed68f09 /Eigen/src/Core/arch/GPU
parent56bc4974fbb90263a3f0cf609f166b9458188822 (diff)
fix for HIP build errors that were introduced by a commit earlier this week
Diffstat (limited to 'Eigen/src/Core/arch/GPU')
-rw-r--r--Eigen/src/Core/arch/GPU/Half.h2
-rw-r--r--Eigen/src/Core/arch/GPU/PacketMathHalf.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/GPU/Half.h b/Eigen/src/Core/arch/GPU/Half.h
index 7f1d7e5b8..5affe8b92 100644
--- a/Eigen/src/Core/arch/GPU/Half.h
+++ b/Eigen/src/Core/arch/GPU/Half.h
@@ -318,7 +318,7 @@ EIGEN_STRONG_INLINE __device__ bool operator >= (const half& a, const half& b) {
// We need to provide emulated *host-side* FP16 operators for clang.
#pragma push_macro("EIGEN_DEVICE_FUNC")
#undef EIGEN_DEVICE_FUNC
-#if defined(EIGEN_HAS_CUDA_FP16)
+#if defined(EIGEN_HAS_GPU_FP16)
#define EIGEN_DEVICE_FUNC __host__
#else // both host and device need emulated ops.
#define EIGEN_DEVICE_FUNC __host__ __device__
diff --git a/Eigen/src/Core/arch/GPU/PacketMathHalf.h b/Eigen/src/Core/arch/GPU/PacketMathHalf.h
index 3da8c1f3e..723506c8b 100644
--- a/Eigen/src/Core/arch/GPU/PacketMathHalf.h
+++ b/Eigen/src/Core/arch/GPU/PacketMathHalf.h
@@ -46,7 +46,7 @@ template<> struct packet_traits<Eigen::half> : default_packet_traits
template<> struct unpacket_traits<half2> { typedef Eigen::half type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef half2 half; };
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pset1<half2>(const Eigen::half& from) {
-#if !defined(EIGEN_CUDA_ARCH)
+#if !defined(EIGEN_CUDA_ARCH) && !defined(EIGEN_HIP_DEVICE_COMPILE)
half2 r;
r.x = from;
r.y = from;