diff options
author | 2016-02-18 23:15:23 -0800 | |
---|---|---|
committer | 2016-02-18 23:15:23 -0800 | |
commit | 0606a0a39bcf01b0a03f0dcd17f7075fce8c402c (patch) | |
tree | 52ee01bb4b91e29211c3a711258f665c901eb099 /unsupported | |
parent | f36c0c2c65a78959f6ccbbc29c6e80f86b062bc8 (diff) |
FP16 on CUDA are only available starting with cuda 7.5. Disable them when using an older version of CUDA
Diffstat (limited to 'unsupported')
-rw-r--r-- | unsupported/test/cxx11_tensor_of_float16_cuda.cu | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unsupported/test/cxx11_tensor_of_float16_cuda.cu b/unsupported/test/cxx11_tensor_of_float16_cuda.cu index e9f5dd968..aee222a14 100644 --- a/unsupported/test/cxx11_tensor_of_float16_cuda.cu +++ b/unsupported/test/cxx11_tensor_of_float16_cuda.cu @@ -19,6 +19,7 @@ using Eigen::Tensor; +#ifdef EIGEN_HAS_CUDA_FP16 void test_cuda_conversion() { Eigen::CudaStreamDevice stream; Eigen::GpuDevice gpu_device(&stream); @@ -52,9 +53,11 @@ void test_cuda_conversion() { gpu_device.deallocate(d_half); gpu_device.deallocate(d_conv); } - +#endif void test_cxx11_tensor_of_float16_cuda() { +#ifdef EIGEN_HAS_CUDA_FP16 CALL_SUBTEST_1(test_cuda_conversion()); +#endif } |