From 7a0e96b80dc622e3802ec158a12c63b728d7fce9 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Tue, 1 Nov 2016 12:08:09 -0700 Subject: [PATCH] Gate the code that refers to cuda fp16 primitives more thoroughly --- Eigen/src/Core/arch/CUDA/PacketMathHalf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h index 9dd89e07f..de905bbf4 100644 --- a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +++ b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h @@ -15,7 +15,7 @@ namespace Eigen { namespace internal { // Most of the following operations require arch >= 3.0 -#if defined(EIGEN_HAS_CUDA_FP16) && defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 300 +#if defined(EIGEN_HAS_CUDA_FP16) && defined(__CUDACC__) && defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 300 template<> struct is_arithmetic { enum { value = true }; };