diff --git a/CHANGELOG.md b/CHANGELOG.md index 29702d7..3dbabed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. - Support for CUDA Managed Memory and Page Fault memory. - Added nstream kernel from PRK with associate command line option. - CMake build system added for all models. +- SYCL device check for FP64 support. ### Changed - Default branch renamed from `master` to `main`. diff --git a/cpp/SYCLStream.cpp b/cpp/SYCLStream.cpp index 49ad3ac..00c043f 100644 --- a/cpp/SYCLStream.cpp +++ b/cpp/SYCLStream.cpp @@ -28,6 +28,14 @@ SYCLStream::SYCLStream(const int ARRAY_SIZE, const int device_index) throw std::runtime_error("Invalid device index"); device dev = devices[device_index]; + // Check device can support FP64 if needed + if (sizeof(T) == sizeof(double)) + { + if (dev.get_info().size() == 0) { + throw std::runtime_error("Device does not support double precision, please use --float"); + } + } + // Determine sensible dot kernel NDRange configuration if (dev.is_cpu()) {