From e20aecd845fd8736e2a7905f17483c104dd9651e Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Mon, 17 May 2021 15:25:43 +0100 Subject: [PATCH 1/5] [SYCL 1.2.1] Add check for FP64 support Fixes #98 --- SYCLStream.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SYCLStream.cpp b/SYCLStream.cpp index 49ad3ac..00c043f 100644 --- a/SYCLStream.cpp +++ b/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()) { From 6581ee63b809f446a0e4ad3ec479e9b76e0c6591 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Mon, 17 May 2021 15:33:54 +0100 Subject: [PATCH 2/5] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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`. From b772d00fe407bfb0499b05d79513bc7986dbff3a Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Tue, 18 May 2021 16:44:06 +0100 Subject: [PATCH 3/5] Revert "Add check for FP64 support" --- CHANGELOG.md | 1 - SYCLStream.cpp | 8 -------- 2 files changed, 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dbabed..29702d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,6 @@ 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/SYCLStream.cpp b/SYCLStream.cpp index 00c043f..49ad3ac 100644 --- a/SYCLStream.cpp +++ b/SYCLStream.cpp @@ -28,14 +28,6 @@ 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()) { From 82dedad6766d12909edce2437cd20f17ca47d1f8 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Mon, 17 May 2021 15:25:43 +0100 Subject: [PATCH 4/5] [SYCL 1.2.1] Add check for FP64 support Fixes #98 --- SYCLStream.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SYCLStream.cpp b/SYCLStream.cpp index 49ad3ac..00c043f 100644 --- a/SYCLStream.cpp +++ b/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()) { From 2ab68ab39e8604f67f5f98ec89d125654fabd0b4 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Mon, 17 May 2021 15:33:54 +0100 Subject: [PATCH 5/5] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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`.