From aad20d700dd12ea69323b7e8777c204ad8399e08 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 5 Oct 2016 10:39:24 -0700 Subject: [PATCH] Increase the tolerance to numerical noise. --- unsupported/test/cxx11_tensor_of_float16_cuda.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsupported/test/cxx11_tensor_of_float16_cuda.cu b/unsupported/test/cxx11_tensor_of_float16_cuda.cu index cbf401c86..b70c46722 100644 --- a/unsupported/test/cxx11_tensor_of_float16_cuda.cu +++ b/unsupported/test/cxx11_tensor_of_float16_cuda.cu @@ -165,8 +165,8 @@ void test_cuda_elementwise() { gpu_device.synchronize(); for (int i = 0; i < num_elem; ++i) { - std::cout << "Checking elemwise " << i << std::endl; - VERIFY_IS_APPROX(full_prec(i), half_prec(i)); + std::cout << "Checking elemwise " << i << ": full prec = " << full_prec(i) << " vs half prec = " << half_prec(i) << std::endl; + VERIFY_IS_APPROX(static_cast(full_prec(i)), static_cast(half_prec(i))); } gpu_device.deallocate(d_float1);