From 9091351dbea903103869fe60e2962cf2a7ae03c8 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 11 May 2016 15:22:13 -0700 Subject: [PATCH] __ldg is only available with cuda architectures >= 3.5 --- Eigen/src/Core/arch/CUDA/PacketMathHalf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h index baaf15003..1b32d20aa 100644 --- a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +++ b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h @@ -72,7 +72,7 @@ template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pstoreu(half* to, co template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE half2 ploadt_ro(const half* from) { -#if __CUDA_ARCH__ >= 320 +#if __CUDA_ARCH__ >= 350 return __ldg((const half2*)from); #else return __halves2half2(*(from+0), *(from+1)); @@ -81,7 +81,7 @@ template<> template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE half2 ploadt_ro(const half* from) { -#if __CUDA_ARCH__ >= 320 +#if __CUDA_ARCH__ >= 350 return __halves2half2(__ldg(from+0), __ldg(from+1)); #else return __halves2half2(*(from+0), *(from+1));