Added exception after printing the SYCL exceptions
This commit is contained in:
parent
6d7e4b5f3f
commit
b8f7a5427e
@ -47,13 +47,24 @@ SYCLStream<T>::SYCLStream(const unsigned int ARRAY_SIZE, const int device_index)
|
||||
std::cout << "Driver: " << getDeviceDriver(device_index) << std::endl;
|
||||
std::cout << "Reduction kernel config: " << dot_num_groups << " groups of size " << dot_wgsize << std::endl;
|
||||
|
||||
queue = new cl::sycl::queue(dev, [&](cl::sycl::exception_list l) {
|
||||
try {
|
||||
for(auto e: l) {
|
||||
queue = new cl::sycl::queue(dev, [&](cl::sycl::exception_list l)
|
||||
{
|
||||
bool error = false;
|
||||
for(auto e: l)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::rethrow_exception(e);
|
||||
}
|
||||
} catch (cl::sycl::exception e) {
|
||||
catch (cl::sycl::exception e)
|
||||
{
|
||||
std::cout << e.what();
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
if(error)
|
||||
{
|
||||
throw std::runtime_error("SYCL errors detected");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user