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