From a2778f523e22f1c3c37e18fa3d54a7689eee6d41 Mon Sep 17 00:00:00 2001 From: James Price Date: Wed, 6 Jul 2016 14:11:29 +0100 Subject: [PATCH 1/3] [OCL] Print build log if kernel compilation fails --- OCLStream.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/OCLStream.cpp b/OCLStream.cpp index 50ad543..0ed4b8e 100644 --- a/OCLStream.cpp +++ b/OCLStream.cpp @@ -78,7 +78,18 @@ OCLStream::OCLStream(const unsigned int ARRAY_SIZE, const int device_index) // Check device can do double if (!device.getInfo()) throw std::runtime_error("Device does not support double precision, please use --float"); - program.build("-DTYPE=double"); + try + { + program.build("-DTYPE=double"); + } + catch (cl::Error& err) + { + if (err.err() == CL_BUILD_PROGRAM_FAILURE) + { + std::cout << program.getBuildInfo()[0].second << std::endl; + throw err; + } + } } else if (sizeof(T) == sizeof(float)) program.build("-DTYPE=float"); From f94e36f320c90d659da56839d9bc14e0ccc92350 Mon Sep 17 00:00:00 2001 From: James Price Date: Wed, 6 Jul 2016 17:16:35 +0100 Subject: [PATCH 2/3] [CUDA] Fix device name output (OpenCL->CUDA) --- CUDAStream.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CUDAStream.cu b/CUDAStream.cu index 21d36fa..802bb05 100644 --- a/CUDAStream.cu +++ b/CUDAStream.cu @@ -42,7 +42,7 @@ CUDAStream::CUDAStream(const unsigned int ARRAY_SIZE, const int device_index) check_error(); // Print out device information - std::cout << "Using OpenCL device " << getDeviceName(device_index) << std::endl; + std::cout << "Using CUDA device " << getDeviceName(device_index) << std::endl; std::cout << "Driver: " << getDeviceDriver(device_index) << std::endl; array_size = ARRAY_SIZE; From 74a4a3b0bdcd0f9a47240651d8e9ccb4803e828b Mon Sep 17 00:00:00 2001 From: James Price Date: Thu, 7 Jul 2016 09:40:16 +0100 Subject: [PATCH 3/3] [SYCL] Set WGSIZE to more sensible value for AMD Fiji --- SYCLStream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SYCLStream.cpp b/SYCLStream.cpp index d039d70..d4a2fd0 100644 --- a/SYCLStream.cpp +++ b/SYCLStream.cpp @@ -11,7 +11,7 @@ using namespace cl::sycl; -#define WGSIZE 64 +#define WGSIZE 256 // Cache list of devices bool cached = false;