FP16 on CUDA are only available starting with cuda 7.5. Disable them when using an older version of CUDA

This commit is contained in:
Benoit Steiner
2016-02-18 23:15:23 -08:00
parent f36c0c2c65
commit 0606a0a39b
3 changed files with 11 additions and 2 deletions

View File

@@ -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
}