From 15e226d7d3b80d89d04a5b51baaf5b5d2aaad589 Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Fri, 18 Nov 2016 16:34:54 +0000 Subject: adding Benoit changes on the TensorDeviceSycl.h --- unsupported/test/cxx11_tensor_device_sycl.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'unsupported/test/cxx11_tensor_device_sycl.cpp') diff --git a/unsupported/test/cxx11_tensor_device_sycl.cpp b/unsupported/test/cxx11_tensor_device_sycl.cpp index a51062d23..2f8cfa081 100644 --- a/unsupported/test/cxx11_tensor_device_sycl.cpp +++ b/unsupported/test/cxx11_tensor_device_sycl.cpp @@ -41,18 +41,15 @@ void test_device_sycl(const Eigen::SyclDevice &sycl_device) { template void test_device_exceptions(const Eigen::SyclDevice &sycl_device) { - bool threw_exception = false; + VERIFY(sycl_device.ok()); int sizeDim1 = 100; array tensorDims = {{sizeDim1}}; DataType* gpu_data = static_cast(sycl_device.allocate(sizeDim1*sizeof(DataType))); TensorMap> in(gpu_data, tensorDims); TensorMap> out(gpu_data, tensorDims); - try { - out.device(sycl_device) = in / in.constant(0); - } catch(...) { - threw_exception = true; - } - VERIFY(threw_exception); + + out.device(sycl_device) = in / in.constant(0); + VERIFY(!sycl_device.ok()); sycl_device.deallocate(gpu_data); } -- cgit v1.2.3