Gate the code that refers to cuda fp16 primitives more thoroughly

This commit is contained in:
Benoit Steiner 2016-11-01 12:08:09 -07:00
parent 0a9ad6fc72
commit 7a0e96b80d

View File

@ -15,7 +15,7 @@ namespace Eigen {
namespace internal { namespace internal {
// Most of the following operations require arch >= 3.0 // 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<half2> { enum { value = true }; }; template<> struct is_arithmetic<half2> { enum { value = true }; };