diff options
author | Mehdi Goli <mehdi.goli@codeplay.com> | 2016-12-15 16:59:57 +0000 |
---|---|---|
committer | Mehdi Goli <mehdi.goli@codeplay.com> | 2016-12-15 16:59:57 +0000 |
commit | c5e8546306059b101a7949e590c97785561ccd85 (patch) | |
tree | f9078f9435768bf95f91f511fac5f9a504260a5c /unsupported/Eigen | |
parent | 1324ffef2f577bf5a56af964ff1c4d995632ca46 (diff) |
Adding asynchandler to sycl queue as lack of it can cause undefined behaviour.
Diffstat (limited to 'unsupported/Eigen')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h index 46776d777..96c95e294 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h @@ -88,9 +88,15 @@ struct QueueInterface { } } })) -#else - m_queue(cl::sycl::queue(s)) -#endif + #else + m_queue(cl::sycl::queue(s, [&](cl::sycl::exception_list l) { + for (const auto& e : l) { + if (e) { + exception_caught_ = true; + } + } + })) + #endif {} /// Allocating device pointer. This pointer is actually an 8 bytes host pointer used as key to access the sycl device buffer. |